mjg59 / python-broadlink

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

Requesting support for 3x1 Smart Switch (devtype: 23189 / 0x5a95) #716

Closed iganeshk closed 7 months ago

iganeshk commented 1 year ago

Device Name: 3x1 Smart Switch Vendor(s): gofanco, siig Device Type (setup): Universal Remote Dev Type: 23189 / 0x5a95

I recently got my hands on a 3x1 HDMI Switch (https://www.amazon.com/gofanco-HDMI-Switch-Voice-Control/dp/B09R6Y5TTK) and the remote switching protocol is done by broadlink.

Initial setup is guided to use the "Magic Home Smart Home" app and suggested device type for configuration is "Universal Remote". I tried classifying as rmmini, rmminib, etc but no luck. It keeps failing at auth() and no luck in setting up.

Hello

device = broadlink.hello('192.168.x.xxx')
# obfuscated mac-id
broadlink.device.Device(('192.168.x.xxx', 80), mac=b'\x--\x--\x--\x--\x--', devtype=23189, timeout=10, name='3x1 Smart Switch', model='', manufacturer='', is_locked=True)

Auth

device.auth()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.10/dist-packages/broadlink/device.py", line 185, in auth
    e.check_error(response[0x22:0x24])
  File "/usr/local/lib/python3.10/dist-packages/broadlink/exceptions.py", line 152, in check_error
    raise exception(error_code)
broadlink.exceptions.AuthenticationError: [Errno -1] Authentication failed