Closed DYLaKo closed 2 years ago
Should be possible, the values themselves are there, see here for example. These values are still received, they're just not exposed, and it should be a fairly trivial modification to add them as additional sensors. Unfortunately I'm too far from my home where my aircons are, and unlikely to visit it in a few months, so I can't test modifications that would expose these. But the source code is open, so feel free to contribute or bring the community's attention to the project, I'm sure somebody will happily take on this task.
I should be able to do some modifications myself if I know where to start. :-) Is it possible to help me out with some code/modification for 1 sensor, so I can do the rest myself? I know you cannot test, but I can test for you. :-)
Note that it might be a better idea to expose these as attributes rather than sensors. I'll look into it a bit later.
I will try your new branch this weekend and post the results here.
On a related note, attributes seem to be impossible with ESPHome: https://github.com/esphome/feature-requests/issues/115
@ginkage Did you also notice the new changelog 1.19.0 https://esphome.io/changelog/v1.19.0.html (attributes for home assistant sensor?
@deku-m Yes, I saw that one, I believe that's the exact opposite: it's for reading attributes from existing entities, rather than exposing my own attributes.
Ah damn to bad haha i just had to upgrade and saw the changelog and remember your feedback xD
Still haven't found time to test.. sorry Will test next week to see the results.
Just in case, merged the main branch in, so that you can try it with ESPHome 1.19.4 for whenever you have time.
I believe the PR mentioned above is not required though.
Hi @ginkage ,
The new branch works great!! I also saw other people in the Home Assistant Dutch Facebook group confirming this. Would it be helpful to add it to the master for future users with a switch to enable/disable technical logging? In my case I did make some adjustments, as the ID and name in home assistant isn't really clear, as it belongs to the MHI device. Also I have two MHI airco's hence adjusted the names and base ID at the custom sensors.
Do you know if the ID can be set also directly in the custom platform? I couldn't find it at: https://esphome.io/components/sensor/custom.html Now it is derived from the name, but I think it is helpful to keep them separate. Next to that it would help to add a variable with the the Airco name, so the climate and sensors are based on the same prefix.
`climate:
platform: custom lambda: |- auto mhi_ac_ctrl = new MhiAcCtrl(); App.register_component(mhi_ac_ctrl); return {mhi_ac_ctrl};
climates:
sensor:
platform: custom lambda: |- return ((MhiAcCtrl*)mhi_ac_ctrl_downstairs)->get_sensors();
sensors:
binary_sensor:
platform: custom lambda: |- return ((MhiAcCtrl*)mhi_ac_ctrl_downstairs)->get_binary_sensors();
binary_sensors:
edit: While the sensors are only a subset (only noticed the remarks late :) ) it works great. Additional sensors should be trivial, but looking at the .h file it is complex for me as I don't have experience here. Wondering if @DYLaKo already already have included all sensors.
edit: While the sensors are only a subset (only noticed the remarks late :) ) it works great. Additional sensors should be trivial, but looking at the .h file it is complex for me as I don't have experience here. Wondering if @DYLaKo already already have included all sensors.
To be honest, I had some turbulent months in which I used my spare time to relax instead of working on my home automation, so both MHi's in my house are still running with the code from the original MHI-AC-Ctrl project.
Hope to use this is in the near future.
Would it be helpful to add it to the master for future users with a switch to enable/disable technical logging?
I'll get to that, hopefully soon enough.
Would it be helpful to add it to the master for future users with a switch to enable/disable technical logging?
I'll get to that, hopefully soon enough.
No issues. Great that your are willing already, thanks!
I've added some more sensors in my pull request; https://github.com/ginkage/MHI-AC-Ctrl-ESPHome/pull/16. If you want, you could test it out and report back if it works for you. Also, let me know if you are still missing any sensors, I'll happily try to add them.
First of all: Great work! I already am using the MHI-AC-Ctrl in one of my airco controllers, but wanted to switch to ESPHome if possible. Your project made it possible to run my second airco with ESPHome. I like it!
Question: With the original MHI-AC-Ctrl, a lot of technical values are send to MQTT, see below for an example. Is it also possible to read this data through your ESPHome version?