Python Plugin: Broadlink RM2 V3

Python and python framework
satanasinc
Posts: 27
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: 482
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: 27
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: 482
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: 27
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: 22
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: 27
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: 22
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: 482
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: 482
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: 482
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: 482
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.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests