Python Plugin: Broadlink RM2 V3

Python and python framework
satanasinc
Posts: 29
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by satanasinc » Sunday 18 March 2018 15:55

zak45 wrote:
Sunday 18 March 2018 14:42
satanasinc wrote:
Saturday 17 March 2018 9:53

Finaly it works in domoticz, or a part at least. The main problem like clement99 says is stable version.
But now i get in the log "2018-03-17 17:26:00.816 Error: (TeleDormitorio) Get Energy error" So i cant see the power consumption.
Someone has solved this problem?.
There is a problem in the version available in pypi. Download the one provided in dropbox : python-broadlink-master-0.6.zip
unzip it, go to the folder and do 'pip install .'
Hi!
Thanx for your help zak45 but it dosent works.
Spoiler: show
pi@ThermoPi2:~/temp $ sudo pip3 install ./python-broadlink-master-0.6.zip
Processing ./python-broadlink-master-0.6.zip
Requirement already satisfied (use --upgrade to upgrade): broadlink==0.6 from file:///home/pi/temp/python-broadlink-master-0.6.zip in /usr/lib/python3.5
Requirement already satisfied: pyaes==1.6.0 in /usr/local/lib/python3.5/dist-packages (from broadlink==0.6)
Building wheels for collected packages: broadlink
Running setup.py bdist_wheel for broadlink ... done
Stored in directory: /root/.cache/pip/wheels/d7/95/09/68c612ba2d7abf4e11fa33d183f3342871447e96f447e49137
Successfully built broadlink
pi@ThermoPi2:~/temp $
Ive tryed to unzip the python-broadlink-master-0.6.zip but idon know to install. Please post the complete command to run the installation.
I triyed pip3 install ./setup.py and sudo pip3 install ./setup.py.

Thanx again a regards

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Sunday 18 March 2018 19:07

satanasinc wrote:
Sunday 18 March 2018 15:55
Ive tryed to unzip the python-broadlink-master-0.6.zip but idon know to install. Please post the complete command to run the installation.
I triyed pip3 install ./setup.py and sudo pip3 install ./setup.py.
yep.. you need to first unzip it.
go to the folder where you have unziped it and where setup.py is located.
type this command:
pip3 install .
--> do not forget the '.' (dot) at the end.

satanasinc
Posts: 29
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by satanasinc » Sunday 18 March 2018 20:45

zak45 wrote:
Sunday 18 March 2018 19:07
satanasinc wrote:
Sunday 18 March 2018 15:55
Ive tryed to unzip the python-broadlink-master-0.6.zip but idon know to install. Please post the complete command to run the installation.
I triyed pip3 install ./setup.py and sudo pip3 install ./setup.py.
yep.. you need to first unzip it.
go to the folder where you have unziped it and where setup.py is located.
type this command:
pip3 install .
--> do not forget the '.' (dot) at the end.
Hi

Thanx again for your help zak45. But it dosent work after reboot the system. Same problem.
Instaling...
Spoiler: show
pi@ThermoPi2:~/temp/python-broadlink-master $ ls
broadlink cli LICENSE protocol.md README.md requirements.txt setup.py
pi@ThermoPi2:~/temp/python-broadlink-master $ sudo pip3 install .
Processing /home/pi/temp/python-broadlink-master
Requirement already satisfied (use --upgrade to upgrade): broadlink==0.6 from file:///home/pi/temp/python-broadlink-master in /usr/lib/python3.5
Requirement already satisfied: pyaes==1.6.0 in /usr/local/lib/python3.5/dist-packages (from broadlink==0.6)
Building wheels for collected packages: broadlink
Running setup.py bdist_wheel for broadlink ... done
Stored in directory: /root/.cache/pip/wheels/86/34/36/c328f1132f0199d4ce05baf0586f255b0775ca7574a245a6df
Successfully built broadlink
pi@ThermoPi2:~/temp/python-broadlink-master $
My Log after installing the update as user and with sudo
Spoiler: show
2018-03-18 19:43:02.748 (TeleDormitorio) Calling message handler 'onHeartbeat'.
2018-03-18 19:43:02.748 (TeleDormitorio) SP3S called
2018-03-18 19:43:02.899 Error: (TeleDormitorio) Get Energy error
2018-03-18 19:43:02.940 (TeleDormitorio) Power state : False
Any other idea?

Thanx an regards

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Sunday 18 March 2018 21:36

satanasinc wrote:
Sunday 18 March 2018 20:45
Processing /home/pi/temp/python-broadlink-master
Requirement already satisfied (use --upgrade to upgrade): broadlink==0.6 from file:///home/pi/temp/python-broadlink-master in /usr/lib/python3.5

Any other idea?
you need to first uninstall broadlink

satanasinc
Posts: 29
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by satanasinc » Monday 19 March 2018 22:51

zak45 wrote:
Sunday 18 March 2018 21:36
satanasinc wrote:
Sunday 18 March 2018 20:45
Processing /home/pi/temp/python-broadlink-master
Requirement already satisfied (use --upgrade to upgrade): broadlink==0.6 from file:///home/pi/temp/python-broadlink-master in /usr/lib/python3.5

Any other idea?
you need to first uninstall broadlink
Hi

Thank you very much zak45. You have solved my problem.
After running
Pip uninstall Broadlink
Pip3 uninstall Broadlink
Sudo pip uninstall Broadlink
Sudo pip3 uninstall Broadlink

And install again the 06 master the unit starts working.

Zak45 thanks again.

Regards

Kruu
Posts: 23
Joined: Tuesday 17 January 2017 21:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Kruu » Tuesday 20 March 2018 19:00

I have domoticz Version: 3.8153

could you help me what to install to get my bean working. I have tryed it and not shure what to uninstall and what to install again.

This all is on my RPI3. Step by step guide to uninstall and install again would be appreciated

satanasinc
Posts: 29
Joined: Monday 19 October 2015 12:15
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by satanasinc » Wednesday 21 March 2018 17:49

Kruu wrote:
Tuesday 20 March 2018 19:00
I have domoticz Version: 3.8153

could you help me what to install to get my bean working. I have tryed it and not shure what to uninstall and what to install again.

This all is on my RPI3. Step by step guide to uninstall and install again would be appreciated
Hi!

First of all run this 4 commands to uninstall old files
Pip uninstall Broadlink
Pip3 uninstall Broadlink
Sudo pip uninstall Broadlink
Sudo pip3 uninstall Broadlink

Now copy to your /home/pi folder and unzip the Python-broadlink-master.0.6.zip file from the shared Dropbox

Then cd to unzipped folder an type ..
pip install . (Don’t forget the final dot .)
And
sudo pip install . (Don’t forget the final dot .) to install the unzipped files.

And finally copy the 4 files from the wiki to the /plugins/Broadlink folder like describes the wiki.
Spoiler: show
download plugin.py [2]

download plugin_send.py [3]

download plugin_http.py [4]

download plugin_http.sh [5]

See technical area on what is necessary.

Once all is ok, restart Domoticz
Good luck

Regaras

Kruu
Posts: 23
Joined: Tuesday 17 January 2017 21:27
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Kruu » Tuesday 27 March 2018 18:42

Dont know, but :

Code: Select all

2018-03-27 18:48:40.549 Error: (bean) check power error
2018-03-27 18:50:29.350 Error: (bean1) Error Connecting to Broadlink device....192.168.1.196
2018-03-27 18:50:38.850 Error: (bean1) Error getting temperature data from Broadlink device....Timeout
2018-03-27 18:50:38.871 Error: (bean1) Error Connecting to Broadlink device....192.168.1.196
2018-03-27 18:51:42.005 Error: (bean1) ini file not found: /home/pi/domoticz/bean/BroadlinkRM2-24-254.ini
:cry:

Xfiles
Posts: 8
Joined: Saturday 31 March 2018 23:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Xfiles » Sunday 22 April 2018 11:18

Hello,

‌I'm not sure if my problem is like other from thist topic. I have installed python, copied files to BroadlinkRM2 folder (like mentioned in wiki). I added new hardware and then Domoticz crashed. Domoticz service was running but page was not responsive. I managed to restore domoticz by doing upgrade to stable version (I use normally beta). After this domoticz started working normally. I removed Broadlink from hardware list and upgraded domoticz to beta version and everything is ok now. What I should do to use Broadlink in beta version of domoticz.

csula
Posts: 3
Joined: Friday 27 April 2018 21:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by csula » Friday 27 April 2018 21:14

I think I've tried almost everything to make it alive, but no success.
I can add the Broadlink as a HW but, the switch element dooes not appear, and no device on the device list.
The log is clean:

Code: Select all

2018-04-27 21:08:36.005 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-04-27 21:08:36.008 Build Hash: 494fff7, Date: 2017-07-30 12:19:41
2018-04-27 21:08:36.010 Startup Path: /home/pi/domoticz/
2018-04-27 21:08:36.247 PluginSystem: Started, Python version '3.5.2'.
2018-04-27 21:08:36.259 Active notification Subsystems: gcm, http (2/12)
2018-04-27 21:08:36.267 WebServer(SSL) started on address: :: with port 443
2018-04-27 21:08:36.270 Proxymanager started.
2018-04-27 21:08:36.272 Starting shared server on: :::6144
2018-04-27 21:08:36.273 TCPServer: shared server started...
2018-04-27 21:08:36.273 RxQueue: queue worker started...
2018-04-27 21:08:38.274 EventSystem: reset all events...
2018-04-27 21:08:38.276 EventSystem: reset all device statuses...
2018-04-27 21:08:38.452 Python EventSystem: Module not found - Trying to initialize.
2018-04-27 21:08:38.455 Python EventSystem: Initalizing event module.
2018-04-27 21:08:38.456 EventSystem: Started
2018-04-27 21:08:38.576 PluginSystem: Entering work loop.
2018-04-27 21:08:39.573 (br) Initialized version 4.1.0, author 'zak45'
I'm using jessie on RPI. Installed py 3.4, 3.5 and even 3.6. Installed everything what was @ BR2 Wiki page.
Tried with stretch too, same sht.

Now I'm completely lost. No error, even in system log, everything installed, but nothing happens after adding HW. I can't add a new switch, because, there is nothing in HW list. What now? Is it possible to keep this thing working?

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Friday 27 April 2018 23:02

csula wrote:
Friday 27 April 2018 21:14
I think I've tried almost everything to make it alive, but no success.
I can add the Broadlink as a HW but, the switch element dooes not appear, and no device on the device list.
The log is clean:

Code: Select all

2018-04-27 21:08:36.005 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-04-27 21:08:36.008 Build Hash: 494fff7, Date: 2017-07-30 12:19:41
2018-04-27 21:08:36.010 Startup Path: /home/pi/domoticz/
2018-04-27 21:08:36.247 PluginSystem: Started, Python version '3.5.2'.
2018-04-27 21:08:39.573 (br) Initialized version 4.1.0, author 'zak45'
I'm using jessie on RPI. Installed py 3.4, 3.5 and even 3.6. Installed everything what was @ BR2 Wiki page.
Tried with stretch too, same sht.

Now I'm completely lost. No error, even in system log, everything installed, but nothing happens after adding HW. I can't add a new switch, because, there is nothing in HW list. What now? Is it possible to keep this thing working?
This is from wiki :

All
Python version 3.x required & Domoticz version 3.90xx or greater.

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Friday 27 April 2018 23:04

Xfiles wrote:
Sunday 22 April 2018 11:18
Hello,

‌I'm not sure if my problem is like other from thist topic. I have installed python, copied files to BroadlinkRM2 folder (like mentioned in wiki). I added new hardware and then Domoticz crashed. Domoticz service was running but page was not responsive. I managed to restore domoticz by doing upgrade to stable version (I use normally beta). After this domoticz started working normally. I removed Broadlink from hardware list and upgraded domoticz to beta version and everything is ok now. What I should do to use Broadlink in beta version of domoticz.
the version 4.x need beta version to run.

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Friday 27 April 2018 23:06

Kruu wrote:
Tuesday 20 March 2018 19:00
I have domoticz Version: 3.8153

could you help me what to install to get my bean working. I have tryed it and not shure what to uninstall and what to install again.

This all is on my RPI3. Step by step guide to uninstall and install again would be appreciated
the last version 4.x need to be on beta

from wiki
All

Python version 3.x required & Domoticz version 3.90xx or greater.

csula
Posts: 3
Joined: Friday 27 April 2018 21:03
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by csula » Saturday 28 April 2018 13:47

All
Python version 3.x required & Domoticz version 3.90xx or greater.
Thanks for quick reply. I've updated to 3.9 with ./updatebeta
If it's possible it's even worst :D
Now, I cant delete the BR hrdware, because the browser tab is stops responding, and the domoticz is unreachable until I restart it.
If I update to intactive happens the same. Any other params are possible to update.
Tried with "old" crosshacked system, and with fresh install too.

But I've found something:
When I tried to run: sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink-0.5-py3.4.egg/broadlink /usr/lib/python3.4/
I've realised there is broadlink-0.8-py3.4.egg only, but no broadlink folder inside. Should I copy the /broadlink-0.8-py3.4.egg to the python3.4?

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Saturday 28 April 2018 16:33

csula wrote:
Saturday 28 April 2018 13:47
When I tried to run: sudo cp -r /usr/local/lib/python3.4/dist-packages/broadlink-0.5-py3.4.egg/broadlink /usr/lib/python3.4/
I've realised there is broadlink-0.8-py3.4.egg only, but no broadlink folder inside. Should I copy the /broadlink-0.8-py3.4.egg to the python3.4?
This is just an example and for broadlink v0.5, of course need to be adapted to your OS/environnement and also version used.
Actual plugin version is 4.1.0 and broadlink version 0.8 ( I see even 0.9 )
For linux, what I had read on the forum, python version 3.4 have less problem. Lots of people have been able to have it running, so no reason that this not work for you, just search on the forum if you have some error. I'm running on Win 10 without any trouble since many months.

User avatar
solidum90
Posts: 43
Joined: Tuesday 01 August 2017 20:59
Target OS: NAS (Synology & others)
Domoticz version: Debian
Location: Milan
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by solidum90 » Monday 11 June 2018 11:42

Hello to everyone,
I've problem with this python plugin.. for example LGTV plugin works.

Since I installed the stable version of domoticz (V3.8153) I have to use version 3.0 of this plugin.
I've a Broadlink RM Mini3, there are logs of domoticz starting:

Code: Select all

2018-06-11 11:27:11.999 Domoticz V3.8153 (c)2012-2017 GizMoCuz
2018-06-11 11:27:11.999 Build Hash: 494fff7, Date: 2017-07-30 12:19:41
2018-06-11 11:27:11.999 Startup Path: /home/pi/domoticz/
2018-06-11 11:27:12.031 Sunrise: 05:34:00 SunSet:21:11:00
2018-06-11 11:27:12.031 EventSystem: reset all events...
2018-06-11 11:27:12.160 PluginSystem: Started, Python version '3.5.3'.
2018-06-11 11:27:12.169 Active notification Subsystems: (0/12)
2018-06-11 11:27:12.170 WebServer(HTTP) started on address: :: with port 8080
2018-06-11 11:27:12.176 WebServer(SSL) started on address: :: with port 443
2018-06-11 11:27:12.177 Proxymanager started.
2018-06-11 11:27:12.179 Starting shared server on: :::6144
2018-06-11 11:27:12.179 TCPServer: shared server started...
2018-06-11 11:27:12.179 RxQueue: queue worker started...
2018-06-11 11:27:14.181 EventSystem: reset all events...
2018-06-11 11:27:14.181 EventSystem: reset all device statuses...
2018-06-11 11:27:14.379 Python EventSystem: Module not found - Trying to initialize.
2018-06-11 11:27:14.379 Python EventSystem: Initalizing event module.
2018-06-11 11:27:14.380 EventSystem: Started
2018-06-11 11:27:14.533 PluginSystem: Entering work loop.
2018-06-11 11:27:14.841 (IR_Living) Initialized version 3.0.0, author 'zak45'
2018-06-11 11:27:14.845 (IR_Living) Debug log level set to: 'true'.
2018-06-11 11:27:14.845 (IR_Living) 'Key':'BroadlinkRM2'
2018-06-11 11:27:14.845 (IR_Living) 'Mode6':'Debug'
2018-06-11 11:27:14.845 (IR_Living) 'Name':'IR_Living'
2018-06-11 11:27:14.845 (IR_Living) 'Version':'3.0.0'
2018-06-11 11:27:14.845 (IR_Living) 'Mode4':'yes'
2018-06-11 11:27:14.845 (IR_Living) 'Mode3':'RM2'
2018-06-11 11:27:14.845 (IR_Living) 'HomeFolder':'/home/pi/domoticz/plugins/BroadlinkRM2/'
2018-06-11 11:27:14.845 (IR_Living) 'Port':'0'
2018-06-11 11:27:14.845 (IR_Living) 'HardwareID':'5'
2018-06-11 11:27:14.845 (IR_Living) 'Author':'zak45'
2018-06-11 11:27:14.845 (IR_Living) 'Mode1':'780F771A3BF9'
2018-06-11 11:27:14.845 (IR_Living) 'Mode2':'/home/pi/domoticz/broadlink_ini'
2018-06-11 11:27:14.845 (IR_Living) 'Mode5':'9000'
2018-06-11 11:27:14.845 (IR_Living) 'Address':'192.168.8.114'
2018-06-11 11:27:14.845 (IR_Living) Device count: 3
2018-06-11 11:27:14.845 (IR_Living) Device: 1 - ID: 43, Name: 'IR_Living - Command', nValue: 0, sValue: 'Off'
2018-06-11 11:27:14.845 (IR_Living) Device ID: '43'
2018-06-11 11:27:14.845 (IR_Living) Device Name: 'IR_Living - Command'
2018-06-11 11:27:14.845 (IR_Living) Device nValue: 0
2018-06-11 11:27:14.845 (IR_Living) Device sValue: 'Off'
2018-06-11 11:27:14.845 (IR_Living) Device LastLevel: 0
2018-06-11 11:27:14.845 (IR_Living) Device: 254 - ID: 44, Name: 'IR_Living - Remote', nValue: 0, sValue: ''
2018-06-11 11:27:14.845 (IR_Living) Device ID: '44'
2018-06-11 11:27:14.845 (IR_Living) Device Name: 'IR_Living - Remote'
2018-06-11 11:27:14.845 (IR_Living) Device nValue: 0
2018-06-11 11:27:14.845 (IR_Living) Device sValue: ''
2018-06-11 11:27:14.845 (IR_Living) Device LastLevel: 0
2018-06-11 11:27:14.845 (IR_Living) Device: 255 - ID: 45, Name: 'IR_Living - Import', nValue: 0, sValue: 'Off'
2018-06-11 11:27:14.845 (IR_Living) Device ID: '45'
2018-06-11 11:27:14.845 (IR_Living) Device Name: 'IR_Living - Import'
2018-06-11 11:27:14.845 (IR_Living) Device nValue: 0
2018-06-11 11:27:14.845 (IR_Living) Device sValue: 'Off'
2018-06-11 11:27:14.845 (IR_Living) Device LastLevel: 0
2018-06-11 11:27:14.846 (IR_Living) Connecting to: 192.168.8.114:780F771A3BF9
2018-06-11 11:27:14.846 Error: (IR_Living) Error Connecting to Broadlink device....
2018-06-11 11:27:14.846 (IR_Living) Device Number begin to : 1
2018-06-11 11:27:14.849 (IR_Living) No ini file :/home/pi/domoticz/broadlink_ini/remote/plugin_remote_5.ini
2018-06-11 11:27:14.849 (IR_Living) Custom Commands for Remote not managed
2018-06-11 11:27:14.849 (IR_Living) Heartbeat interval set to: 30.
But it always say: Error Connecting to Broadlink device....
With e-Control app it works perfect.

if I try to make a LEARN command log says:
2018-06-11 11:21:39.697 (IR_Living) When Broadlink led is lit press the button on your remote within 5 seconds
2018-06-11 11:21:39.697 Error: (IR_Living) 'onCommand' failed 'NameError':'name 'device' is not defined'.
2018-06-11 11:21:39.697 Error: (IR_Living) ----> Line 158 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-06-11 11:21:39.697 Error: (IR_Living) ----> Line 417 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function learn



I have a doubt, my rasp has two network interfaces:
eth0 where it is connected to the internet and a wlan0 where it is connected to the iOT network that has no internet.
The RM3 broadlink is in the iOT network (of course),
from raspberry I correctly ping the broadlink RM3 and it works from the app if I connect my iphone into the iOT wlan.
Is it possible that the plugin can not reach the broadlink for this reason?
Where can I possibly impose to use the wlan0 interface?

Do I have to do something from the Broadlink app to enable the HTTP server?


Thank you very much and congratulations for the excellent work!

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Monday 11 June 2018 12:46

solidum90 wrote:
Monday 11 June 2018 11:42
Hello to everyone,
I've problem with this python plugin.. for example LGTV plugin works.

Since I installed the stable version of domoticz (V3.8153) I have to use version 3.0 of this plugin.
I've a Broadlink RM Mini3, there are logs of domoticz starting:
if you want / need to use V3, you need also broadlink v0.5, this one can be found on the DropBox.

User avatar
solidum90
Posts: 43
Joined: Tuesday 01 August 2017 20:59
Target OS: NAS (Synology & others)
Domoticz version: Debian
Location: Milan
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by solidum90 » Monday 11 June 2018 14:33

zak45 wrote:
Monday 11 June 2018 12:46
solidum90 wrote:
Monday 11 June 2018 11:42
Hello to everyone,
I've problem with this python plugin.. for example LGTV plugin works.

Since I installed the stable version of domoticz (V3.8153) I have to use version 3.0 of this plugin.
I've a Broadlink RM Mini3, there are logs of domoticz starting:
if you want / need to use V3, you need also broadlink v0.5, this one can be found on the DropBox.
Thanks for the quick response!
Right observation, now I've uninstall broadlink 0.9 and I install 0.5:

Code: Select all

sudo pip3 show broadlink
Name: broadlink
Version: 0.5
Summary: Python API for controlling Broadlink IR controllers
Home-page: http://github.com/mjg59/python-broadlink
Author: Matthew Garrett
Author-email: mjg59@srcf.ucam.org
License: UNKNOWN
Location: /usr/local/lib/python3.5/dist-packages
Requires: pyaes
But on domoticz log I've the same error:
Error Connecting to Broadlink device....
I tried nmap to make a portscan of my broadlink but I do not see any tcp port listening, is it possible?

Thanks again!

Bundy75
Posts: 7
Joined: Friday 08 June 2018 7:26
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by Bundy75 » Monday 11 June 2018 15:03

Hi!

My situation is nearly the same - Domoticz Stable (on Jessie with Python 3.4) + V3 plugin and RM3 Pro

Code: Select all

2018-06-11 14:09:18.747 User: Admin initiated a switch command (42/RM3 - Command/Set Level)
2018-06-11 14:09:18.762 (RM3) Calling message handler 'onCommand'.
2018-06-11 14:09:18.763 (RM3) onCommand called for Unit 1: Parameter 'Set Level', Level: 20 , Connected : False
2018-06-11 14:09:18.763 (RM3) Nothing to send
2018-06-11 14:09:20.411 User: Admin initiated a switch command (42/RM3 - Command/Set Level)
2018-06-11 14:09:20.416 (RM3) Calling message handler 'onCommand'.
2018-06-11 14:09:20.416 (RM3) onCommand called for Unit 1: Parameter 'Set Level', Level: 10 , Connected : False
2018-06-11 14:09:20.416 Error: (RM3) Error Connecting to Broadlink device....
2018-06-11 14:09:20.416 (RM3) All plugin system is on pause for 5s...
2018-06-11 14:09:20.416 (RM3) When Broadlink led is lit press the button on your remote within 5 seconds
2018-06-11 14:09:20.416 Error: (RM3) 'onCommand' failed 'NameError':'name 'device' is not defined'.
2018-06-11 14:09:20.416 Error: (RM3) ----> Line 158 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2018-06-11 14:09:20.416 Error: (RM3) ----> Line 417 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function learn
2018-06-11 14:09:29.282 (RM3) Calling message handler 'onHeartbeat'.
Previously I had Broadlink 0.8 but I've changed it to 0.5 upon your suggestion - still the same error and Domoticz can not connect to Broadlink.

Modules versions are as follows:

Code: Select all

Name: pyaes
Version: 1.6.0
Location: /usr/local/lib/python3.4/dist-packages
Requires: 
---
Name: broadlink
Version: 0.5
Location: /usr/local/lib/python3.4/dist-packages
Requires: pyaes
---
Name: crypto
Version: 1.4.1
Location: /usr/local/lib/python3.4/dist-packages
Requires: Naked, shellescape
After reinstallation of Broadlink module (0.8=>0.5) I've copied its directory 'broadlink' from /usr/local/lib/python3.4/dist-packages to /usr/lib/python3.4/

Code: Select all

/usr/local/lib/python3.4/dist-packages:

drwxr-sr-x  3 root staff 4096 cze 11 14:39 broadlink
drwxr-sr-x  2 root staff 4096 cze 11 14:39 broadlink-0.5.egg-info

Contents of /usr/lib/python3.4/broadlink:

Code: Select all

-rwxrwxrwx  1 root staff 16621 cze 14  2017 __init__.py
drwxrwsrwx  2 root staff  4096 cze 11 14:39 __pycache__
After Domoticz restart there's only this line in the log:

Code: Select all

RM3) Initialized version 3.0.0, author 'zak45'
(previously there were plenty of lines with info about plugin's initialization) - and of course it's still non functional (no reaction when I click Learn, but also no error entry in the log - weird behavior). And both devices (discover and remote) are gone and I can't add them by adding another instance of plugin.

On the other hand discovery test performed using the script returns expected values, so 'broadlink' module seems to work correctly:

Code: Select all

 
************************************************
Using python library created by Matthew Garrett
https://github.com/mjg59/python-broadlink
************************************************
Scanning network for Broadlink devices....
Found 1 broadlink devices
...............
Device 1 Host address = '192.168.0.216', 
Any ideas?

zak45
Posts: 503
Joined: Sunday 22 January 2017 12:37
Target OS: Windows
Domoticz version: V3.9056
Contact:

Re: Python Plugin: Broadlink RM2 V3

Post by zak45 » Monday 11 June 2018 17:15

Bundy75 wrote:
Monday 11 June 2018 15:03
Hi!

My situation is nearly the same - Domoticz Stable (on Jessie with Python 3.4) + V3 plugin and RM3 Pro

Any ideas?
Hummm.. not really easy to debug old version, do not use it anymore.. but looks like problem with crypto.. try to remove pycrypto to see if it's better.

Post Reply

Who is online

Users browsing this forum: Dnpwwo, Google [Bot] and 4 guests