avzhuiko / climate-remote-control

Control your climate units via "Remote: send command" service and default climate card
MIT License
0 stars 0 forks source link

Formatting of commands to LG RAC 056905 units #16

Open hunterdrayman opened 1 month ago

hunterdrayman commented 1 month ago

Using Broadlink Mini to LG units - HA Send_remote works directly but I'm having trouble getting the climate-remote-control integration to send commands that the LG units accept. I'm starting with a simple on/off config. Integration requests a bug report thus:

Logger: homeassistant.components.climate Source: components/climate/init.py:365 integration: Climate (documentation, issues) First occurred: 5 August 2024 at 13:29:02 (21 occurrences) Last logged: 11:43:34

Entity None (<class 'custom_components.climate_remote_control.climate.AcRemote'>) does not set ClimateEntityFeature.TURN_OFF but implements the turn_off method. Please create a bug report at https://github.com/avzhuiko/climate-remote-control/issues
Entity None (<class 'custom_components.climate_remote_control.climate.AcRemote'>) does not set ClimateEntityFeature.TURN_ON but implements the turn_on method. Please create a bug report at https://github.com/avzhuiko/climate-remote-control/issues
Entity None (<class 'custom_components.climate_remote_control.climate.AcRemote'>) implements HVACMode(s): off, heat, cool, fan_only and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/avzhuiko/climate-remote-control/issues
Entity None (<class 'custom_components.climate_remote_control.climate.AcRemote'>) implements HVACMode(s): off, cool and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/avzhuiko/climate-remote-control/issues
Entity None (<class 'custom_components.climate_remote_control.climate.AcRemote'>) implements HVACMode(s): off, cool, fan_only, heat and therefore implicitly supports the turn_on/turn_off methods without setting the proper ClimateEntityFeature. Please create a bug report at https://github.com/avzhuiko/climate-remote-control/issues
avzhuiko commented 1 month ago

Hi @hunterdrayman,

Thank you for report!

I have released new version 0.2.1, and now there is no warnings with turn_on/turn_off methods.

Enjoy!

hunterdrayman commented 1 month ago

Thank you, @avzhuiko That has made a difference. The unit will turn on/off now in a similar way to calling Remote: Send command from the dev tools. I would like to fully understand the mapping between the integration and the IR command set. From experimentation I have found that these commands work in dev tools (sometimes in combination) and have assigned the following names in the Broadlink codes file.

"Light off" "Jet mode" "Temperature up" "Temperature down" "Power on" "Power off" "Heat" "Cool" "Auto mode" "Duhumidify" "Fan only" "Speed 2" "Speed 3" "Speed 4" "Speed 5" "Speed 6" "Speed natural"

Please can you explain how I can map these to your integration or alternatively, assign different names that match correctly. e.g. Would I just replace "Power on" then "Cool" with "mode:cool"?

Up to now I have used the above commands with Node-RED to automate my AC units but your climate control device is much neater.

avzhuiko commented 1 month ago

First of all, I need to understand which is type of your remote control. There are two types: statefull or stateless. Usually the statefull remote controls send a lot of parameters in one command (No matter how many times you clicked on temperature up/down button, fan mode, HVAC mode. It sends all of them each time when you click any button). For example: my AC sends mode, fan and temperature every time. At the same time it sends swing mode separately.

But the stateless sends only command (without parameters): "increase temperature", "increase fan speed", "toggle swing". And it does not care if AC receive this command.

Please send me some examples of using your remote control for better explanation. Try to cover IR transmitter and set click "Temperature up", "Increase speed" and change mode (Ex from cooling to heating). After that uncover it, and click "Temperature up" again, and say to me what happened. If all of changes was received by AC, you should choose all of them as "Grouping attributes".

I can make the configuration process more flexible for you, but I need more information =)

NOTE: I use standard entity from HomeAssistant, so you can learn a little bit more on that page https://developers.home-assistant.io/docs/core/entity/climate

avzhuiko commented 1 month ago

Forget to tag you @hunterdrayman

In my case I put HVAC mode, Fan speed and temperature as grouping attributes, and my commands (if I change one of them) looks like 'mode:heat_fan:low_temp:28.0', 'mode:cool_fan:medium_temp:24.0' and so on.

I will make a research regarding speed levels, because default implementation doesn't support levels 1-6, only low, medium and high

hunterdrayman commented 1 month ago

I did what you suggested and I found that when covering the remote https://www.amazon.co.uk/AKB74955604-AKB75215401-AKB74955603-AKB73995805-Conditioner-White/dp/B0BZNL41GVwhilst pressing buttons, causes the graphics on the remote's display to update, but the intermediate states are not kept and re-sent to the AC unit: only the last state change is sent when I uncover - So, I have a stateless remote.

I am renaming my Broadlink code command names in line with those in the standard climate entity docs https://developers.home-assistant.io/docs/core/entity/climatereference you supplied. Useful, thanks. Some success so far and I'll let you know how that works out. There seems to be no 'temperature up' and 'temperature down' command (perhaps for safety reasons!).

I think Grouping is not going to work for me - as things like 'mode:heat_fan:low' could be defined in my Broadlink codes file but I'd need to create a combo for each possibility. Better would be a facility to send atomic commands in sequence (this is what I do in Node-RED).

Thanks for your help, Aleksei.

On Wed, Aug 7, 2024 at 10:35 AM Aleksei Zhuiko @.***> wrote:

Forget to tag you @hunterdrayman https://github.com/hunterdrayman

In my case I put HVAC mode, Fan speed and temperature as grouping attributes, and my commands (if I change one of them) looks like 'mode:heat_fan:low_temp:28.0', 'mode:cool_fan:low_temp:24.0' and so on

— Reply to this email directly, view it on GitHub https://github.com/avzhuiko/climate-remote-control/issues/16#issuecomment-2273043254, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARIIIZ22GG5PQMDEBJCVDGLZQHS5NAVCNFSM6AAAAABMCCIHGSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZTGA2DGMRVGQ . You are receiving this because you were mentioned.Message ID: @.***>

avzhuiko commented 1 month ago

@hunterdrayman I've decided to add some features, I think some of them will be useful for you.

So in Node-RED you click increase temperature or decrease? Remote control looks like you can set any temperature directly, I mean that each value on its screen have different IR-code. I think that you can set exactly temperature For checking this statement in cooling mode you can set the lowest temperature, than cover transmitter, set the highest temperature, uncover, and push the "Decrease temperature" button. If AC stop cooling it will mean that you can use "Target temperature" feature, or if you have screen on AC with temperature check if it has the same number as remote control has.

For current implementation you can do not select grouping attributes. Oh, it looks like a bug #21, when I can't clear previously selected grouping attributes. As workaround recreate entity

hunterdrayman commented 1 month ago

Hi @avzhuiko Sorry for the delay in responding. My Node-RED flow simply uses a sequence of HA Service Calls to domain 'Remote' and does individual 'send_command' ops like in this example.

Screenshot 2024-08-12 104018 Screenshot 2024-08-12 104155

The same could be accomplished with an HA Automation but I just prefer Node-RED.

I can only increase/decrease the temperature incrementally with the remote control buttons but doing the test you suggested confirms that the remote stores the desired target temp and sends that - so it should be possible to get the Broadlink to learn an IR command to set a target temp - I will experiment.