smartHomeHub / SmartIR

Integration for Home Assistant to control climate, TV and fan devices via IR/RF controllers (Broadlink, Xiaomi, MQTT, LOOKin, ESPHome)
MIT License
2.01k stars 992 forks source link

[QUESTION] Don't know if this is a bug or not (think it's not) #959

Open hardwareadictos opened 1 year ago

hardwareadictos commented 1 year ago

Home Assistant version 2022.10.4

SmartIR version 1.17.6

SmartIR configuration


smartir:
    check_updates: false

climate:
  - platform: smartir
    name: A/C Piso
    unique_id: ac_piso
    device_code: 1061
    controller_data: remote.broadlink_rm4_pro_comedor_remote
    temperature_sensor: sensor.despacho_temperature
    humidity_sensor: sensor.despacho_humidity

Describe the bug

Well i don't know if it's a bug or not, let me describe my environment:

I have a Broadlink RM4 Pro and a LG PREMTB001 A/C system, with the Broadlink APP i can fully control the AC wall console (it has an IR):

image

With SmartIR i can fully control this device with profile 1061https://github.com/smartHomeHub/SmartIR/blob/master/codes/climate/1061.json

And everything works absolutelly fine except one thing: Powering on the AC, i see on this profile and others that there is only an off command but not an on one:

image

Is SmartIR able to turn on devices? I know this is not a real thermostat inside HA, but for example with Broadlink App i can turn on the device.

I tried to make HA to learn the power on command from AC console (via IR and RF), but the orange led on the RM4 Pro goes on but closes on the defined timeout without learning anything from the power button. Tried other devices at home like a FAN and a TV and all of them are working fine.

I can even turn off the AC from HA, everything works when the AC is on, the only thing icannot do is to power it up:

image

Can someone explain me what is happening with that particular function?

Debug log

That's what i get from home assistant when i try to learn the poweron command (it does not learn anything):


[139954779760352] Error handling message: Unknown error (unknown_error)
10:35:57 – (ERROR) Home Assistant WebSocket API
websocket_api script: Error executing script. Unexpected error for call_service at pos 1: Command not found: 'power'
10:35:57 – (ERROR) components/broadlink/remote.py
Failed to call remote.send_command: Command not found: 'power'
10:35:57 – (ERROR) Broadlink
Failed to learn 'power': No infrared code received within 30.0 seconds
10:35:33 – (ERROR) Broadlink

Additional context

Let me know if i can provide more information.

UPDATE1: Rear deeping into the issue, now i see that the Broadlink device is not learning any command from the A/C console (not same issue with my TV, my FAN and other devices which are learning perfectly), but SmartIR works fine for all the commands inbuilt on the 1061 profile, except for the power on thing.

hardwareadictos commented 1 year ago

No one can give an approach to this?

thechandlergit commented 1 year ago

Typically A/C units don't have an on command - they are switched on by setting the mode to something other than off, i.e. cool, heat, dry, fan, auto, etc.

When using an A/C IR remote, it is sending the entire state to the unit - mode, temperature, fan, swing, timers, etc. So when you hit the on button on the remote, it's actually sending all those settings - cool, 24°C, low fan, etc.

In that 1061.json file, each one of those codes (i.e. "16": "JgBAAGo...") is technically an "on" command, as it's setting the A/C unit to a mode other than "off".

As to why you're having difficulty learning the "power" command, that's a separate issue and should work IMO based on what you've given here. Does the wall controller work by sending IR signals to the A/C unit?

hardwareadictos commented 1 year ago

, that's a separate issue and should work IMO based on what you've given here. Does the wall controller work by sending IR signals to the A/C unit?

Respect this: "As to why you're having difficulty learning the "power" command, that's a separate issue and should work IMO based on what you've given here. Does the wall controller work by sending IR signals to the A/C unit?" --> I have to say yes as Broadlink companion app manages to wake up and power on the A/C unit.

In my case, incresing/lowering temp, changing operation mode, etc doesn't wake up the A/C, to operate with it firstly i have to wake it up with Broadlink app, then i can control it with smartir. Once i stop it (with smartir and HA) i have to start it again with broadlink app to manage it...

hardwareadictos commented 1 year ago

Please. Can someone help me?

jbrody17 commented 1 year ago

I'm experiencing the same issue described here... Just installed a Fujitsu mini-split. Came with a new remote (AR-RPB2U) that I didn't find mapped, so I did the mapping myself. Only issue is what's described.

If the unit is off, setting the mode and a temperature via HA doesn't do anything.

I mapped the controls by just stepping through all the set temperatures on the remote. I suppose I could set the desired temp and then cycle the power button for each command, but that seems like a pain to do

nonedark2008 commented 11 months ago

now i see that the Broadlink device is not learning any command from the A/C console

It means that you console works only as a receiver. You need an IR emitter like AC remote to learn a command using Broadlink. After learning you can add additional "on" command into 1061.json as in this one 1961.json.