Page 11 of 13

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Wednesday 01 February 2017 20:43
by madrian
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)?

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Wednesday 01 February 2017 21:47
by deennoo
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 !

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Friday 03 February 2017 21:17
by Smurfen
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:

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Saturday 04 February 2017 11:49
by madrian
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.

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Thursday 16 March 2017 5:59
by MikeNg
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?

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Thursday 16 March 2017 6:18
by moacir
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.

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Sunday 19 March 2017 11:45
by doh
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...

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Sunday 19 March 2017 11:54
by Racierox
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?

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Monday 20 March 2017 22:48
by doh
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 :)

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 21 March 2017 23:01
by markjgabb
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

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 21 March 2017 23:12
by deennoo
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

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 21 March 2017 23:23
by zak45
just FYI, python plugin version will be available for testing in the next week(s) for people interested.

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 21 March 2017 23:26
by deennoo
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 ?

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Wednesday 22 March 2017 12:26
by zak45
just in process to finalize Samsung TV python plugin and I will focus after on the Wiki for Broadlink RM2, all should be there.

Re: RE: Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Thursday 23 March 2017 0:44
by deennoo
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.

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 28 March 2017 13:09
by MikeNg
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

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Tuesday 28 March 2017 17:16
by deennoo
Have you set rights to your script and txt files ?/chmod....

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Friday 07 April 2017 16:44
by reteip
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?

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Wednesday 12 April 2017 14:56
by Tisours97410
Hi , i've got the dame error
Would you give some answear?
pi@raspberrypi:~$ python learn.py
File "learn.py", line 3
import broadlink
^
IndentationError: unexpected inden
t
pi@raspberrypi:~$

Re: Using BROADLINK RM2 on DOMOTICZ

Posted: Wednesday 12 April 2017 15:02
by Tisours97410
Got the same error keptenkurk ,could you help me please?