Using BROADLINK RM2 on DOMOTICZ

Compatibility (hardware, devices and OS)
deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Monday 30 January 2017 17:49

moacir wrote:In Broadlink A1, for air quality sensor (variable air_quality in script), luminance (variable light in script) and noise (variable noise in the script), text-mode sensors are required in Domoticz, since they send text (eg. Excellent, Dark , Quiet etc.) rather than numbers or percentage.

ok thx
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

madrian
Posts: 191
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by madrian » Wednesday 01 February 2017 21:43

I just set up the python version. It works, but it's pretty slow. Hope for a faster solution in the future.

Any chance for ac control (temp, mode, fan speed etc - without learning all commands individually)?

deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Wednesday 01 February 2017 22:47

hpapagaj wrote:I just set up the python version. It works, but it's pretty slow. Hope for a faster solution in the future.

Any chance for ac control (temp, mode, fan speed etc - without learning all commands individually)?
Have you comment
Print and time line on play.py ?

On mine this is fast as a click !
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

Smurfen
Posts: 2
Joined: Wednesday 11 January 2017 0:22
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Smurfen » Friday 03 February 2017 22:17

For example on this URL http://files.remotecentral.com/download ... 6.zip.html there is Fujitsu heatpump codes that should be possible to implement manually somehow. :mrgreen:

madrian
Posts: 191
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by madrian » Saturday 04 February 2017 12:49

deennoo wrote:
hpapagaj wrote:I just set up the python version. It works, but it's pretty slow. Hope for a faster solution in the future.

Any chance for ac control (temp, mode, fan speed etc - without learning all commands individually)?
Have you comment
Print and time line on play.py ?

On mine this is fast as a click !
As it was described on the forum, play.py must be reconnect every time when you call the script. This method adds a 2-3 sec delay to the script.

MikeNg
Posts: 4
Joined: Tuesday 07 June 2016 4:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by MikeNg » Thursday 16 March 2017 6:59

Hi,
I am a newbie with domoticz. I created learn.py and playcode.py as per Noddy119 instruction and everything worked well in the command line. However, when I put in domoticz action like:
script:///home/domoticz/scripts/python/playcode.py /home/domoticz/scripts/python/tvOff.txt

it just did not work at all. When I CUT and PASTE this in the ssh command line it just works:

/home/domoticz/scripts/python/playcode.py /home/domoticz/scripts/python/tvOff.txt

any idea why?

moacir
Posts: 11
Joined: Monday 23 January 2017 21:21
Target OS: Raspberry Pi
Domoticz version: V3.5877
Location: Curitiba - PR - BR
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by moacir » Thursday 16 March 2017 7:18

MikeNg wrote:Hi,
I am a newbie with domoticz. I created learn.py and playcode.py as per Noddy119 instruction and everything worked well in the command line. However, when I put in domoticz action like:
script:///home/domoticz/scripts/python/playcode.py /home/domoticz/scripts/python/tvOff.txt

it just did not work at all. When I CUT and PASTE this in the ssh command line it just works:

/home/domoticz/scripts/python/playcode.py /home/domoticz/scripts/python/tvOff.txt

any idea why?
Hello. Set execution attribute (+X) in your *.py files.

doh
Posts: 69
Joined: Monday 01 December 2014 14:28
Target OS: Linux
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by doh » Sunday 19 March 2017 12:45

siklosi wrote:
djassa1 wrote:I still don't have Broadlink RM2/RM3 (RM3 also works from python?) but I had some script that I used before and slightly modified it for this. Basically using socks you create server that listens on some port and then with client send command on that port. So in this case you start server.py that initializes connection to broadlink device, starts socket and listens for filename. As soon as it gets filename it send command to broadlink (connection already opened.) I have not tested script (except for the socks part) but it should work. On the other hand client.py sends filename path to server (python client.py /home/pi/....)
Looks very interesting. Has anyone tried this out yet? Just wondering if the Broadlink times-out at all with this approach?

I don't have a Broadlink yet, but having found this thread I'm about to order one. I didn't want all the hassle of having a separate Android device running just for this, but the Python scripts running on my Domoticz RPi would do just great.I can spend £56 and get a broadlink and 5 switches for much less than the cost of an rfxcom alone...

Racierox
Posts: 6
Joined: Sunday 19 February 2017 20:34
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Racierox » Sunday 19 March 2017 12:54

I got the RM3 mini working using this method: http://domo-attitude.fr/broadlink-rm-promini-domoticz/
It works without an Android device!

Because I also have an RF remote I was wondering is this also works for the RM2 (& RM3) pro.
Can anybody confirm this? I couldn't find the differences between the RM2 pro and the RM3 pro (new version), which should I order?

doh
Posts: 69
Joined: Monday 01 December 2014 14:28
Target OS: Linux
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by doh » Monday 20 March 2017 23:48

I've got the scripts all up and running on my Domoticz Pi now and controlling the switches just perfectly. Took a little trial and error to get it working properly and I had to update the firmware on the broadlink, but I now have 5 RF switches all linked to virtual domoticz switches :)

