eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
222 stars 60 forks source link

RM MINI 3 D #59

Closed ghost closed 4 years ago

ghost commented 4 years ago

Do not work with rm mini 3 d

eschava commented 4 years ago

Please update python-broadlink library and recheck

ghost commented 4 years ago

where i download it?

eschava commented 4 years ago

It was installed automatically when you did "pip install -r requirements.txt" You can execute "pip install --upgrade -r requirements.txt" to upgrade all dependencies

ghost commented 4 years ago

hi I have reinstalled everything now. I have two broadlinks but when I run "python mqtt.py record -> commands / cond / power" it gives me an error "Traceback (most recent call last):   File "mqtt.py", line 4, in     import broadlink # pip install broadlink ImportError: No module named broadlink "

after pip install broadlink

Traceback (most recent call last): File "mqtt.py", line 575, in devices = get_device(cf) File "mqtt.py", line 347, in get_device devices = broadlink.discover(timeout=lookup_timeout) if local_address is None else \ File "/usr/local/lib/python2.7/dist-packages/broadlink/init.py", line 122, in discover checksum = adler32(packet, 0xbeaf) & 0xffff TypeError: adler32() argument 1 must be string or read-only buffer, not bytearray

eschava commented 4 years ago

Looks same as https://github.com/mjg59/python-broadlink/issues/330 You can track it

ArtjeB commented 4 years ago

I have got the RM4 (redbean) running, so below mentioned devices are now supported:

  rm4: 0x51da,  # RM4b
          0x5f36,  # RM Mini 3
          0x610f,  # RM4c
          0x610e,  # RM4 mini
          0x62be  # RM4c

This by updating the broadlink python library and changing the code below in mqtt.py. Furtermore, you need to run the scripts using python3

         # RM2 record/replay control
             if device.type == 'RM2':
             file = dirname + "commands/" + command
             handy_file = file + '/' + action

into

         # RM2 record/replay control
             if device.type == 'RM4' or 'RM2':
             file = dirname + "commands/" + command
             handy_file = file + '/' + action

I propose to change the master code. I tried to commit the code change, but I am not used to work with Github.

eschava commented 4 years ago

I've committed support for RM4, please update