Page 4 of 4

Re: Python Plugin: Broadlink RM2 V2

Posted: Wednesday 03 May 2017 2:59
by farhanito
zak45 wrote:
farhanito wrote:
here's the files json.zip

thanks
tested at home, your Json files are ok, able to create more than 90 devices.
be sure to have put them on the right place:
need to be under ''Folder to store ini files"/import
good to know, thanks for testing. I'll try it again later.
i think there's plenty permission issues when running under linux

Re: Python Plugin: Broadlink RM2 V2

Posted: Wednesday 03 May 2017 18:22
by jlites00
zak45 wrote:
michaldobrotka wrote:I´m trying to configure Dummy switch. I copied command from log window, but it doesn't work :

Code: Select all

script://"/home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py" /home/pi/domoticz/plugins/BroadlinkRM2/broadlink\BroadlinkRM2-16-19.ini
Can somebody correct it please?
Thanks
I would do it in this way:
script:///home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.sh /home/pi/domoticz/plugins/BroadlinkRM2/broadlink\BroadlinkRM2-16-19.ini

plugin_send.sh:
nohup python /home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py $1 &

make plugin_sh executable

not linux specialist, so correct what is necessary ;)
How do you make the file executable the right way? I did some googling and got it to execute on the terminal, though I don't know if the method is right but that also lead to an issue opening & editing broadlink folder where it houses the "ini" files & "imports". On the Pi the files were missing but they do appear on Samba share. Don't know if that lead to permission issues as well.

Re: Python Plugin: Broadlink RM2 V2

Posted: Thursday 04 May 2017 10:31
by jlites00

Code: Select all

2017-05-04 08:27:05.173 User: Admin initiated a switch command (16/JEY ALL RM2 - 2-15 ON/On)
2017-05-04 08:27:05.194 (BROADLINK RM2) Calling message handler 'onCommand'.
2017-05-04 08:27:05.195 (BROADLINK RM2) onCommand called for Unit 15: Parameter 'On', Level: 0 , Connected : True
2017-05-04 08:27:05.195 (BROADLINK RM2) Generate on Command for learned code stored on unit :15

2017-05-04 08:27:05.231 (BROADLINK RM2) Connected to Broadlink device.

2017-05-04 08:27:06.237 Error: (BROADLINK RM2) Code Sent WARNING....Probably timeout
2017-05-04 08:27:06.238 (BROADLINK RM2) Command line : "/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py" /home/pi/domoticz/plugins/broadlinkini/BroadlinkRM2-2-15.ini
2017-05-04 08:27:06.238 (JEY ALL RM2 - 2-15 ON) Updating device from 1:'On-1' to have values 1:'On-3'.
2017-05-04 08:27:06.244 (BROADLINK RM2) Update 1:'On-3' (JEY ALL RM2 - 2-15 ON)
2017-05-04 08:27:07.015 User: Admin initiated a switch command (14/JEY ALL RM2 - 2-13 OFF/On)
2017-05-04 08:27:07.049 (BROADLINK RM2) Calling message handler 'onCommand'.
2017-05-04 08:27:07.049 (BROADLINK RM2) onCommand called for Unit 13: Parameter 'On', Level: 0 , Connected : True
2017-05-04 08:27:07.049 (BROADLINK RM2) Generate on Command for learned code stored on unit :13

2017-05-04 08:27:07.085 (BROADLINK RM2) Connected to Broadlink device.

2017-05-04 08:27:08.091 Error: (BROADLINK RM2) Code Sent WARNING....Probably timeout
2017-05-04 08:27:08.091 (BROADLINK RM2) Command line : "/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py" /home/pi/domoticz/plugins/broadlinkini/BroadlinkRM2-2-13.ini
2017-05-04 08:27:08.091 (JEY ALL RM2 - 2-13 OFF) Updating device from 1:'On-2' to have values 1:'On-4'.
2017-05-04 08:27:08.096 (BROADLINK RM2) Update 1:'On-4' (JEY ALL RM2 - 2-13 OFF)
2017-05-04 08:27:09.199 (BROADLINK RM2) Calling message handler 'onHeartbeat'.
2017-05-04 08:27:09.655 User: Admin initiated a switch command (16/JEY ALL RM2 - 2-15 ON/On)
2017-05-04 08:27:09.700 (BROADLINK RM2) Calling message handler 'onCommand'.
2017-05-04 08:27:09.700 (BROADLINK RM2) onCommand called for Unit 15: Parameter 'On', Level: 0 , Connected : True
2017-05-04 08:27:09.700 (BROADLINK RM2) Generate on Command for learned code stored on unit :15

2017-05-04 08:27:09.736 (BROADLINK RM2) Connected to Broadlink device.

2017-05-04 08:27:10.742 Error: (BROADLINK RM2) Code Sent WARNING....Probably timeout
2017-05-04 08:27:10.742 (BROADLINK RM2) Command line : "/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py" /home/pi/domoticz/plugins/broadlinkini/BroadlinkRM2-2-15.ini
2017-05-04 08:27:10.742 (JEY ALL RM2 - 2-15 ON) Updating device from 1:'On-3' to have values 1:'On-5'.
2017-05-04 08:27:10.748 (BROADLINK RM2) Update 1:'On-5' (JEY ALL RM2 - 2-15 ON)
2017-05-04 08:27:12.316 User: Admin initiated a switch command (19/Dummy/On)
2017-05-04 08:27:12.317 (Dummy) Light/Switch (Dummy)
2017-05-04 08:27:12.554 Executing script: /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
2017-05-04 08:27:12.566 Error: Error executing script command (/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py). returned: 512
2017-05-04 08:27:14.049 User: Admin initiated a switch command (19/Dummy/Off)
2017-05-04 08:27:14.050 (Dummy) Light/Switch (Dummy)
2017-05-04 08:27:14.290 Executing script: /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
2017-05-04 08:27:14.302 Error: Error executing script command (/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py). returned: 512

Don't know why the script is not executing even on it own.
This is the line I use...

Code: Select all

pi@raspberrypi:~ $ sudo chmod +x /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
pi@raspberrypi:~ $ python /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
Traceback (most recent call last):
  File "/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py", line 14, in <module>
    import broadlink
ImportError: No module named broadlink
pi@raspberrypi:~ $ 

Re: Python Plugin: Broadlink RM2 V2

Posted: Thursday 04 May 2017 12:39
by zak45
jlites00 wrote:

Code: Select all

pi@raspberrypi:~ $ sudo chmod +x /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
pi@raspberrypi:~ $ python /home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py
Traceback (most recent call last):
  File "/home/pi/domoticz/plugins/BroadlinkRM/plugin_send.py", line 14, in <module>
    import broadlink
ImportError: No module named broadlink
pi@raspberrypi:~ $ 
I would do it in this way:
script:///home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.sh /home/pi/domoticz/plugins/broadlinkini/BroadlinkRM2-2-15.ini

plugin_send.sh:
nohup python /home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.py $1 &

make plugin_sh executable

not linux specialist, so correct what is necessary ;)

On the other way:
when you execute default command : python
this should execute default version one, so, if you have mixed version could made problem and it could that broadlink module is not installed on the default one ?? !!

Re: Python Plugin: Broadlink RM2 V2

Posted: Thursday 04 May 2017 13:48
by jlites00
script:///home/pi/domoticz/plugins/BroadlinkRM2/plugin_send.sh /home/pi/domoticz/plugins/broadlinkini/BroadlinkRM2-2-15.ini
make plugin_sh executable
I'm not sure if it's a typo and I can't seem to find "plugin_send.sh" in the Broadlink folder. Do you mean "plugin_send.py" ?
if you have mixed version could made problem and it could that broadlink module is not installed on the default one ?? !!
I had this build from the ground up, so No previous build on this image. Where should the modules be? And where can I get them?

Out of curiosity, is there a way to include HEX directly into (Dummy Switch) Action ON / Action OFF. I think it would be an easier yet fail-safe way to do this. What if the execute syntex is broken? I mean i'm trying to minimize the complexity of this process.

Re: Python Plugin: Broadlink RM2 V2

Posted: Thursday 04 May 2017 18:07
by zak45
@jlites00

you need to create plugin_send.sh !

verify that you do not have mixed python version ... soyry could not help on linux !

the On/Off action accept only http or script.. this mean that you can also do a HTTP / Json call if you don't want to create a script file. All is on Domoticz wiki pages ! (suppose that in this case you have decided to keep associated device in Domoticz)

Re: Python Plugin: Broadlink RM2 V2

Posted: Tuesday 23 May 2017 15:49
by olicot
Hello
Is this plugin work with Broadlink MP1 (Smart Wifi Power strip) ?
If yes, may I have some tips ? (or need to open a new post? )

Thanks in advance

Re: Python Plugin: Broadlink RM2 V2

Posted: Tuesday 23 May 2017 17:26
by zak45
olicot wrote:Hello
Is this plugin work with Broadlink MP1 (Smart Wifi Power strip) ?
If yes, may I have some tips ? (or need to open a new post? )

Thanks in advance
"Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs "

so probably not.

Re: Python Plugin: Broadlink RM2 V2

Posted: Friday 09 June 2017 1:31
by deennoo
zak45 wrote:
olicot wrote:Hello
Is this plugin work with Broadlink MP1 (Smart Wifi Power strip) ?
If yes, may I have some tips ? (or need to open a new post? )

Thanks in advance
"Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs "

so probably not.
yes it is have a look to this video : https://www.youtube.com/watch?v=X4f4JUaEJck

Re: Python Plugin: Broadlink RM2 V2

Posted: Saturday 10 June 2017 7:50
by olicot
deennoo wrote:
zak45 wrote:
olicot wrote:Hello
Is this plugin work with Broadlink MP1 (Smart Wifi Power strip) ?
If yes, may I have some tips ? (or need to open a new post? )

Thanks in advance
"Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs "

so probably not.
yes it is have a look to this video : https://www.youtube.com/watch?v=X4f4JUaEJck
Tanks for This exemple....I'll play with next rainyday :-)

Re: Python Plugin: Broadlink RM2 V2

Posted: Sunday 11 June 2017 15:18
by vonzeng
2017-06-11 21:16:04.165 User: Admin initiated a switch command (109/Broadlink RM Pro - Import/Set Level)
2017-06-11 21:16:04.170 (Broadlink RM Pro) Calling message handler 'onCommand'.
2017-06-11 21:16:04.170 (Broadlink RM Pro) onCommand called for Unit 255: Parameter 'Set Level', Level: 20 , Connected : True
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) 'onCommand' failed 'UnboundLocalError':'local variable 'numName' referenced before assignment'.
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 179 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function onCommand
2017-06-11 21:16:04.380 Error: (Broadlink RM Pro) ----> Line 609 in /home/pi/domoticz/plugins/BroadlinkRM2/plugin.py, function createIniImport

help me

Re: Python Plugin: Broadlink RM2 V2

Posted: Friday 23 June 2017 16:51
by Andree
Yep,stupid me,use cmd with rights admin now work,install finish.

But..in domoticz HW i can't see Broadlink HW..

Re: Python Plugin: Broadlink RM2 V2

Posted: Saturday 24 June 2017 3:22
by Onkytonk
Hey all,
I'm pretty new to Domoticz and home automation.
Trying to wrap my head around getting the Broadlink RM working with Domoticz.

The First thing I found was RM bridge, then RM Tasker and now this phython plugin.

I have a few queries though.

1) does the phython plugin work with the "New" RM3 Pro and RM 3 Mini? (Plugin in Domoticz is called RM2, so this has me confused).

2) Once I add the device into domoticz, and I use either eControl or Domoticz interface to add commands, will I need to mess around with python scripting to make things work? Or will the switches be created automatically?

Thanks guys.

Re: Python Plugin: Broadlink RM2 V2

Posted: Sunday 25 June 2017 15:05
by zak45
Onkytonk wrote:Hey all,
I'm pretty new to Domoticz and home automation.
Trying to wrap my head around getting the Broadlink RM working with Domoticz.

The First thing I found was RM bridge, then RM Tasker and now this phython plugin.

I have a few queries though.

1) does the phython plugin work with the "New" RM3 Pro and RM 3 Mini? (Plugin in Domoticz is called RM2, so this has me confused).

2) Once I add the device into domoticz, and I use either eControl or Domoticz interface to add commands, will I need to mess around with python scripting to make things work? Or will the switches be created automatically?

Thanks guys.
RM3 should work.
Switches are created automatically if using Domoticz interface.
if using eControl, you can import learned codes and switches will be created.
No need for scripting if goal is to just send a code.

Re: Python Plugin: Broadlink RM2 V2

Posted: Sunday 25 June 2017 15:23
by Onkytonk
zak45 wrote:
Onkytonk wrote:Hey all,
I'm pretty new to Domoticz and home automation.
Trying to wrap my head around getting the Broadlink RM working with Domoticz.

The First thing I found was RM bridge, then RM Tasker and now this phython plugin.

I have a few queries though.

1) does the phython plugin work with the "New" RM3 Pro and RM 3 Mini? (Plugin in Domoticz is called RM2, so this has me confused).

2) Once I add the device into domoticz, and I use either eControl or Domoticz interface to add commands, will I need to mess around with python scripting to make things work? Or will the switches be created automatically?

Thanks guys.
RM3 should work.
Switches are created automatically if using Domoticz interface.
if using eControl, you can import learned codes and switches will be created.
No need for scripting if goal is to just send a code.
Awesome! Thanks for the reply.


Sent from my iPad using Tapatalk

Re: Python Plugin: Broadlink RM2 V2

Posted: Sunday 25 June 2017 17:05
by zak45

Re: Python Plugin: Broadlink RM2 V2

Posted: Thursday 08 February 2018 13:12
by leandrosaltori
Tenho uma automação com BROADLINK + Tomadas Livolo.

Conheci recentemente o domoticz, mas nao consigo instala-lo no Windows.

Após instalar , quando vou criar o hardware nao aparece a opção "BROADLINK" . ( imagem em anexo)

Segui as instruções:
https://www.domoticz.com/wiki/Plugins/BroadlinkRM2.html

Alguém pode me ajudar por favor?

Re: Python Plugin: Broadlink RM2 V2

Posted: Monday 02 December 2019 15:48
by daniellejorge
Can someone help a noob? Trying to follow the wiki https://www.domoticz.com/wiki/Plugins/BroadlinkRM2.html

Trying to install broadlink , libpython3.5 is already the newest version (3.5.3-1+deb9u1).
Doesn't show me the folder to put the files on .(I have python 2.7 installed as well)
I have a raspberry pi with raspbian stretch v9
My broadlink is RM2 PRO v30