markjgabb
Posts: 115
Joined: Wednesday 25 January 2017 0:00
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by markjgabb » Wednesday 22 March 2017 0:01

i seem to have the same thing going here i used the link here
http://domo-attitude.fr/broadlink-rm-promini-domoticz/
no phone no python, just put in the IP and mark it as RM2
and my mini 3 works perfectly....have setup two run codes for my reverse cycle air con, and now just have to put the blocky in place to run it
great setup,
my only trick now is to work around how to know if its already on, as for my AC if you send the same command twice it will toggle power

but thats a different topic
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Wednesday 22 March 2017 0:12

Racierox wrote:I got the RM3 mini working using this method: http://domo-attitude.fr/broadlink-rm-promini-domoticz/
It works without an Android device!

Because I also have an RF remote I was wondering is this also works for the RM2 (& RM3) pro.
Can anybody confirm this? I couldn't find the differences between the RM2 pro and the RM3 pro (new version), which should I order?
RF is OK too
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

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

Re: Using BROADLINK RM2 on DOMOTICZ

Post by zak45 » Wednesday 22 March 2017 0:23

just FYI, python plugin version will be available for testing in the next week(s) for people interested.

deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Wednesday 22 March 2017 0:26

zak45 wrote:just FYI, python plugin version will be available for testing in the next week(s) for people interested.
Great how to apply on tester ?
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

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

Re: Using BROADLINK RM2 on DOMOTICZ

Post by zak45 » Wednesday 22 March 2017 13:26

just in process to finalize Samsung TV python plugin and I will focus after on the Wiki for Broadlink RM2, all should be there.

deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Thursday 23 March 2017 1:44

zak45 wrote:just in process to finalize Samsung TV python plugin and I will focus after on the Wiki for Broadlink RM2, all should be there.
Cool as your on the first to made plugin can you comment your code ?

This way futur makes will can understand, and replicate.
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

MikeNg
Posts: 4
Joined: Tuesday 07 June 2016 4:50
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by MikeNg » Tuesday 28 March 2017 13:09

I got an issue with the playcode.py script running from on/off action of a domoticz switch. Checked in the log it say error executing script returned 256. Running the script from SSH comand line it works perfectly. Anyone could help? Many thanks!

I put in domoticz action like:
script:///home/domoticz/scripts/playcode.py /home/domoticz/scripts/tvOff.txt

it just did not work at all and the domoticz log shows error returned 256. When I CUT and PASTE this in the ssh command line it just works:

/home/domoticz/scripts/playcode.py /home/domoticz/scripts/tvOff.txt

deennoo
Posts: 900
Joined: Wednesday 10 December 2014 14:06
Target OS: Linux
Domoticz version: beta
Location: Bordeaux France
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by deennoo » Tuesday 28 March 2017 17:16

Have you set rights to your script and txt files ?/chmod....
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / ESP8266 / MQTT / BLE
http://domo-attitude.fr

reteip
Posts: 4
Joined: Tuesday 23 July 2013 14:57
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by reteip » Friday 07 April 2017 16:44

This python scripts are great! Got it working with my vacuum cleaner and television.

However there is one device, a heater, that is not recognized when learning, I think because the command is too simple or too short. I had this already with the official broadcom app. I eventually made an ESP01 mini webserver with an Infrared led to control it. But I would like to replace that with the Broadcom instead.

I tried to figure out what kind of protocol or IR command the Broadcom uses in the txt files generated. But I'm not sure how to convert.

My IR commands that i program with my ESP01 (arduino like IR led controller) are as following :

Code: Select all

pulseIR(15780) = on
pulseIR(8040) = off

static void pulseIR(long microsecs) {
  // we'll count down from the number of microseconds we are told to wait

  cli();  // this turns off any background interrupts

  while (microsecs > 0) {
    // 38 kHz is about 13 microseconds high and 13 microseconds low
   digitalWrite(IRledPin, HIGH);  // this takes about 3 microseconds to happen
   delayMicroseconds(10);         // hang out for 10 microseconds, you can also change this to 9 if its not working
   digitalWrite(IRledPin, LOW);   // this also takes about 3 microseconds
   delayMicroseconds(10);         // hang out for 10 microseconds, you can also change this to 9 if its not working

   // so 26 microseconds altogether
   microsecs -= 26;
  }

  sei();  // this turns them back on
}
So basically the command runs on 38 kHz and goes on and off with that rate (on and off in 26 milliseconds) for 15780 milliseconds to turn on the device and 8040 milliseconds to turn it off. Can anyone help me to create a Broadcom command txt file out of this?

Tisours97410
Posts: 5
Joined: Wednesday 12 April 2017 14:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Tisours97410 » Wednesday 12 April 2017 14:56

Hi , i've got the dame error
Would you give some answear?
[email protected]:~$ python learn.py
File "learn.py", line 3
import broadlink
^
IndentationError: unexpected inden
t
[email protected]:~$

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests