mjg59 / python-broadlink

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
MIT License
1.38k stars 478 forks source link

Add support for 0x4e2a aka VOX electronics IVA5-12JR wall mounted AC #608

Open davidpanic opened 3 years ago

davidpanic commented 3 years ago

This device is not strictly a broadlink device, but it does use their protocol.

I found that out because it is doing DNS queries to my pihole instance with the following FQDNs:

All of the below testing was done in a docker container that was set up like this:

docker run -it --rm --net=host ubuntu
$ apt update
$ apt install python3 python3-pip wget
$ pip install broadlink
$ wget -O /bin/broadlink_discovery https://raw.githubusercontent.com/mjg59/python-broadlink/822b3c326631c1902b5892a83db126291acbf0b6/cli/broadlink_discovery
$ wget -O /bin/broadlink_cli https://raw.githubusercontent.com/mjg59/python-broadlink/822b3c326631c1902b5892a83db126291acbf0b6/cli/broadlink_cli
$ chmod +x /bin/broadlink_*

The CLI discovers the device on my local network as follows:

$ broadlink_discovery
Discovering...
###########################################
Unknown
# broadlink_cli --type 0x4e2a --host 172.16.10.178 --mac c8f7425fe477
Device file data (to be used with --device @filename in broadlink_cli) : 
0x4e2a 172.16.10.178 c8f7425fe477

Running any further commands leads to nowhere:

$ broadlink_cli --type 0x4e2a --host 172.16.10.178 --mac c8f7425fe477 --learn
Traceback (most recent call last):
  File "/usr/bin/broadlink_cli", line 131, in <module>
    dev.enter_learning()
AttributeError: 'device' object has no attribute 'enter_learning'

Home assistant reports the device as unsupported:

2021-07-31 18:40:46 ERROR (MainThread) [homeassistant.components.broadlink.config_flow] Unsupported device: 0x4e2a. If it worked before, please open an issue at https://github.com/home-assistant/core/issues
danielchalmers commented 2 years ago

the ASW-H12U3/JIR1DI-US and ASW-H36U2/LFR1DI-US in my house have the same code 0x4e2a, which seems to be covered by #520