Baldhor / Homey-ESPhome-Enhanced

This is an Homey app which adds support for ESPHome devices. ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. More information on their homepage: https://www.esphome.io/
GNU General Public License v3.0
4 stars 3 forks source link

Request: Support for climate components, Panasonic heat pump #42

Closed Nettopp closed 8 months ago

Nettopp commented 9 months ago

Thank you for a very interesting project on adding ESPhome to Homey, your work is appreciated!

As described on the Homey forum, I will add a file with the log for items not showing up in the app under "native capabilities". Currently, when adding the ESPhome connected to the heat pump, the following options are available: image

Please see the attached file for "newentity" from the log. The following objects are included in the file:

panasonic_ac_outside_temperature panasonic_ac_power_consumption panasonic_ac_econavi_switch panasonic_ac panasonic_ac_horizontal_swing_mode panasonic_ac_vertical_swing_mode

At the bottom of the file I also added an "Unhandled entity type", as it looks like the "panasonic_ac" objectID contains several parameters, as seen in the screenshot below: supportsCurrentTemperature, supportedModesList, supportedCustomFanModesList, supportedCustomPresetsList

image

If you want to see the console.re it is running at the moment: https://console.re/nettoppesp console re newobject.txt

Nettopp commented 8 months ago

@Nettopp Ok so I added a custom enum for horizontal swing mode. It's awaiting certification: https://homey.app/a/nl.inversion.esphome/test/

@Baldhor Just to be clear, the horizontal and vertical swing modes have been working for a while! Its the "Mode" illustrated below that is not available in the capability list. image

The fix you did in 1.1.13 fixed "fan mode" and "preset".

Baldhor commented 8 months ago

@Baldhor Just to be clear, the horizontal and vertical swing modes have been working for a while!

Yes I understood. It's two separate subject :

  1. I just gave you a new toy to play with for horizontal swing
  2. I implemented a solution for mode ... but you will have to test yourself => https://homey.app/a/nl.inversion.esphome/test/


Please make sure to test the new mode implementation fully, including condition, trigger and action card please!

Baldhor commented 8 months ago

@Nettopp read above

Nettopp commented 8 months ago

@Baldhor On 1.1.15 i get an error message when I connect to the app: image My excisting device is still working, but its not visible under list of viritual or physical devices.

denstol commented 8 months ago

Hi Baldhor and Nettopp,

I'm following this topic for a while now to get my Mitsubishi Heavi Industries airco's up and running within the Homey ecosystem (2023). So, I also installed the newest versions of ESPHome to see what changed. This version 1.1.15 Test gave me the same error message as @nettopp in his previous message. I'm currently have one airco running the ESPhome firmware and this was still running ok. At least according the internal webserver. However, within Homey, the physical device was not shown anymore. Therefore, I deleted the device in Homey and tried to add it again as a new physical device, but that failed also. The following message was given (both on webbrowser and Android mobile):

image

A couple of seconds later this message was shown at the bottom of the screen: image

Maybe this info is usefull for your investigation.

I also want to mention that I highly appreciate and value your work and I know how much time it takes to implement, test, document and communicate all the relevant information. Thanks again!

Baldhor commented 8 months ago

@Nettopp I just cannot test climate by myself, sorry about it :) I need more logs => https://github.com/Baldhor/Homey-ESPhome-Enhanced/wiki/User-Guide#console-re-page

Baldhor commented 8 months ago

Hi Baldhor and Nettopp,

I'm following this topic for a while now to get my Mitsubishi Heavi Industries airco's up and running within the Homey ecosystem (2023). So, I also installed the newest versions of ESPHome to see what changed. This version 1.1.15 Test gave me the same error message as @Nettopp in his previous message. I'm currently have one airco running the ESPhome firmware and this was still running ok. At least according the internal webserver. However, within Homey, the physical device was not shown anymore. Therefore, I deleted the device in Homey and tried to add it again as a new physical device, but that failed also. The following message was given (both on webbrowser and Android mobile):

image

A couple of seconds later this message was shown at the bottom of the screen: image

Maybe this info is usefull for your investigation.

I also want to mention that I highly appreciate and value your work and I know how much time it takes to implement, test, document and communicate all the relevant information. Thanks again!

No idea why but seems I cannot use @denstol. Anyway, it's the same issue here, I jsut cannot test climate myself, I don't have this kind of device. You need to provide me food (consoel.re :) )

denstol commented 8 months ago

Never used console.re, but I gave it a try and also tried to add a new device which failed. https://console.re/768b1614e9a9 Hope it works

denstol commented 8 months ago

Using another computer now and the message is different, but I'm confident that the device is working on the correct IP address:

image

Baldhor commented 8 months ago

Never used console.re, but I gave it a try and also tried to add a new device which failed. https://console.re/768b1614e9a9 Hope it works

@denstol I'm on your consol.re channel now, can you try again quickly? So I can see the logs ...

denstol commented 8 months ago

I did it again resulting in the same error message. Hope it helps.

Baldhor commented 8 months ago

I did it again resulting in the same error message. Hope it helps.

It does: image

:)

I will fix and publish a new test version

Baldhor commented 8 months ago

@denstol fix published in test version: https://homey.app/a/nl.inversion.esphome/test/

denstol commented 8 months ago

Awesome! I will check. Thank you. Enjoy your weekend.

Baldhor commented 8 months ago

@denstol I'm looking at your console.re, and every one second, your airco device publish all its states ... which is abnormal! That's another subject, but I think you will have some stability issues because of it. Please make sure to open another issue if you encounter stability issues.

edit: also console.re has a memory leak, at this rate the app will crash :) Do not be surprised lol

denstol commented 8 months ago

@Baldhor I'm playing around adding capabilities to the physical device. So, that good, the device was found again. The 'select' capabilities display correct values, at least in line with the values I can see on the webserver.

image

If I got you right, I can use flow cards to update these values right?

Thanks for pointing on the console.re memory leak, I'm aware of this, so no problem. Thanks again!

Baldhor commented 8 months ago

@denstol

If I got you right, I can use flow cards to update these values right?

Yes, right now, it's limited to using flow cards because of Homey limitation. I'm trying to test "custom enum" with Nettopp, so that users can use "picker" to choose values, but it will require a lot of custom enum (one for each specifc use case ....)

Thanks for pointing on the console.re memory leak, I'm aware of this, so no problem. Thanks again!

My point is mostly about your device publish every one second, which is abnormal!

denstol commented 8 months ago

I will open a new issue if I encounter stability issues 😉

Baldhor commented 8 months ago

deleted, no mode should not offer ESPhome Custom Enum yet :) It's only after Nettopp confirmed it works that horizontal swing mode works that I may add it :)

Nettopp commented 8 months ago

@Baldhor I can add the horizontal swing mode capability text as you described, but I do not get the option to select anything on the device. image

There also seems to be a problem with the action cards after the last updates, no capabilities will show up in the list. image

Baldhor commented 8 months ago

@Nettopp You are not using the right card. https://github.com/Baldhor/Homey-ESPhome-Enhanced/wiki/Custom-capabilities

For native capability with list of values, you have 2/3 choices!

  1. ESPhome text
  2. ESPhome select
  3. ESPhome custom enum =>

    This one will be proposed only if it exist a custom enum capability with the exact same values

Currently, it should be proposed only for horizontal swing mode


For the cards, a small pictures to explain: image


The delete button will appear in the edit capability page. I updated the user guide to detail it. https://github.com/Baldhor/Homey-ESPhome-Enhanced/wiki/User-Guide#edit-capability-page

Nettopp commented 8 months ago

@Baldhor The select option from the Homey device works, and transmits to the heat pump! I don't know what I did wrong last time, but this works now.

image

The action card "then" works (upper line in the flow below). The "when" card does not work for me, I tried both as shown in the image, and the "selected value of xx changed" one. Neither triggered.

image

So the weird thing, all the choices for the "select" native capabilities like fan speed, etc. does not appear in the drop down menu of the action cards any more. The device below contains only esphomeselect and measure capabilities.

image

Baldhor commented 8 months ago

@Nettopp One more fix available in test version :) Soon or later, this thread will be marked as solved 👍

Baldhor commented 8 months ago

Yet another fix published in test version. Actually there was 2 issues:

Nettopp commented 8 months ago

@Baldhor I've done some testing, the capabilities are back (selectable) for all devices. Also, the action cards for "If" works now for the custom enum (and for the select).

There seems to be a problem with the "and" action card for custom and select capabilities, see picture:

image

A similar problem using "then" card, both for custom and select, same error message:

image

Baldhor commented 8 months ago

@Nettopp published (it's live) a fix for both issues.

So as far as I understand it, the 3 types of custom capabilities are fully functionnal with those fixes.

What about mode ? I made a fix, so the native capability should appear and have the values expected for your case.

   "supportedModesList": [
            0,
            1,
            2,
            3,
            4,
            5
        ],

The values that should appear for you are: 'off', "heat_cool", "cool", "heat", "fan_only", "dry" You don't have value 6 available on panasonic, which would make the value "auto" proposed.

Nettopp commented 8 months ago

@Baldhor I'm happy to report that everything seems to be working now! Haven't had the chance to do a whole lot of testing, but mode works, and the other stuff that I posted about earlier today also seems to be working. Good job!

Baldhor commented 8 months ago

@Nettopp ok, so I will add all the others custom enum that match your needs when I have the time. So every list of values will be available to you as picker in the device if you want :)

That's just because you was first user that require such stuff and that you helped to fix it.

Others will have to $$$ ... because it take times and it's because of a Homey limitation ... sorry

And my wife would like a swimming pool :)

Nettopp commented 8 months ago

@Baldhor I will do some more testing in practice now that the climate component is working pretty much as intended, and add suggestions and report any bugs I find any.

First one: When you set the target temperature native napability, there is an option to define the step. This is default at 0,5, but it doesen't look like this affects the "thermostat view" of the Homey device, when I adjust the temperature there the step is 1 degree.

Baldhor commented 8 months ago

First one: When you set the target temperature native napability, there is an option to define the step. This is default at 0,5, but it doesen't look like this affects the "thermostat view" of the Homey device, when I adjust the temperature there the step is 1 degree.

You mean that the step is ignored? Can you try to set a step of 2 :)

Nettopp commented 8 months ago

You mean that the step is ignored? Can you try to set a step of 2 :)

Setting it to 2 worked, but its not possible to input 0,5/0.5 after you have changed it from the default value. And do not try as I did to set it to 0... almost crashed Homey! You might remove that option if possible.

Baldhor commented 8 months ago

@Nettopp closing this thread, I think we all got enough of it lol I will open an enhancement request for you to implemented all the custom enum you need in your setup.