Python Plugin: Broadlink RM2 V3
Moderator: leecollings
Re: Python Plugin: Broadlink RM2 V3
I can not believe it.I installed the x64 versions of Python.
The wiki was also specified to use x86.
Shame for me!
Now with Python 3.5.3 x86 I installed everything and the devices appeared.
Tonight I try to configure the various actions, I hope I have no problems anymore.
Thank you Zak and sorry for the trouble
The wiki was also specified to use x86.
Shame for me!
Now with Python 3.5.3 x86 I installed everything and the devices appeared.
Tonight I try to configure the various actions, I hope I have no problems anymore.
Thank you Zak and sorry for the trouble
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Happy you have it working .. enjoy !Andree wrote:I can not believe it.I installed the x64 versions of Python.
The wiki was also specified to use x86.
Shame for me!
Now with Python 3.5.3 x86 I installed everything and the devices appeared.
Tonight I try to configure the various actions, I hope I have no problems anymore.
Thank you Zak and sorry for the trouble
Re: Python Plugin: Broadlink RM2 V3
Many thanks Zak, it works perfectly with both of my Broadlink RM Mini 3.
Thx for your work!
Thx for your work!
-
- Posts: 7
- Joined: Saturday 29 April 2017 15:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.587
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Hi, after some quick diagnostic assistance.
I've got the Broadlink configured (successfully I assume) within my Domoticz. I can use it through the Android bridge, so I know the IP address, MAC address etc. are all correct.
However, within Domoticz, it doesn't appear to work. So I went to the Linux shell and executed the plugin_send.py against some INI files that I know have correct codes, but nothing happens. It doesn't even make the Broadlink orange light come on, yet the IP and MAC are correct.
Anyone know how else I can diagnose this? I've put various print commands within the .py and confirm that the python script is working and with all the right variables. I've downloaded the plugin_send.py again in case it has been updated, but a diff shows no changes. Obviously it's never going to work within Domoticz if I can't run it from the command line, but I'm at a loss why it's not working.
I've tried:
python3 plugin_send.py ini/BroadlinkRM2-7-34.ini
sudo python3 plugin_send.py ini/BroadlinkRM2-7-34.ini
Neither has any effect. This is the last part in getting this plugin to work so I'm really frustrated I'm probably missing something obvious!
Anyone have any thoughts how I can fix/diagnose this?
Thanks so much.
Here are the log lines when I invoke a button press: from the logs, you'd think it was working, but the RM2 never receives it (it doesn't light up, for example...)
2017-07-18 01:18:30.608 User: Admin initiated a switch command (192/BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed/On)
2017-07-18 01:18:30.658 (BroadlinkRM2 Lounge) Code Sent....
2017-07-18 01:18:30.658 (BroadlinkRM2 Lounge) Command line : "/home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py" /home/pi/domoticz/plugins/BroadlinkRM2/ini/BroadlinkRM2-7-34.ini
2017-07-18 01:18:30.658 (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed) Updating device from 1:'On-9' to have values 1:'On-10'.
2017-07-18 01:18:30.673 (BroadlinkRM2 Lounge) Update 1:'On-10' (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed)
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) Calling message handler 'onCommand'.
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) onCommand called for Unit 34: Parameter 'On', Level: 0 , Connected : True
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) Generate on Command for learned code stored on unit :34
2017-07-18 01:18:30.679 (BroadlinkRM2 Lounge) Code loaded : 26009600124113403c173c16124113403c173c17124112403d163c173c1711413d161241134012413c163c173c1712413c17120002da134013403b183c17124013403c173c17124013403c173d163b1811413d161340134012413c173c163c1713403b18120002da134012413c183b17124013403c173c17114212403d163d163b1811423c161241134013403b183b173c1712413b1812000d050000
2017-07-18 01:18:30.740 (BroadlinkRM2 Lounge) Connected to Broadlink device.
2017-07-18 01:18:30.741 (BroadlinkRM2 Lounge) b'&\x00\x96\x00\x12A\x13@<\x17<\x16\x12A\x13@<\x17<\x17\x12A\x12@=\x16<\x17<\x17\x11A=\x16\x12A\x13@\x12A<\x16<\x17<\x17\x12A<\x17\x12\x00\x02\xda\x13@\x13@;\x18<\x17\x12@\x13@<\x17<\x17\x12@\x13@<\x17=\x16;\x18\x11A=\x16\x13@\x13@\x12A<\x17<\x16<\x17\x13@;\x18\x12\x00\x02\xda\x13@\x12A<\x18;\x17\x12@\x13@<\x17<\x17\x11B\x12@=\x16=\x16;\x18\x11B<\x16\x12A\x13@\x13@;\x18;\x17<\x17\x12A;\x18\x12\x00\r\x05\x00\x00'
2017-07-18 01:18:31.453 (BroadlinkRM2 Lounge) Code Sent....
2017-07-18 01:18:31.453 (BroadlinkRM2 Lounge) Command line : "/home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py" /home/pi/domoticz/plugins/BroadlinkRM2/ini/BroadlinkRM2-7-34.ini
2017-07-18 01:18:31.454 (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed) Updating device from 1:'On-10' to have values 1:'On-11'.
I've got the Broadlink configured (successfully I assume) within my Domoticz. I can use it through the Android bridge, so I know the IP address, MAC address etc. are all correct.
However, within Domoticz, it doesn't appear to work. So I went to the Linux shell and executed the plugin_send.py against some INI files that I know have correct codes, but nothing happens. It doesn't even make the Broadlink orange light come on, yet the IP and MAC are correct.
Anyone know how else I can diagnose this? I've put various print commands within the .py and confirm that the python script is working and with all the right variables. I've downloaded the plugin_send.py again in case it has been updated, but a diff shows no changes. Obviously it's never going to work within Domoticz if I can't run it from the command line, but I'm at a loss why it's not working.
I've tried:
python3 plugin_send.py ini/BroadlinkRM2-7-34.ini
sudo python3 plugin_send.py ini/BroadlinkRM2-7-34.ini
Neither has any effect. This is the last part in getting this plugin to work so I'm really frustrated I'm probably missing something obvious!
Anyone have any thoughts how I can fix/diagnose this?
Thanks so much.
Here are the log lines when I invoke a button press: from the logs, you'd think it was working, but the RM2 never receives it (it doesn't light up, for example...)
2017-07-18 01:18:30.608 User: Admin initiated a switch command (192/BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed/On)
2017-07-18 01:18:30.658 (BroadlinkRM2 Lounge) Code Sent....
2017-07-18 01:18:30.658 (BroadlinkRM2 Lounge) Command line : "/home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py" /home/pi/domoticz/plugins/BroadlinkRM2/ini/BroadlinkRM2-7-34.ini
2017-07-18 01:18:30.658 (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed) Updating device from 1:'On-9' to have values 1:'On-10'.
2017-07-18 01:18:30.673 (BroadlinkRM2 Lounge) Update 1:'On-10' (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed)
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) Calling message handler 'onCommand'.
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) onCommand called for Unit 34: Parameter 'On', Level: 0 , Connected : True
2017-07-18 01:18:30.674 (BroadlinkRM2 Lounge) Generate on Command for learned code stored on unit :34
2017-07-18 01:18:30.679 (BroadlinkRM2 Lounge) Code loaded : 26009600124113403c173c16124113403c173c17124112403d163c173c1711413d161241134012413c163c173c1712413c17120002da134013403b183c17124013403c173c17124013403c173d163b1811413d161340134012413c173c163c1713403b18120002da134012413c183b17124013403c173c17114212403d163d163b1811423c161241134013403b183b173c1712413b1812000d050000
2017-07-18 01:18:30.740 (BroadlinkRM2 Lounge) Connected to Broadlink device.
2017-07-18 01:18:30.741 (BroadlinkRM2 Lounge) b'&\x00\x96\x00\x12A\x13@<\x17<\x16\x12A\x13@<\x17<\x17\x12A\x12@=\x16<\x17<\x17\x11A=\x16\x12A\x13@\x12A<\x16<\x17<\x17\x12A<\x17\x12\x00\x02\xda\x13@\x13@;\x18<\x17\x12@\x13@<\x17<\x17\x12@\x13@<\x17=\x16;\x18\x11A=\x16\x13@\x13@\x12A<\x17<\x16<\x17\x13@;\x18\x12\x00\x02\xda\x13@\x12A<\x18;\x17\x12@\x13@<\x17<\x17\x11B\x12@=\x16=\x16;\x18\x11B<\x16\x12A\x13@\x13@;\x18;\x17<\x17\x12A;\x18\x12\x00\r\x05\x00\x00'
2017-07-18 01:18:31.453 (BroadlinkRM2 Lounge) Code Sent....
2017-07-18 01:18:31.453 (BroadlinkRM2 Lounge) Command line : "/home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py" /home/pi/domoticz/plugins/BroadlinkRM2/ini/BroadlinkRM2-7-34.ini
2017-07-18 01:18:31.454 (BroadlinkRM2 Unit 1 - 7-34 Sort in order Fan On/Speed) Updating device from 1:'On-10' to have values 1:'On-11'.
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Hi Guys,
I made new installation of domoticz on Rpi after instant crashing last weeks. For few days I was testing with all my hardware and its now stable. Now Im trying to install the most important thing and Im desperate.
I installed Python 3.4.2. and everything was running as should. Than I installed Broadlink
and copied files into domoticz/plugins/BroadlinkRM2
after reboot i cant connect to domoticz via browser at all
When Im runnig domoticz via ssh ./domoticz, it starts to load everything till it comes to Broadlink version 3.0.0 and its over.
I tried everything what I could find on forum but no effect
As soon I rename plugin.py in domoticz/plugins folder domoticz is running wit error message
Can someone help me please?
I made new installation of domoticz on Rpi after instant crashing last weeks. For few days I was testing with all my hardware and its now stable. Now Im trying to install the most important thing and Im desperate.
I installed Python 3.4.2. and everything was running as should. Than I installed Broadlink
Code: Select all
sudo pip3 install Crypto
sudo pip3 install broadlink
sudo pip3 install pyaes
sudo cp -r /usr/local/lib/python3.4/dist-packages/Crypto/ /usr/lib/python3.4/
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
Code: Select all
plugin_send.py
plugin_send.cmd
plugin_http.py
plugin_http.cmd
When Im runnig domoticz via ssh ./domoticz, it starts to load everything till it comes to Broadlink version 3.0.0 and its over.
I tried everything what I could find on forum but no effect
Code: Select all
cd /home/pi
sudo rm -r /usr/local/lib/python3.4/dist-packages/broadlink*
git clone https://github.com/mjg59/python-broadlink
sudo pip3 install python-broadlink/
sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink /usr/lib/python3.4/
sudo systemctl restart domoticz.service
Code: Select all
2017-07-22 22:26:00.252 Error: (BroadlinkRM2) failed to load 'plugin.py', Python Path used was ':/usr/lib/python3.4/:/usr/lib/python3.4/plat-arm-linux-gnueabihf:/usr/lib/python3.4/lib-dynload'.
2017-07-22 22:26:00.252 Error: (Broadlink) Module Import failed, exception: 'ImportError'
2017-07-22 22:26:00.252 Error: (Broadlink) Module Import failed: ' Name: plugin'
2017-07-22 22:27:00.501 Error: Broadlink hardware (13) thread seems to have ended unexpectedly
Can someone help me please?
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
-
- Posts: 952
- Joined: Sunday 22 January 2017 11:37
- Target OS: Windows
- Domoticz version: V2024.4
- Contact:
Re: Python Plugin: Broadlink RM2 V3
@michaldobrotka
you have installed pyaes
do you have also copy it ???
sudo cp -r /usr/local/lib/python3.4/dist-packages/pyaes/ /usr/lib/python3.4/
FYI: you need only Crypto or pyaes, both are not necessary on v3
you have installed pyaes
do you have also copy it ???
sudo cp -r /usr/local/lib/python3.4/dist-packages/pyaes/ /usr/lib/python3.4/
FYI: you need only Crypto or pyaes, both are not necessary on v3
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Python Plugin: Broadlink RM2 V3
HI @zak45
Thanks for your respond,
I just copied it but no change, after that i uninstalled Crypto but still same error.
Thanks for your respond,
I just copied it but no change, after that i uninstalled Crypto but still same error.
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Hi @zak45,
Yesterday after I updated to latest beta I tried It again. I was able to run the plugin, even to configure Broadlink device, and I added one remote command for test. I restarted device and no error occurred. I went to bed. This morning I checked Domoticz and it was down again. It lasted not even one hour running.
Yesterday after I updated to latest beta I tried It again. I was able to run the plugin, even to configure Broadlink device, and I added one remote command for test. I restarted device and no error occurred. I went to bed. This morning I checked Domoticz and it was down again. It lasted not even one hour running.
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
Re: Python Plugin: Broadlink RM2 V3
I couldn't get this to work on my rpi - i am currently trying to see if python 3.6.2 compiled from source will help.
While waiting forever for it to compile, I moved my Domoticz installation to a different machine (24c xeon running Ubuntu 16.04 lts) and it is working perfectly. Thank you so much, @zak45
I basically used your import functionality and learn mode to map my AC remote in excel and then wrote a quick vba script to create the ini files. I tested them in the CLI and it worked.
Last step is to write the lua to combine the AC Setpoint value with a selector switch (e.g. Off, ac fan low, ac fan high, fan only med) to trigger the right IR command.
Is there anyway to so multiple IR commands in one INI file?
Sent from my SM-G955U using Tapatalk
While waiting forever for it to compile, I moved my Domoticz installation to a different machine (24c xeon running Ubuntu 16.04 lts) and it is working perfectly. Thank you so much, @zak45
I basically used your import functionality and learn mode to map my AC remote in excel and then wrote a quick vba script to create the ini files. I tested them in the CLI and it worked.
Last step is to write the lua to combine the AC Setpoint value with a selector switch (e.g. Off, ac fan low, ac fan high, fan only med) to trigger the right IR command.
Is there anyway to so multiple IR commands in one INI file?
Sent from my SM-G955U using Tapatalk
-
- Posts: 59
- Joined: Tuesday 07 October 2014 11:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: stable
- Location: France RA
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Hi,
I have a problem with plugin_send.py in standalone
thank you
I have a problem with plugin_send.py in standalone
Code: Select all
Traceback (most recent call last):
File "domoticz/plugins/Broadlink/plugin_send.py", line 15, in <module>
import configparser
ImportError: No module named configparser
Code: Select all
pip install configparser
Requirement already satisfied: configparser in /usr/local/lib/python3.4/dist-packages
RPi2 + RFLink, Domoticz
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Re: Python Plugin: Broadlink RM2 V3
jackslayter wrote:Hi,
I have a problem with plugin_send.py in standalone
Code: Select all
Traceback (most recent call last): File "domoticz/plugins/Broadlink/plugin_send.py", line 15, in <module> import configparser ImportError: No module named configparser
thank youCode: Select all
pip install configparser Requirement already satisfied: configparser in /usr/local/lib/python3.4/dist-packages
can you try the command below?
Code: Select all
pip3 install configparser
- michaldobrotka
- Posts: 50
- Joined: Sunday 01 November 2015 17:21
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Yesterday I uninstalled broadlink and pyaes and installed all new.
Added Broadlink in hardware an recorded some commands. Everything was working just fine, no errors, no delays, no cpu increase until I restarted domoticz. Then again no connection to system via browser.
Is someone who installed broadlink recently on raspi got it working on python 3.4.2?
Thanks
Added Broadlink in hardware an recorded some commands. Everything was working just fine, no errors, no delays, no cpu increase until I restarted domoticz. Then again no connection to system via browser.
Is someone who installed broadlink recently on raspi got it working on python 3.4.2?
Thanks
Domoticz on Raspi 3 and slave on ZeroW (running only with Broadlink plugin), Serial Mysensors GW on Arduino nano, Broadlink RM2, Rehau CO2 USB Stick, RF link 433 MHz, 2x Amazon Echo Dot (Controlicz), ESP2866 witk Espeasy, Sonoff
-
- Posts: 59
- Joined: Tuesday 07 October 2014 11:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: stable
- Location: France RA
- Contact:
Re: Python Plugin: Broadlink RM2 V3
yes at firstPaint wrote:jackslayter wrote:Hi,
I have a problem with plugin_send.py in standalone
Code: Select all
Traceback (most recent call last): File "domoticz/plugins/Broadlink/plugin_send.py", line 15, in <module> import configparser ImportError: No module named configparser
thank youCode: Select all
pip install configparser Requirement already satisfied: configparser in /usr/local/lib/python3.4/dist-packages
can you try the command below?
Code: Select all
pip3 install configparser
RPi2 + RFLink, Domoticz
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Re: Python Plugin: Broadlink RM2 V3
try using it on V3.5 or greater of Python. For RPI, you will need to manually compile it.michaldobrotka wrote:Yesterday I uninstalled broadlink and pyaes and installed all new.
Added Broadlink in hardware an recorded some commands. Everything was working just fine, no errors, no delays, no cpu increase until I restarted domoticz. Then again no connection to system via browser.
Is someone who installed broadlink recently on raspi got it working on python 3.4.2?
Thanks
You can also try making the following change to the plugin.py, as per the wiki:
developer info
this code : learnedCommand=str(ir_packet.hex()) is pecific to python 3.5 or >, not work on 3.4
replaced by : learnedCommand=str(codecs.encode(ir_packet, 'hex_codec')) ( & import codecs ) to have it running in 3.x
-
- Posts: 59
- Joined: Tuesday 07 October 2014 11:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: stable
- Location: France RA
- Contact:
Re: Python Plugin: Broadlink RM2 V3
Hi,
it's possible to learn code in standalone, like send ?
thx
it's possible to learn code in standalone, like send ?
thx
RPi2 + RFLink, Domoticz
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Chacon - micromodule 200w, remote 3b, 2x module 1000w, remote 16b, smoke detector, door contact, 2x 3500w plug
Oregon - 3x Thgr122Nx / OWL - CM180 / TRC02_2 RGB / Cheap - PiR, door contact, Temp Hum / 4x REVOLT NC5461
Re: Python Plugin: Broadlink RM2 V3
At the moment, all learning has to be done via the broadlink import process or via the widget the plugin creates
Sent from my SM-G955U using Tapatalk
Sent from my SM-G955U using Tapatalk
Re: Python Plugin: Broadlink RM2 V3
My domoticz is crashing and going to offline several times a day after ensbling this plugin. This is the last message in the log before it happens:
2017-07-29 11:10:17.238 Error: (Broadlink) Error getting temperature data from Broadlink device....Timeout
2017-07-29 11:10:17.238 Error: (Broadlink) Error getting temperature data from Broadlink device....Timeout
Re: Python Plugin: Broadlink RM2 V3
Disable the temp sensor on the hardware page in domoticz.petzno wrote:My domoticz is crashing and going to offline several times a day after ensbling this plugin. This is the last message in the log before it happens:
2017-07-29 11:10:17.238 Error: (Broadlink) Error getting temperature data from Broadlink device....Timeout
Sent from my SM-G955U using Tapatalk
Re: Python Plugin: Broadlink RM2 V3
Actually the temp sensor was the main reason I added the plugin, to get the indoor temp.Paint wrote:Disable the temp sensor on the hardware page in domoticz.
Sent from my SM-G955U using Tapatalk
Re: Python Plugin: Broadlink RM2 V3
From my experience, the rm pro temp sensor is the only one that is accurate...and it's not that accurate.petzno wrote:Actually the temp sensor was the main reason I added the plugin, to get the indoor temp.Paint wrote:Disable the temp sensor on the hardware page in domoticz.
Sent from my SM-G955U using Tapatalk
Sent from my SM-G955U using Tapatalk
Who is online
Users browsing this forum: No registered users and 0 guests