Python Plugin : Broadlink RM2 V4

Python and python framework

Moderator: leecollings

Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Gerwin »

knielen wrote: Friday 17 April 2020 11:46 Hi all,

Last week I did an upgrade to Buster and last stable of Domoticz. Since then, my RM2 is down. I allready reinstalled the plugin, but no luck. Anyone had this issue too?

Code: Select all

2020-04-17 11:40:23.842 Status: (BlackBean) Started.
2020-04-17 11:40:24.736 (BlackBean) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2020-04-17 11:40:24.737 (BlackBean) 'HardwareID':'21'
2020-04-17 11:40:24.737 (BlackBean) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2020-04-17 11:40:24.737 (BlackBean) 'StartupFolder':'/home/pi/domoticz/'
2020-04-17 11:40:24.737 (BlackBean) 'UserDataFolder':'/home/pi/domoticz/'
2020-04-17 11:40:24.737 (BlackBean) 'Database':'/home/pi/domoticz/domoticz.db'
2020-04-17 11:40:24.737 (BlackBean) 'Language':'en'
2020-04-17 11:40:24.737 (BlackBean) 'Version':'4.2.0'
2020-04-17 11:40:24.737 (BlackBean) 'Author':'zak45'
2020-04-17 11:40:24.737 (BlackBean) 'Name':'BlackBean'
2020-04-17 11:40:24.737 (BlackBean) 'Address':'-correct-'
2020-04-17 11:40:24.737 (BlackBean) 'Port':'0'
2020-04-17 11:40:24.737 (BlackBean) 'Key':'BroadlinkRM2'
2020-04-17 11:40:24.737 (BlackBean) 'Mode1':'-correct-'
2020-04-17 11:40:24.737 (BlackBean) 'Mode2':'/home/pi/Bean_ini'
2020-04-17 11:40:24.738 (BlackBean) 'Mode3':'RM2'
2020-04-17 11:40:24.738 (BlackBean) 'Mode4':'no'
2020-04-17 11:40:24.738 (BlackBean) 'Mode5':'9000'
2020-04-17 11:40:24.738 (BlackBean) 'Mode6':'Debug'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzVersion':'2020.1'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzHash':'63fa969e4'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzBuildTime':'2020-03-22 15:16:16'
2020-04-17 11:40:24.738 (BlackBean) Device count: 3
2020-04-17 11:40:24.738 (BlackBean) Device: 1 - ID: 441, Name: 'BlackBean - Discovery', nValue: 0, sValue: 'Off'
2020-04-17 11:40:24.738 (BlackBean) Device ID: '441'
2020-04-17 11:40:24.738 (BlackBean) Device Name: 'BlackBean - Discovery'
2020-04-17 11:40:24.738 (BlackBean) Device nValue: 0
2020-04-17 11:40:24.738 (BlackBean) Device sValue: 'Off'
2020-04-17 11:40:24.739 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.739 (BlackBean) Device: 2 - ID: 442, Name: 'BlackBean - Discovery Info', nValue: 1, sValue: '[Device 1 Host address = '-correct-', 8][Device 1 MAC address = -correct- Type: RM2]'
2020-04-17 11:40:24.739 (BlackBean) Device ID: '442'
2020-04-17 11:40:24.739 (BlackBean) Device Name: 'BlackBean - Discovery Info'
2020-04-17 11:40:24.739 (BlackBean) Device nValue: 1
2020-04-17 11:40:24.739 (BlackBean) Device sValue: '[Device 1 Host address = '192.168.3.114', 8][Device 1 MAC address = 780f775ac24e Type: RM2]'
2020-04-17 11:40:24.739 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.739 (BlackBean) Device: 254 - ID: 443, Name: 'BlackBean - Remote', nValue: 0, sValue: ''
2020-04-17 11:40:24.739 (BlackBean) Device ID: '443'
2020-04-17 11:40:24.739 (BlackBean) Device Name: 'BlackBean - Remote'
2020-04-17 11:40:24.739 (BlackBean) Device nValue: 0
2020-04-17 11:40:24.739 (BlackBean) Device sValue: ''
2020-04-17 11:40:24.740 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.740 (BlackBean) Pushing 'PollIntervalDirective' on to queue
2020-04-17 11:40:24.740 (BlackBean) Connecting to: -correct-
2020-04-17 11:40:24.728 Status: (BlackBean) Initialized version 4.2.0, author 'zak45'
2020-04-17 11:40:24.727 Status: (BlackBean) Entering work loop.
2020-04-17 11:40:35.517 (BlackBean) Pushing 'onHeartbeatCallback' on to queue
2020-04-17 11:40:35.519 (BlackBean) Processing 'onHeartbeatCallback' message
2020-04-17 11:40:35.519 (BlackBean) Calling message handler 'onHeartbeat'.
2020-04-17 11:40:35.521 Error: (BlackBean) Error Connecting to Broadlink device....192.168.3.114
sudo pip3 uninstall broadlink

sudo -H pip3 install broadlink==0.10

i had to copy the broadlink version 0.10 to the lib folder
sudo cp -r /usr/local/lib/python3.7/dist-packages/broadlink-0.10.dist-info/ /usr/lib/python3.7/
and removed the 0.13 version broadlink folder from /usr/lib/python3.7/

i did this
Gerwin
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by knielen »

Gerwin wrote: Friday 17 April 2020 12:11
knielen wrote: Friday 17 April 2020 11:46 Hi all,

Last week I did an upgrade to Buster and last stable of Domoticz. Since then, my RM2 is down. I allready reinstalled the plugin, but no luck. Anyone had this issue too?

Code: Select all

2020-04-17 11:40:23.842 Status: (BlackBean) Started.
2020-04-17 11:40:24.736 (BlackBean) Debug logging mask set to: PYTHON PLUGIN QUEUE IMAGE DEVICE CONNECTION MESSAGE ALL
2020-04-17 11:40:24.737 (BlackBean) 'HardwareID':'21'
2020-04-17 11:40:24.737 (BlackBean) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2020-04-17 11:40:24.737 (BlackBean) 'StartupFolder':'/home/pi/domoticz/'
2020-04-17 11:40:24.737 (BlackBean) 'UserDataFolder':'/home/pi/domoticz/'
2020-04-17 11:40:24.737 (BlackBean) 'Database':'/home/pi/domoticz/domoticz.db'
2020-04-17 11:40:24.737 (BlackBean) 'Language':'en'
2020-04-17 11:40:24.737 (BlackBean) 'Version':'4.2.0'
2020-04-17 11:40:24.737 (BlackBean) 'Author':'zak45'
2020-04-17 11:40:24.737 (BlackBean) 'Name':'BlackBean'
2020-04-17 11:40:24.737 (BlackBean) 'Address':'-correct-'
2020-04-17 11:40:24.737 (BlackBean) 'Port':'0'
2020-04-17 11:40:24.737 (BlackBean) 'Key':'BroadlinkRM2'
2020-04-17 11:40:24.737 (BlackBean) 'Mode1':'-correct-'
2020-04-17 11:40:24.737 (BlackBean) 'Mode2':'/home/pi/Bean_ini'
2020-04-17 11:40:24.738 (BlackBean) 'Mode3':'RM2'
2020-04-17 11:40:24.738 (BlackBean) 'Mode4':'no'
2020-04-17 11:40:24.738 (BlackBean) 'Mode5':'9000'
2020-04-17 11:40:24.738 (BlackBean) 'Mode6':'Debug'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzVersion':'2020.1'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzHash':'63fa969e4'
2020-04-17 11:40:24.738 (BlackBean) 'DomoticzBuildTime':'2020-03-22 15:16:16'
2020-04-17 11:40:24.738 (BlackBean) Device count: 3
2020-04-17 11:40:24.738 (BlackBean) Device: 1 - ID: 441, Name: 'BlackBean - Discovery', nValue: 0, sValue: 'Off'
2020-04-17 11:40:24.738 (BlackBean) Device ID: '441'
2020-04-17 11:40:24.738 (BlackBean) Device Name: 'BlackBean - Discovery'
2020-04-17 11:40:24.738 (BlackBean) Device nValue: 0
2020-04-17 11:40:24.738 (BlackBean) Device sValue: 'Off'
2020-04-17 11:40:24.739 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.739 (BlackBean) Device: 2 - ID: 442, Name: 'BlackBean - Discovery Info', nValue: 1, sValue: '[Device 1 Host address = '-correct-', 8][Device 1 MAC address = -correct- Type: RM2]'
2020-04-17 11:40:24.739 (BlackBean) Device ID: '442'
2020-04-17 11:40:24.739 (BlackBean) Device Name: 'BlackBean - Discovery Info'
2020-04-17 11:40:24.739 (BlackBean) Device nValue: 1
2020-04-17 11:40:24.739 (BlackBean) Device sValue: '[Device 1 Host address = '192.168.3.114', 8][Device 1 MAC address = 780f775ac24e Type: RM2]'
2020-04-17 11:40:24.739 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.739 (BlackBean) Device: 254 - ID: 443, Name: 'BlackBean - Remote', nValue: 0, sValue: ''
2020-04-17 11:40:24.739 (BlackBean) Device ID: '443'
2020-04-17 11:40:24.739 (BlackBean) Device Name: 'BlackBean - Remote'
2020-04-17 11:40:24.739 (BlackBean) Device nValue: 0
2020-04-17 11:40:24.739 (BlackBean) Device sValue: ''
2020-04-17 11:40:24.740 (BlackBean) Device LastLevel: 0
2020-04-17 11:40:24.740 (BlackBean) Pushing 'PollIntervalDirective' on to queue
2020-04-17 11:40:24.740 (BlackBean) Connecting to: -correct-
2020-04-17 11:40:24.728 Status: (BlackBean) Initialized version 4.2.0, author 'zak45'
2020-04-17 11:40:24.727 Status: (BlackBean) Entering work loop.
2020-04-17 11:40:35.517 (BlackBean) Pushing 'onHeartbeatCallback' on to queue
2020-04-17 11:40:35.519 (BlackBean) Processing 'onHeartbeatCallback' message
2020-04-17 11:40:35.519 (BlackBean) Calling message handler 'onHeartbeat'.
2020-04-17 11:40:35.521 Error: (BlackBean) Error Connecting to Broadlink device....192.168.3.114
sudo pip3 uninstall broadlink

sudo -H pip3 install broadlink==0.10

i had to copy the broadlink version 0.10 to the lib folder
sudo cp -r /usr/local/lib/python3.7/dist-packages/broadlink-0.10.dist-info/ /usr/lib/python3.7/
and removed the 0.13 version broadlink folder from /usr/lib/python3.7/

i did this
Gerwin
Did this and the errors are gone, great! Tonight I will test if I can add new commands.

So the trick was to install an older version? How did you find out this was the solution?
johansson
Posts: 75
Joined: Sunday 27 September 2015 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by johansson »

After a lot of trying and retrying I was finally able to get the plugin up and running (figuring our how to make the missing Command -switch appeared was quite a pain in the a**; maybe that should be added into the wiki?).

Anyhow, as mentioned the plugin was fired up yesterday and the command switch appeared, but for some reason the connection to my RM3 mini is gone this morning. Log shows just an error

Code: Select all

Error: (Broadlink) Error Connecting to Broadlink device....192.168.x.x
The IP and mac address are correct, plugin.py is version 4.2, broadlink is version 0.13.1., hardware setup below. Any pointers what to do, how to proceed? Thanks in advance.
Screen Shot 2020-04-17 at 16.56.37.png
Screen Shot 2020-04-17 at 16.56.37.png (73.77 KiB) Viewed 4068 times
knielen
Posts: 46
Joined: Sunday 10 September 2017 9:45
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by knielen »

johansson wrote: Friday 17 April 2020 15:59 After a lot of trying and retrying I was finally able to get the plugin up and running (figuring our how to make the missing Command -switch appeared was quite a pain in the a**; maybe that should be added into the wiki?).

Anyhow, as mentioned the plugin was fired up yesterday and the command switch appeared, but for some reason the connection to my RM3 mini is gone this morning. Log shows just an error

Code: Select all

Error: (Broadlink) Error Connecting to Broadlink device....192.168.x.x
The IP and mac address are correct, plugin.py is version 4.2, broadlink is version 0.13.1., hardware setup below. Any pointers what to do, how to proceed? Thanks in advance.

Screen Shot 2020-04-17 at 16.56.37.png
Check the last 3 posts :)
johansson
Posts: 75
Joined: Sunday 27 September 2015 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by johansson »

knielen, you're suggesting that older version of broadlink would solve the connection issues as well? The issues in last few posts differ slightly from my errors, but obviously that's an easy one to check.

Will try and revert - thanks.
johansson
Posts: 75
Joined: Sunday 27 September 2015 15:52
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Finland
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by johansson »

knielen wrote: Friday 17 April 2020 20:46 Check the last 3 posts :)
Wow, it did work :o Would have never guessed, but at least the first commands are now learnt. Thanks knielen.
desertdog
Posts: 84
Joined: Sunday 14 August 2016 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by desertdog »

I still keep getting: 2020-04-21 07:35:37.309 Error: (Broadlink Remote) Error Connecting to Broadlink device....192.168.1.51
This error message is every two minutes in my error log. The firing of IR command from the Broadlink device happens sometimes, but often nothing happens.

I tried the former suggested solution, with the older plugin version, but it seems I already had that. IS there a solution to the connection problem (it does seem to respond to ping all the time) or do I have to set up the IR firing commands in a way they are repeated for a minute?

Code: Select all

pi@raspberrypi:~ $ sudo pip3 uninstall broadlink
Not uninstalling broadlink at /usr/lib/python3.7, outside environment /usr
Can't uninstall 'broadlink'. No files were found to uninstall.
pi@raspberrypi:~ $ sudo -H pip3 install broadlink==0.10
Requirement already satisfied: broadlink==0.10 in /usr/lib/python3.7 (0.10)
Requirement already satisfied: PyCRC in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (0.9.2)
Requirement already satisfied: pyaes==1.6.0 in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (1.6.0)
pi@raspberrypi:~ $ sudo cp -r /usr/local/lib/python3.7/dist-packages/broadlink-0.10.dist-info/ /usr/lib/python3.7/
pi@raspberrypi:~ $ cd /usr/lib/python3.7
pi@raspberrypi:/usr/lib/python3.7 $ ls -la
-rw-r--r--  1 root root   2557 Dec 20 19:57 bisect.py
-rw-r--r--  1 root root   1801 Dec 20 19:57 _bootlocale.py
drwxr-xr-x  2 root root   4096 Apr  2 10:16 broadlink-0.10.dist-info
-rw-r--r--  1 root root  12410 Dec 20 19:57 bz2.py
-rw-r--r--  1 root root  24826 Dec 20 19:57 calendar.py
dheuts
Posts: 65
Joined: Monday 25 March 2019 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Brunssum, Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by dheuts »

Good afternoon,

I ordered a new RM Mini 3, but unfortunately this plugin is not working on it anymore. It seems Broadlink made a new version of the product. Also the newer RM Mini4 is not working at all anymore.
Please check: https://github.com/home-assistant/core/pull/32523

The Home Assistent plugin was also not working anymore, and they seem to explain te solution on this link. Maybe someone know what to do to fix it for Domoticz also? Would be great! THanks a lot in advance!
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
desertdog
Posts: 84
Joined: Sunday 14 August 2016 13:45
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.1
Location: Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by desertdog »

As a workaround I did the following:

You can add the BroadLink to IFTTT. So when I want to trigger the BroadLink I just sent a Web book link to IFTTT triggered by Domoticz. Of course you have to rely on a working Internet connection and that I FTTT is not down. But I haven’t run into problems yet
dheuts
Posts: 65
Joined: Monday 25 March 2019 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Brunssum, Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by dheuts »

Thanks for sharing your workaround.
Since this morning, my other 3 Broadlink are also not working anymore. I think there is a problem in the New firmware and it was not the New device.... Anyone else having problems?
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by Gerwin »

hello.
here working the broadlink's great ,have you update the broadlink devices ??
Gerwin
torM6
Posts: 18
Joined: Tuesday 29 May 2018 18:11
Target OS: NAS (Synology & others)
Domoticz version: 3.9390
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by torM6 »

I think that in plugin_send.py we have a problem.
in line 51 we need to change devtype from symbolic name of device to its number from broadlink python module rm function where for RM2 plus we have to give a code 0x272a
then at least it will work for latest version of broadlink python:

Code: Select all

        #device = broadlink.rm(host=(brohost,80), mac=bytearray.fromhex(bromac), devtype = 'RM2')
        device = broadlink.rm(host=(brohost,80), mac=bytearray.fromhex(bromac), devtype = 0x272a )
I change this and it start working with my current py 3.7.7
this I do not change in my domoticz instance, anyway it seems to require changes as well
also in main plugin.py we have a code

Code: Select all

        if (Parameters["Mode3"] == 'RM2T'  or Parameters["Mode3"] == 'RM2'):
            device = broadlink.rm(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"])
        elif (Parameters["Mode3"] == 'A1'):
            device = broadlink.a1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"])
        elif (Parameters["Mode3"] == 'SP1'):
            device = broadlink.sp1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"])
        elif (Parameters["Mode3"] == 'SP2' or Parameters["Mode3"] == 'SP3S'):
            device = broadlink.sp2(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"])
        elif (Parameters["Mode3"] == 'MP1'):
            device = broadlink.mp1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = Parameters["Mode3"])
probably we need to change it to code (while some models do have a different numbers for different vendors, which could be incorrect, I never try)

Code: Select all

       if (Parameters["Mode3"] == 'RM2T'  or Parameters["Mode3"] == 'RM2'):
            device = broadlink.rm(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = 0x272a)
        elif (Parameters["Mode3"] == 'A1'):
            device = broadlink.a1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = 0x2714)
        elif (Parameters["Mode3"] == 'SP1'):
            device = broadlink.sp1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = 0)
        elif (Parameters["Mode3"] == 'SP2' or Parameters["Mode3"] == 'SP3S'):
            device = broadlink.sp2(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = 0x2711)
        elif (Parameters["Mode3"] == 'MP1'):
            device = broadlink.mp1(host=(Parameters["Address"],80), mac=bytearray.fromhex(Parameters["Mode1"]), devtype = 0x4EB5)
dheuts
Posts: 65
Joined: Monday 25 March 2019 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Brunssum, Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by dheuts »

Gerwin wrote: Sunday 26 April 2020 14:20 hello.
here working the broadlink's great ,have you update the broadlink devices ??
Gerwin
Thanks for your response. I didnt manually update the devices. But maybe the IHC app does it automatically? I see they have firmware v44057.

I tested a lot because I didnt get the new one working, and after that also the old ones are not working anymore. Tried to update the Broadlink package, tried to downgrade it again, etc. Now on all of the devices Domoticz shows me: Error Connecting to Broadlink device..... Also sometimes I see this kind of errors in the Domoticz log:
"Error: Zolder Broadlink Overloop hardware (17) thread seems to have ended unexpectedly"

When trying to uninstall Broadlink (sudo pip3 uninstall broadlink), I got the message:
Found existing installation: broadlink 0.10
Not uninstalling broadlink at /usr/lib/python3.7, as it is in the standard library.
Can't uninstall 'broadlink'. No files were found to uninstall.

When trying to install Broadlink 0.10 (sudo -H pip3 install broadlink==0.10), I got the message:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: broadlink==0.10 in /usr/lib/python3.7 (0.10)
Requirement already satisfied: PyCRC in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (0.9.2)
Requirement already satisfied: pycryptodome==3.6.6 in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (3.6.6)

pip3 list now gives me:

Code: Select all

asn1crypto    0.24.0
bluepy        1.3.0
broadlink     0.10
certifi       2018.8.24
cffi          1.14.0
chardet       3.0.4
click         7.1.1
cryptography  2.9.2
entrypoints   0.3
Flask         1.1.1
idna          2.6
itsdangerous  1.1.0
Jinja2        2.11.1
MarkupSafe    1.1.1
Naked         0.1.31
paho-mqtt     1.5.0
pip           20.0.2
pyaes         1.6.1
pycparser     2.20
pycrc         0.9.2
pycryptodome  3.6.6
PyGObject     3.30.4
python-apt    1.8.4.1
pyxdg         0.25
PyYAML        5.3.1
requests      2.21.0
retrying      1.3.3
setuptools    40.8.0
shellescape   3.8.1
six           1.12.0
ssh-import-id 5.7
sslpsk        1.0.0
tornado       6.0.4
urllib3       1.24.1
Werkzeug      1.0.0
wheel         0.32.3
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
fvdp80
Posts: 69
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by fvdp80 »

I'm trying to import an ini file from another Domoticz install.
I put the ini file (IMP-15.ini) in the import folder, but when trying to import the log shows:

Code: Select all

20-04-29 12:13:21.413 (Bios IR Controller) Pushing 'onCommandCallback' on to queue
2020-04-29 12:13:21.442 (Bios IR Controller) Processing 'onCommandCallback' message
2020-04-29 12:13:21.443 (Bios IR Controller) Calling message handler 'onCommand'.
2020-04-29 12:13:21.443 (Bios IR Controller) onCommand called for Unit 255: Parameter 'Set Level', Level: 30 , Connected : True
[b]2020-04-29 12:13:21.448 (Bios IR Controller) No ini files found[/b]
2020-04-29 12:13:21.449 (Bios IR Controller - Import) Updating device from 0:'Off' to have values 0:'Off'.
2020-04-29 12:13:21.473 (Bios IR Controller) Update 0:'Off' (Bios IR Controller - Import)
2020-04-29 12:13:21.412 Status: User: Admin initiated a switch command (97/Bios IR Controller - Import/Set Level)
Ini file:

Code: Select all

[DEFAULT]
pluginkey = BroadlinkRM2
hardwareid = 11
unit = 15
pluginname = Bios IR Controller
pluginfolder = /home/pi/domoticz/plugins/broadlink/
customname =
[Device]
host = 10.0.1.x
mac = xxxxxxxxxxxx
[LearnedCode]
15 = b21634000a1d0b0001290b1d0b1d1e0a1e0a0b1d1e0a1e0a1e0a0b1d1e0a1e0a0b1d0b1d0b1d1e0a0b1d0b1d0b1d0b1d1e0a1f0a0a1d1e0a00000000
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

@fvdp80

you need to be sure that you have enough right on this folder (read/write/delete) and files:
/home/pi/domoticz/plugins/broadlink/import
fvdp80
Posts: 69
Joined: Tuesday 14 August 2018 8:22
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.10303
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by fvdp80 »

@zak45

Rights are all set to 777, so that shouldn't be the problem.
dheuts
Posts: 65
Joined: Monday 25 March 2019 15:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Brunssum, Netherlands
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by dheuts »

Fixed it by manually removing the Broadlink files and folders. Was installed in 2 different folders.
After reinstalling Broadlink 0.10 it was working again.
dheuts wrote: Monday 27 April 2020 9:39
Gerwin wrote: Sunday 26 April 2020 14:20 hello.
here working the broadlink's great ,have you update the broadlink devices ??
Gerwin
Thanks for your response. I didnt manually update the devices. But maybe the IHC app does it automatically? I see they have firmware v44057.

I tested a lot because I didnt get the new one working, and after that also the old ones are not working anymore. Tried to update the Broadlink package, tried to downgrade it again, etc. Now on all of the devices Domoticz shows me: Error Connecting to Broadlink device..... Also sometimes I see this kind of errors in the Domoticz log:
"Error: Zolder Broadlink Overloop hardware (17) thread seems to have ended unexpectedly"

When trying to uninstall Broadlink (sudo pip3 uninstall broadlink), I got the message:
Found existing installation: broadlink 0.10
Not uninstalling broadlink at /usr/lib/python3.7, as it is in the standard library.
Can't uninstall 'broadlink'. No files were found to uninstall.

When trying to install Broadlink 0.10 (sudo -H pip3 install broadlink==0.10), I got the message:
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: broadlink==0.10 in /usr/lib/python3.7 (0.10)
Requirement already satisfied: PyCRC in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (0.9.2)
Requirement already satisfied: pycryptodome==3.6.6 in /usr/local/lib/python3.7/dist-packages (from broadlink==0.10) (3.6.6)

pip3 list now gives me:

Code: Select all

asn1crypto    0.24.0
bluepy        1.3.0
broadlink     0.10
certifi       2018.8.24
cffi          1.14.0
chardet       3.0.4
click         7.1.1
cryptography  2.9.2
entrypoints   0.3
Flask         1.1.1
idna          2.6
itsdangerous  1.1.0
Jinja2        2.11.1
MarkupSafe    1.1.1
Naked         0.1.31
paho-mqtt     1.5.0
pip           20.0.2
pyaes         1.6.1
pycparser     2.20
pycrc         0.9.2
pycryptodome  3.6.6
PyGObject     3.30.4
python-apt    1.8.4.1
pyxdg         0.25
PyYAML        5.3.1
requests      2.21.0
retrying      1.3.3
setuptools    40.8.0
shellescape   3.8.1
six           1.12.0
ssh-import-id 5.7
sslpsk        1.0.0
tornado       6.0.4
urllib3       1.24.1
Werkzeug      1.0.0
wheel         0.32.3
Raspberry Pi 4 With Domoticz - RFXCom - Tuya Wifi LED lights - Chuango Alarm - Zwave+ - Zigbee2MQTT - Anna Thermostat - Broadlink IR, P1 - Eufy Robo Vacuum - Worx Robo Mower
jaaap
Posts: 59
Joined: Sunday 28 July 2019 22:59
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by jaaap »

desertdog wrote: Wednesday 01 April 2020 15:05 Hi,

I am trying to install the Broadlink Plugin (version: 0.13.0).
All goes well until after the discover switch and entering IP address and mac address.

There are two new Switches created 'Broadlink RMmini3 - Import' and 'Broadlink RMmini3 - Remote',
but the 'Broadlink RMmini3 - Command' isn't.

When i click the " - Remote" switch I get in the log:
ini file not found: /home/pi/domoticz/plugins/BroadlinkRM2/BroadlinkRM2-10-254.ini

When I click " - Import"- Webstart: the log:
2020-04-01 15:02:12.634 Error: (Broadlink RMmini3) /home/pi/domoticz/plugins/BroadlinkRM2/plugin_http.sh 0.0.0.0 9000 /home/pi/domoticz/plugins/BroadlinkRM2
2020-04-01 15:02:12.669 Error: (Broadlink RMmini3) Not able to start Webserver

When I click " - Generate"- Webstart: the log:
2020-04-01 15:03:30.610 Error: (Broadlink RMmini3) 'onCommand' failed 'FileNotFoundError'.
2020-04-01 15:03:30.610 Error: (Broadlink RMmini3) ----> Line 265 in '/home/pi/domoticz/plugins/BroadlinkRM2/plugin.py', function onCommand
2020-04-01 15:03:30.610 Error: (Broadlink RMmini3) ----> Line 825 in '/home/pi/domoticz/plugins/BroadlinkRM2/plugin.py', function createIniImport

I have read back this thread until 1,5 years ago, but can't find anything on this. except for faulty beta versions or out of date OS problems. I am running latest and stable versions of all.

The log also show a lot of "2020-04-01 15:05:16.058 Error: (Broadlink RMmini3) Error Connecting to Broadlink device....192.168.1.51", but the deviuce is up when i ping
I can't get it to work either, tried everything, but keep getting:

Code: Select all

2020-05-04 16:55:30.019 Error: (Broadlink1) 127
2020-05-04 16:55:30.019 Error: (Broadlink1) /home/pi/domoticz/plugins/BroadlinkRM2/plugin_http.sh 0.0.0.0 8889 /home/pi/domoticz/plugins/BroadlinkRM2/
2020-05-04 16:55:30.020 Error: (Broadlink1) None
2020-05-04 16:55:30.058 Error: (Broadlink1) Not able to start Web server
My main goal is to get the RF controls (which work in the IHC app) to Domoticz. Anyone knows if this is possible? And how? I've a RM Pro with broadlink plugin 0.10 installed
zak45
Posts: 952
Joined: Sunday 22 January 2017 11:37
Target OS: Windows
Domoticz version: V2024.4
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by zak45 »

jaaap wrote: Monday 04 May 2020 16:59 My main goal is to get the RF controls (which work in the IHC app) to Domoticz. Anyone knows if this is possible? And how? I've a RM Pro with broadlink plugin 0.10 installed
RF control not yet managed on this release (v4), should be in v5,... when had some times to finish it... :roll:
jaaap
Posts: 59
Joined: Sunday 28 July 2019 22:59
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Python Plugin : Broadlink RM2 V4

Post by jaaap »

Thanks zak45. My apologies for my impatience. I don't think my coding skills are an addition to your project. However, I'm much willing to help you test your hard work. Please let me know if I can be of any assistance.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest