Using BROADLINK RM2 on DOMOTICZ

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: RE: Re: RE: Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by Justintime »

tuspam wrote:
Justintime wrote:
tuspam wrote:
So, You find one.
So i just need a rm2 than?
YES rm2 or black bean.
So to summarize..... i can use a Black Bean to learn commands which i can control switches in Domoticz.

I want to use my Harmony Remote to activate scenes and switches.
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: RE: Re: RE: Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

Justintime wrote:
tuspam wrote:
Justintime wrote: So i just need a rm2 than?
YES rm2 or black bean.
So to summarize..... i can use a Black Bean to learn commands which i can control switches in Domoticz.

I want to use my Harmony Remote to activate scenes and switches.
1 i can use a Black Bean to learn commands - YES
2 use my Harmony Remote to activate scenes and switches - NO (Alexa or Google Home can do that or anything which can control domoticz switches)

RM2 and RM mini only transmitting IR or RF signal (they receive signals only in learn mode) - so you can't press button on remote control to activate something (You need extra separately IR receiver to do that)
tekmars
Posts: 2
Joined: Thursday 08 December 2016 9:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tekmars »

Hi
I would like to buy this BROADLINK but is there any difference between BROADLINK RM2 PRO and BROADLINK PRO ?
Thanks.
Justintime
Posts: 228
Joined: Thursday 21 May 2015 9:08
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Contact:

Re: RE: Re: RE: Re: RE: Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by Justintime »

tuspam wrote:
Justintime wrote:
tuspam wrote:
YES rm2 or black bean.
So to summarize..... i can use a Black Bean to learn commands which i can control switches in Domoticz.

I want to use my Harmony Remote to activate scenes and switches.
1 i can use a Black Bean to learn commands - YES
2 use my Harmony Remote to activate scenes and switches - NO (Alexa or Google Home can do that or anything which can control domoticz switches)

RM2 and RM mini only transmitting IR or RF signal (they receive signals only in learn mode) - so you can't press button on remote control to activate something (You need extra separately IR receiver to do that)
Thanks.. I will stick to mysensors and the IR Send and receive node. I need to toggle switches in Domoticz.
My Arduino sketch is lost so thought it would be an easy replacement to get more ir commands.

Alexa and Google home... Wish dutch language was available.
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

tekmars wrote:Hi
I would like to buy this BROADLINK but is there any difference between BROADLINK RM2 PRO and BROADLINK PRO ?
Thanks.

I think is the same device
tekmars
Posts: 2
Joined: Thursday 08 December 2016 9:27
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tekmars »

tuspam wrote:
tekmars wrote:Hi
I would like to buy this BROADLINK but is there any difference between BROADLINK RM2 PRO and BROADLINK PRO ?
Thanks.

I think is the same device
Well, I'll buy this gateway.
thank you.
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

del
Last edited by tuspam on Sunday 11 December 2016 13:05, edited 1 time in total.
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

After some time my domoticz (latest beta) got some problems with execute scripts, for example my virtual switch for turn on light looks like that:

Code: Select all

On Action: 
script:///home/pi/domoticz/scripts/python/playcode2.py /home/pi/domoticz/scripts/python/lightOffice.txt

When i press virtul switch in domoticz log i see:
2016-12-11 12:56:15.310 User: Admin initiated a switch command (327/Light Office/On)
But nothing happen :(

When i give command in console:

Code: Select all

root@raspberrypi:/# home/pi/domoticz/scripts/python/playcode2.py /home/pi/domoticz/scripts/python/lightOffice.txt
Connecting to Broadlink device....
Connected....
Code Sent....
Everything works - what's going on?

PS. After the restart, everything works a few hours.
PS2. I have playcode.py to control RM2 and playcode2.py to control RM mini.
djassa1
Posts: 8
Joined: Friday 11 November 2016 14:33
Target OS: Linux
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by djassa1 »

Just to be clear, the broadlink python libraryby mjg59 is able to control the RM2 (pro) and the RM3 blackbean.
I suspect that this library also works for some other wifi broadlink devices like the SP and SP2 sockets.
For the installation of the library I just copied it in a PATH reachable python directory:

/usr/local/lib/python2.7/dist-packages/broadlink

No need to do any setup and works like a charm.
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

djassa1 wrote:Just to be clear, the broadlink python libraryby mjg59 is able to control the RM2 (pro) and the RM3 blackbean.
I suspect that this library also works for some other wifi broadlink devices like the SP and SP2 sockets.
For the installation of the library I just copied it in a PATH reachable python directory:

/usr/local/lib/python2.7/dist-packages/broadlink

No need to do any setup and works like a charm.
Ok, I make:
HOW TO (broadlink python library by mjg59)

Download:

Code: Select all

git clone https://github.com/mjg59/python-broadlink
Go to new folder python-broadlink

Code: Select all

python setup.py install
If You got any errors check Dependency file:

Code: Select all

/usr/local/lib/python2.7/dist-packages/broadlink-0.1-py2.7.egg/EGG-INFO/dependency_links.txt
Download learn.py and playcode.py
http://www.domoticz.com/forum/viewtopic ... 00#p103517

Make "Static Lease" Your RM on Your router.
Edit in learn.py this line:

Code: Select all

device = broadlink.device(host=("<your RM3 IP address>",80), mac=bytearray.fromhex("<your RM3 mac>"))
My example:
device = broadlink.rm(host=("192.168.1.110",80), mac=bytearray.fromhex("B4430DEEE880"))


Copy learn.py and playcode.py to:

Code: Select all

/home/pi/domoticz/scripts/python
Type "python learn.py" to learn IR and RF codes

Make dummy switch in domoticz
On action example:

Code: Select all

script:///home/pi/domoticz/scripts/python/playcode.py /home/pi/domoticz/scripts/python/tvOn.txt
Or add to HA-Bridge script and control via Alexa or Google Home directly without domoticz:

Code: Select all

[{"item":"python /home/pi/domoticz/scripts/python/playcode.py /home/pi/domoticz/scripts/python/tvOn.txt"}]
Somehow like that if I everything well remember :)

Good luck

Ps sorry for my language.
djassa1
Posts: 8
Joined: Friday 11 November 2016 14:33
Target OS: Linux
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by djassa1 »

Hello @tuspam,
Seems that yours usefull scripts do not work with the new version 0.2 of the library.
setting static host device is not handled correctly. :(

Edit: found it, device definition does not exist anymore in the library. For rm1, rm2, rm3, it will need to use a definition like this

for rm remotes it uses
device = broadlink.rm(host=("IP address",80), mac=bytearray.fromhex("mac address"))

So just replace broadlink.device by broadlink.rm in the scripts and everything will be back and working !
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

djassa1 wrote:Hello @tuspam,
Seems that yours usefull scripts do not work with the new version 0.2 of the library.
setting static host device is not handled correctly. :(

Edit: found it, device definition does not exist anymore in the library. For rm1, rm2, rm3, it will need to use a definition like this

for rm remotes it uses
device = broadlink.rm(host=("IP address",80), mac=bytearray.fromhex("mac address"))

So just replace broadlink.device by broadlink.rm in the scripts and everything will be back and working !
Check exactly my post before
"My example:
device = broadlink.rm(host=("192.168.1.110",80), mac=bytearray.fromhex("B4430DEEE880"))"
djassa1
Posts: 8
Joined: Friday 11 November 2016 14:33
Target OS: Linux
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by djassa1 »

Oups, did not saw it, went directly to your last post where you referenced your original scripts :)
noddy119
Posts: 12
Joined: Sunday 19 July 2015 14:27
Target OS: Linux
Domoticz version: 3.5837
Location: Norfolk, UK
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by noddy119 »

To advise I have updated my original post: viewtopic.php?f=17&t=6929&p=103517#p103517

I was using an older version of the library which did not allow me to use 'broadlink.rm' for my blackbean mini 3, which was creating confusion :oops:

I have also added a script to locate Broadlink devices and reveal their Host and MAC addresses so they can be copied and pasted into the learn and play scripts.
inzimam
Posts: 4
Joined: Saturday 24 December 2016 23:36
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by inzimam »

Hi

Has anyone got in touch with the with the RM bridge developers about the character limit? Or has anyone figured out a way to get around this? I don't want to use the RM Tasker plugin as I believe it has a 16 device limit
noddy119
Posts: 12
Joined: Sunday 19 July 2015 14:27
Target OS: Linux
Domoticz version: 3.5837
Location: Norfolk, UK
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by noddy119 »

Hi @inzimam

The scripts using the python library (RM Tasker not required) that this topic latterly refers to store the codes in individual text files, so I am fairly sure the character/device limit does not apply. Effectively the Broadlink device is only used to record codes to a text file and then play back those codes via the named text file. Nothing is stored on the Broadlink device.
forumfab
Posts: 68
Joined: Monday 25 August 2014 21:40
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by forumfab »

Hi All,

For the moment, in my point of view there is too much librairies versions, methods to use them, and scripts to go ehead in term of simple usage !

Without a full installer, that will included all the python librairies, and broadlink's librairies, scripts and so on, this project will may be stay in a no man's land

This installer must be able to prepare every think without any human intervention , execpt for the IP BROADLINK's adress, MAC BROADLINK,s adress, and PORT BRAOEDLINK,s adress ( 80) in the general case )
inzimam
Posts: 4
Joined: Saturday 24 December 2016 23:36
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by inzimam »

Anyone working on an easy installer?

I'm planning on running this on my O2 Joggler which is running Windows XP - is this a possibility?
tuspam
Posts: 37
Joined: Friday 25 December 2015 0:19
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by tuspam »

Guys, you got every thing you need, stop bla bla bla and be happy.

viewtopic.php?p=110715&sid=6d5e3b993fde ... 98#p108350
inzimam
Posts: 4
Joined: Saturday 24 December 2016 23:36
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by inzimam »

Guys

I'm sorry I'm too much of a newbie here. I don't even know where to start to get this to work

I have an XP machine, a Broadlink RM Pro.

Looks like I need Domoticz for Windows and RM Controller?

Does anyone have some very simple starting steps please?
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests