Page 1 of 4
Python Plugin: Broadlink RM2 V2
Posted: Saturday 22 April 2017 15:35
by zak45
Hi All,
This is the new release of the Broadlink RM2 plugin. Open new thread just to try to keep things organized.
Import feature added.
To update :
copy plugin.py, plugin_http.py
--For Windows:
copy plugin_http.cmd
--For Other OS:
copy plugin_http.sh
see wiki :
http://www.domoticz.com/wiki/Plugins/BroadlinkRM2.html
initial :
https://www.domoticz.com/forum/viewtopi ... 65&t=16859
plugin system:
http://www.domoticz.com/wiki/Using_Python_plugins
Re: Python Plugin: Broadlink RM2 V2
Posted: Saturday 22 April 2017 18:15
by andi216
You are amazing. Thank you very much for update.
It works very well.
(raspberry pi)
Re: Python Plugin: Broadlink RM2 V2
Posted: Saturday 22 April 2017 18:37
by sisaenkov
Hello.
Do you think about repeat option for command as in Broadlink RM Plugin?
HTTP request in that plugin looks like:
Code: Select all
http://172.16.1.123:7474/send?deviceMac=xxxxxxxxxxxx&codeId=l1467826269529&repeat=10
Re: Python Plugin: Broadlink RM2 V2
Posted: Saturday 22 April 2017 22:46
by zak45
if you need for some reason to repeat the command, I think that all is already there:
- Capture.JPG (67.97 KiB) Viewed 6862 times
in this case this will repeat the code 3 times.
And even more , on LUA script, you can use :
commandArray['IR/RF RM2 Salon TV On'] = 'On REPEAT 2 INTERVAL 1 SECOND'
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 10:13
by sisaenkov
In some cases this way doesn't allow to repeat 5-10-20 times. For example, when you volume up/down your TV or stereo.
Also it's impossible when On and Off actions are different.
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 12:11
by maninblack30
Hello! I have updated the 3 files (plugin.py, plugin_http.py and plugin_http.sh) however when I try to execute a command it shows the following in my Domoticz log:
2017-04-23 20:08:22.580 (Remote Controller) onCommand called for Unit 11: Parameter 'On', Level: 0 , Connected : True
2017-04-23 20:08:22.580 (Remote Controller) Generate on Command for learned code stored on unit :11
2017-04-23 20:08:22.580 Error: (Remote Controller) ini file not found: /home/pi/domoticz/plugins/broadlink/commands/BroadlinkRM2-15-11.ini
the files are definately in the correct location!
Any ideas?
Ta,
Fraser
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 12:15
by zak45
Hi,
maybe this :
/home/pi/domoticz/plugins/broadlink
The plugin now follow the best practice for implementation, this mean folder name = plugin name
try to rename /home/pi/domoticz/plugins/broadlink by /home/pi/domoticz/plugins/broadlinkRM2
in the same case, a new entry into DEFAULT section of the ini file need to be there : customname.
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 12:31
by zak45
@sisaenkov
of course, this is only example.
Now with script / command line you can repeat code as many time you want
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 12:31
by maninblack30
Perhaps easier for me to learn all my commands again?
I did move all the ini files to /home/pi/domoticz/plugins/broadlinkRM2/
and changed the path in the hardware section, but it still gives the same error:
2017-04-23 20:29:03.889 Error: (Remote Controller) ini file not found: /home/pi/domoticz/plugins/broadlinkRM2/BroadlinkRM2-15-11.ini
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 13:47
by sisaenkov
sisaenkov wrote:In some cases this way doesn't allow to repeat 5-10-20 times. For example, when you volume up/down your TV or stereo.
Also it's impossible when On and Off actions are different.
I have found a workaround for this. Learning mode is active until the IR/RF-command is still sending. So I create ini-files with different time of IR/RF-command learning.
But broadlink can send IR command for only 1 second.
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 16:50
by zak45
@maninblack30
To try to help, please post full log, from update the plugin (HW page) thru push button.
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 18:18
by burton666
I tried to install earlier on a rpi3 but never got any success. Now I have installed domoticz on a separate linux computer but same result.
I have tried all directions I have found both in the forum and in the wiki. I have installed python 3.4 and python 3.5, tried installing using both pip and pip3.
When I get to this step: "sudo pip3 install broadlink"
Code: Select all
burton666@debian:/usr/local/lib$ sudo pip3 install broadlink
Collecting broadlink
Using cached broadlink-0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-z2ws5ee5/broadlink/setup.py", line 12
except ImportError, e:
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-z2ws5ee5/broadlink
You are using pip version 7.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
burton666@debian:/usr/local/lib$
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 18:56
by zak45
@burton666
looks like new broadlink version has been pushed :
broadlink-0.4.tar.gz
and there is a problem on it.
the version 0.3 that work can be found on the drop box
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 21:55
by shoyboom
Hi, i installed it and can learn new cover but I cannot manage to smart web server.
I get this message on log.
Am i doing something wrong?
Sent from my ONEPLUS A3000 using Tapatalk
Re: Python Plugin: Broadlink RM2 V2
Posted: Sunday 23 April 2017 23:03
by maninblack30
zak45 wrote:@maninblack30
To try to help, please post full log, from update the plugin (HW page) thru push button.
Hello Zak45, it turns out the path I had on the old install ended in a \ so all the ink files were named "\BroadlinkRMx-x.ini" so once I renamed them all, and added the customname line, it all worked well!
Thanks,
Fraser
Re: Python Plugin: Broadlink RM2 V2
Posted: Monday 24 April 2017 11:35
by michaldobrotka
Hi, can you post link on 0.3 version pls. Can't find it. Thanks
Re: Python Plugin: Broadlink RM2 V2
Posted: Monday 24 April 2017 13:55
by zak45
michaldobrotka wrote:Hi, can you post link on 0.3 version pls. Can't find it. Thanks
see wiki, file name :
python-broadlink-master.zip
Re: Python Plugin: Broadlink RM2 V2
Posted: Tuesday 25 April 2017 15:36
by burton666
Ok, but how do I install it once I have copied the dropbox-file from the wiki?
Re: Python Plugin: Broadlink RM2 V2
Posted: Wednesday 26 April 2017 0:40
by zak45
burton666 wrote:Ok, but how do I install it once I have copied the dropbox-file from the wiki?
download
unzip
got to folder
pip install .
Re: Python Plugin: Broadlink RM2 V2
Posted: Wednesday 26 April 2017 20:49
by michaldobrotka
zak45
Hi zak45,
I downloaded, unzipped file from Dropbox. I rewrite files in plugins/BroadlinkRM2 but with
Im still getting error with 0.4 version of tar.gz file. Can you please explain steps how to do it for Dummies?
Thanks and sorry for bothering