-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New sensors and various fixes #166
Conversation
… remote temperature update packet. This should fix WantedSettings getting ignored (like fan speed change).
…rking correctly).
- Add a new sensor for current input power in Watts. - Add a new sensor for total consumed energy in kWh. - Add a new sensor for total indoor unit runtime in hours. - Try to prevent outside air temperature sensor from changing to incorrect values when it's unavailable.
Ran an initial test - the PR compiles and installs normally on my ESP8266 device. The new sensors don't throw any errors, but only show 0s, in both Idle and Operating states. Could just be that my units (MXZ-SM42NAMHZ outdoor and MSZ-GL15NA indoor) don't support these datapoints. Interesting to see if others get values here. I know the previous compressor frequency sensor also didn't generate values on my units. FYI, for people new to testing ESPhome components, you can target a specific github branch from a PR using the below syntax. The 0s refresh forces it to pull a new copy each time you compile rather than caching for 24 hours. external_components:
# - source: github://echavet/MitsubishiCN105ESPHome
- source: github://miipekk-ihme/MitsubishiCN105ESPHome@pr-3
refresh: 0s |
All 3 new sensors; input_power_sensor, kwh_sensor, runtime_hours_sensor, work on MSZ-LN35. None of them work on a 15yr old MSZ-FD25. Nice work! |
Thanks, this is really interesting. On my unit normal reported input power seems to bee around 500W and it goes up to about 2000W. And when compressor is off, the reading is between 6W to 12W depending on the fan speed. I have not yet checked these reading with a multimeter / clamp meter but those seem to correlate to the expected power levels and device specs. Maybe that sensor reading is different on different units. Would it be possible for you to capture few UART packets from the unit? For that you should change the log levels (change log level to DEBUG, and READ and WRITE tags to DEBUG to capture packets the communication):
Then capture the logs to a file and provide these values:
|
On my unit (MSZ-RW25VG-SC1 and MUZ-RW25VGHZ-SC1) the new compressor reading was incorrect and it seems to be the actual input power reading so I have reverted this PR to the previous old reading. My unit doesn't seem to provide compressor reading at all (it stays at zero), but instead provides the input power reading. |
Thank you for your work @miipekk-ihme |
MSZ-LN35
|
Thank you for the UART communication log. The 0x06 status packet looks to have similar content so I can't see any reason why the input power would have a different scale on your unit. Other packets have also similar structure and data fields. The 0x02 settings packet has one unidentified byte (index 17 from the beginning of the packet). I have a fixed value 0x28 there and you seem to have 0x46. That is something to monitor for a change. When your kWh counter flips over soon, please capture a new communication log. That would be very helpful to see what happens then. |
I tried the new sensors on my Danish model - can't get any values either. I set the logger as suggested and got this:
|
Hi,
I've get in byte 14 a number that seems compressor frequency. |
It flipped at 6553.5 kWh. Here output:
Is this too short? |
Thank you very much for that. Unfortunately it looks like the kWh counter does not extend to any new bytes, so the counter size seems to be restricted to 2 bytes with maximum value of 6553.5 as you have observed.
I will check if it would be possible to change to value type so that it would continue to increase in home assistant when the raw value flips over. |
This PR includes the following changes:
Please test and comment before merging.
The new sensors needs to be added to the YAML configuration also, for example: