Thanks Jaaap for your help,
But I managed to fix it (temporarily).
What is the problem. My broadlink RM3 mini is a new one. It's having firmware v44057. I found out the device.enter_learning method from the broadlink plugin in broadlink v0.10 is not working correctly with my device (probably due to new firmware).
I switched to the new broadlink v0.14 plugin and of course there is no connection anymore as stated in comments above. But when I tried to create a small test python script:
Code: Select all
import broadlink
import time
devices = broadlink.discover(timeout=5)
devices[0].auth()
devices[0].enter_learning()
I recognized that my rm mini was in learning mode. So learning mode is working with version 0.14, but set up a connection in domoticz is only working with version 0.10
The issue is with plugin.py script within the method: broadlinkConnect(line 727). It's the line:
device = broadlink.rm(host=..... within the first if because Mode3 = RM2 in the case of a RM mini3.
If you look into the code of the broadlink 0.14 plugin you can see the call of class rm is now with *args and **kwargs instead of host, mac and devtype. Class devices is still host, mac and devtype. So I think the only change should be the call in that line. But unfortunately Python is not my main language (it's java) so I didn't manage to solve that one.
But I have a workaround if you use only one RM mini3 in your network:
change the mentioned line (line 727) by the following two lines:
Code: Select all
devices = broadlink.discover(timeout=5)
device = devices[0]
Now the plugin will search for broadlink devices and it will connect to the first one that is found.
I hope the developer of the plugin (@zak45) can solve it correctly so above workaround is not necessary anymore.
So in short the issue: With broadlink v0.10 my rm mini 3 with firmware v 44057 can connect in domoticz BUT learning is not possible.
The workaround:
* Upgrade broadlink 0.10 to 0.14 (sudo pip3 uninstall broadlink and then: subo pip3 install broadlink==0.14)
* Change the plugin.py on line 727:
Code: Select all
device = broadlink.rm(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"]
should be two new lines:
Code: Select all
devices = broadlink.discover(timeout=5)
device = devices[0]
* restart domotics (sudo service domoticz.sh restart)
I hope this will help others to solve there issue.
Alex