eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
224 stars 61 forks source link

Problems discovering Bescon BM4C mini device #82

Closed Ton-O closed 4 years ago

Ton-O commented 4 years ago

When discovering my BM4C-mini device, it fails with: ml310:/NEEOData/python-broadlink/cli# python3 broadlink_discovery Discovering... <broadlink.rm4 object at 0x7fb519edffd0> Traceback (most recent call last): File "broadlink_discovery", line 18, in if device.auth(): File "/usr/local/lib/python3.5/dist-packages/broadlink-0.14.1-py3.5.egg/broadlink/init.py", line 271, in auth check_error(response[0x22:0x24]) File "/usr/local/lib/python3.5/dist-packages/broadlink-0.14.1-py3.5.egg/broadlink/exceptions.py", line 97, in check_error raise exception(error_code) broadlink.exceptions.AuthenticationError: Authentication failed

OS: OSX 10.15.5 and Linux (docker node-package, using Ubuntu 9.2.1-9ubuntu2)

I've added some print-statements in the discovery, auth and check_error functions to show what's received: Discovering... prints at ====discover function of init.py ==== Response received B1 host: %s ('192.168.0.18', 80) Response received A1 devtype: %s 25278 Response received A1 mac: %s bytearray(b'$\xdf\xa7\xe8Y\xda') Response received A1 name: %s 智能遥控 Response received A1 is_locked: %s True Found a device: %s RM4 <broadlink.rm4 object at 0x7fb94c095a00>

prints at ====auth function of init.py==== Sending 2nd paccket Response, content %s bytearray(b'Z\xa5\xaaUZ\xa5\xaaU\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xb9\xcc\xff\xff\xbeb\xe9\x03~T\xdaY\xe8\xa7\xdf$\x00\x00\x00\x00\xaf\xbe\x00\x00') Checking payload, content %s bytearray(b'\x00\x00\x00\x00111111111111111\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00Test 1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00')

prints at ==== Check_error function of exception.py===== Checking errorcode: bytearray(b'\xff\xff') In check_error, content %s 255 255

Is this a user error or is the device not supported yet?

Ton-O commented 4 years ago

Sorry, I may have filed this issue for the wrong library. Closing the issue till i'm sure.