Using BROADLINK RM2 on DOMOTICZ

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

Moderator: leecollings

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 »

inzimam wrote: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?
It's not for beginners, minimal skill needed. It's designed for linux based machines, raspberry pi etc. But maybe for windows too, but probably You need install first "python" and Domoticz.
You find all info on the web.
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 »

Curious answer

In computing the real competence is not to create a so called program, but to give to all the ways to use it easily

Assert that it is specialist affair, it often is to hide the fact of having no capacity to go at the end of a complete project

The RM BRIDGE on Android was created to be use by all

The plugin on JEEDOM, too, and it' s know ready, it was also created with the same idea

The TASKER plugin also
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 »

forumfab wrote:Curious answer

In computing the real competence is not to create a so called program, but to give to all the ways to use it easily

Assert that it is specialist affair, it often is to hide the fact of having no capacity to go at the end of a complete project

The RM BRIDGE on Android was created to be use by all

The plugin on JEEDOM, too, and it' s know ready, it was also created with the same idea

The TASKER plugin also
So try to configure everything first on windows and then write some noobs friendly how to. I was do that for linux based devices.

Cheers
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

there is no linux approch for Python
If it's working on linux, it's working on windows !

The demand is about a full fonctionnal tool, easy to install, and not a toy for geeks that think to be specialist .

You seems to be a little nervous .

May be you do want to do more, it's you right , but don't affirm that the solution is workink ..

Just and exemple on the basic linux that is install for DOMOTICZ, all the librairies that are use in the 5 firsts lines are'nt not implement

setuptools not implement on Basic DOMOTIC

Crypto.Cipher not implement on basic DOMOTICZ

And so on ...

The user must install some of them ..

Cheers too
inzimam
Posts: 4
Joined: Saturday 24 December 2016 23:36
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by inzimam »

Could you please help with this then at least:

My current setup is using the RM Bridge and I have got to work fine with Alexa, apart from the Broadlink Switches which have a code too long for the RM Bridge. I may be able to resolve this by trying again with a RF Learning Remote or using the RM Tasker Plugin app (I'm trying to figure out if I can run this on my Amazon Fire TV which is where I'm running the RM Bridge)..

Currently the Devices all show up as as SmartThing device so Alexa can see and use them. I'm going to add Philips Hue lights and these will also show up separately.

So can you please tell me what the advantage of using Domoticz is?
Tyalis
Posts: 3
Joined: Thursday 05 January 2017 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Tyalis »

Hi there, I've just ordered the Broadlink RM2 and noticed a plugin has been release for Jeedom which does not required to use the RM Bridge nor any Android platform. It's free on their plugin store.
Could someone confirm and/or tell if we're now able to manage the device directly from Domoticz ?
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 »

Tyalis wrote:Hi there, I've just ordered the Broadlink RM2 and noticed a plugin has been release for Jeedom which does not required to use the RM Bridge nor any Android platform. It's free on their plugin store.
Could someone confirm and/or tell if we're now able to manage the device directly from Domoticz ?
Hi Yalis,

The answer is yes for JEEDOM
The answer is NO for Domoticz

in the actual state , on Domoticz it's just à piece of differents parts, that couldn't be easy install, and use.

Bests regards
Tyalis
Posts: 3
Joined: Thursday 05 January 2017 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Tyalis »

Hi forumfab, thanks for your quick answer.

Is it no possible to retro-engeneer the Jeedom plugin to see how it's able to manage the Broadlink without RM Bridge and code the same way into a script or any other component that can be handled by Domoticz ?
Is it not as easy as looking what requests the official application sends and then send the very same through a script ?

I'm sorry if my questions are stupid as I'm quite new to the domotic world but I'm very surprised of the need of that Android bridge.
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 »

Tyalis wrote:Hi forumfab, thanks for your quick answer.

Is it no possible to retro-engeneer the Jeedom plugin to see how it's able to manage the Broadlink without RM Bridge and code the same way into a script or any other component that can be handled by Domoticz ?
Is it not as easy as looking what requests the official application sends and then send the very same through a script ?

I'm sorry if my questions are stupid as I'm quite new to the domotic world but I'm very surprised of the need of that Android bridge.
Hi Tyalis,

JEEDOM and DOMOTICZ are based on two differents approaches

JEEDOM is using Plugings , and the RM' Jeedom's solution is base on a plugin

The best solution could be to ask to the JEEDOM developper, if it could get an interest to help the Domoticz Users ...

Here is the forum' page about the Plugin

https://www.jeedom.com/forum/viewtopic. ... &start=100

You can let your demand in English

The developper is sarakha63
Tyalis
Posts: 3
Joined: Thursday 05 January 2017 11:02
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Tyalis »

Ok I've read that post and I've just noticed that the solution had already been given here too, my bad.
The python library does not require the RM Bridge so we are well able to use the Broadling without it. The Jeedom plugin make use of that library and allow creation of a daemon for ease of use.

It would still be great to have native support in Domoticz. Do you know if it has already been asked to Domoticz developers ?
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 »

Tyalis wrote:Ok I've read that post and I've just noticed that the solution had already been given here too, my bad.
The python library does not require the RM Bridge so we are well able to use the Broadling without it. The Jeedom plugin make use of that library and allow creation of a daemon for ease of use.

It would still be great to have native support in Domoticz. Do you know if it has already been asked to Domoticz developers ?
Hi TYalis,


I think that nobody did for the moment
Doler
Posts: 142
Joined: Friday 31 July 2015 21:02
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Sint-Oedenrode, Netherlands
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Doler »

I'm not knowledgeable in that area but maybe the new python plugin development (beta) creates an opportunity? Just a thought.
Mark: Domoticz Beta on Raspberry Pi 4 running Debian Bookworm - Z-Stick 7 - RFXCom - P1 - MySensors - SolarEdge - Dahua - Philips Hue - Docker - Zigbee2mqtt (plugin) - Zwave-js-ui - dzVents - Nodered
markT
Posts: 1
Joined: Friday 06 January 2017 11:41
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by markT »

Hi there.
This looks like an excellent integration. I've just place an order for the RM2 but I can't work out how to install the library for use in Python.
Can anyone help me please - apologies if I'm being dumb :-)
anatopeck
Posts: 12
Joined: Wednesday 06 April 2016 14:36
Target OS: NAS (Synology & others)
Domoticz version: last one
Location: france
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by anatopeck »

Helllo

I am sad the tweak between broadlink RM2 and Domoticz, it's only for raspberry :( It's not available for my syno maybe one day if jumbro got enough time to add the RM2 into the device list :)
Anyway thanks again jumbotroll and the team
Synology DS214play (DSM 6.0.1-7393 Update 1)
Domoticz Version: always the last one
Aeon Labs Z-Stick Gen5 - Version: 1.4-305-g150a299-dirty
Netatmo + module ext - Fibraro stuff - broadlink rm2
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by madrian »

I just ordered a RM3 Mini. I want to control my Air Conditioner. As I saw, it is possible to control (on/off, change temperature, mode, fan speed) from the official app, but I am nut sure with the Python code.
MadBanana
Posts: 25
Joined: Thursday 13 October 2016 21:45
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Kent, England
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by MadBanana »

I have an RM3 mini and I've had mostly successful recording and playback of code using the python routines. Where I'm struggling at the moment is with dimmer that need a short press to turn on / off and a longer one to dim up / down. I can't seem to get the recorded length right.

But in the main, all is good!
Smurfen
Posts: 2
Joined: Tuesday 10 January 2017 23:22
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by Smurfen »

Hello! I don't get any error running learn and play command, but I do not get any IR light from my RM PRO-E unit.
I run a "Dummy" dometicz switch script: script:///home/domoticz/scripts/python/playcode.py /home/domoticz/scripts/python/soundOn.txt
To send IR code to my Logitech Z-5500 system and turn it ON/OFF.
Is there any way to send a test to the RM PRO-E IR signal within Raspberry PI:s root (pi@raspberrypi:~ $) ??
My Ip address and MAC adresses are correct.
moacir
Posts: 12
Joined: Monday 23 January 2017 20:21
Target OS: NAS (Synology & others)
Domoticz version: V4.10717
Location: Curitiba - PR - BR
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by moacir »

Hi! Until yesterday i used my Raspberry Pi 2 (cron + curl to send http requests) and RM Bridge to automate my RF switches. But today i decided to install Domoticz and python-broadlink. Now my system does not depend on 3 devices (raspberry, android tablet and the RM2 broadlink), but only two (raspberry and RM2) and all managed by just an accessible secure (HTTPS) interface from any web browser!!! And there's a fantastic free cell app (Android in my case) that can connect automatically to the internal and external network (3G, 4G). I have found that learn.py does not copy RF codes, just IR. But it is very easy to work around this, just use RM Bridge to clone the RF codes and then copy them to a txt file, by removing the code header and entering only the HEX code.

Now I have some doubts, since I'm not very acquainted with python and Domoticz yet:
- Is there any way to get the sensor temperature built into RM2 through python-broadlink and put it as a sensor in Domoticz?
- Is there any way to get the Broadlink A1 Sensor (i have one) readings through python-broadlink and put the values as sensors in Domoticz?

I would be very grateful if anyone with more experience could guide me on these issues. If this is possible, a Raspberry Pi (now version 3 and more powerful) will become the only IoT manager for a home: samba server for file sharing (i use), Transmission Bittorrent (i use), Zoneminder for IP camera management and record (i use), Webmin for Raspberry management (i use) and Domoticz for automation (for now i use only RM2, but in the future I'll use GPIOs). And all this consuming a minimal amount of electricity. My UPS APC BR-1500 (old model) with the battery pack (6 total 12V x 9Ah) keeps my system for ~5 hours (modem + router + brazilian JFL alarm central + raspberry + RM2 + A1 sensor + two IP cameras 720p + Samsung 1TB portable HDD + Seagate 5TB portable HDD).

Thanks!
aldodemi
Posts: 25
Joined: Tuesday 07 October 2014 17:43
Target OS: Linux
Domoticz version: 3.8275
Location: Genoa Italy
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by aldodemi »

Here a script to read RM2 temperature sensor, where 192.168.0.15 is the IP address for YOUR RM2 and "XX YY ZZ KK JJ WW" is its mac address, TEMP_IDX the index for the virtual switch in domoticz:

Code: Select all

#!/bin/bash
#
DOMO_IP="127.0.0.1"                     # Domoticz IP Address
DOMO_PORT="8080"                        # Domoticz Port
TEMP_IDX="824"                          # IDX for Virtual switch temperature

cd /home/domoticz/domoticz/scripts/python/broadlink/

function sensore {
python - <<END
import broadlink
import time
device = broadlink.rm(host=("192.168.0.15",80), mac=bytearray.fromhex("XX YY ZZ KK JJ WW"))
device.auth()
sensor = device.check_temperature()
print sensor
END
}

# Call it and capture the output
SENSORE=$(sensore)
echo Sensore: $SENSORE
temperature=$(echo $SENSORE | cut -d' ' -f8 - | tr -d ,)
echo $temperature
#
curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$TEMP_IDX&svalue="$temperature""
Server Domoticz 3.7243 (usually the last beta) on Debian Linux (Jessie) - Hw homemade with Atom CPU/4 GB RAM
RFXCom and ZWave Stick (Aeon)
aldodemi
Posts: 25
Joined: Tuesday 07 October 2014 17:43
Target OS: Linux
Domoticz version: 3.8275
Location: Genoa Italy
Contact:

Re: Using BROADLINK RM2 on DOMOTICZ

Post by aldodemi »

Here a script to read A1 sensors, where 192.168.0.16 is the IP address for YOUR A1 and "XX YY ZZ KK JJ WW" is its mac address, varius xxxx_IDX the index for the virtual switchs in domoticz:

Code: Select all

#!/bin/bash
#
DOMO_IP="127.0.0.1"                     # Domoticz IP Address
DOMO_PORT="8080"                        # Domoticz Port
AIRQ_IDX="821"                          # IDX for Virtual switch air_quality
LIGHT_IDX="822"                         # IDX for Virtual switch light
NOISE_IDX="823"                         # IDX for Virtual switch noise
TEMP_IDX="819"                          # IDX for Virtual switch temperature
HUM_IDX="820"                           # IDX for Virtual switch humidity

cd /home/domoticz/domoticz/scripts/python/broadlink/

function sensori {
python - <<END
import broadlink
import time
device = broadlink.a1(host=("192.168.0.16",80), mac=bytearray.fromhex("XX YY ZZ KK JJ WW"))
device.auth()
sensors = device.check_sensors()
print sensors
END
}

# Call it and capture the output
SENSORI=$(sensori)
echo Sensori: $SENSORI
#
# Esempio output {'air_quality': 'excellent', 'light': 'dark', 'noise': 'quiet', 'temperature': 23.3, 'humidity': 48.0}
#
air_quality=$(echo $SENSORI | cut -d' ' -f2 - | tr -d ,)
light=$(echo $SENSORI | cut -d' ' -f4 - | tr -d ,)
noise=$(echo $SENSORI | cut -d' ' -f6 - | tr -d ,)
temperature=$(echo $SENSORI | cut -d' ' -f8 - | tr -d ,)
humidity=$(echo $SENSORI | cut -d' ' -f10 - | tr -d })

#/json.htm?type=command&param=udevice&idx=IDX&nvalue=HUM&svalue=HUM_STAT
# IDX =idx de votre capteur. A obtenir depuis l’écrans des dispositifs.
# HUM = Humidité: 45 par exemple pour 45%
# HUM_STAT = Humidity_status
# Humidity_status peut être :
#
# 0=Normal
# 1=Confortable
# 2=Sec
# 3=Humide
# Ce paramètre est obligatoire, si vous ne savez pas quoi mettre, mettez 0

hum_stat=0
#if [ $humidity<25 ]; then hum_stat=2; fi
#if [ $humidity>60 ]; then hum_stat=3; fi
#if [ $humidity>=25 && $humidity<=60 ]; then hum_stat=1; fi

case $humidity in
[0-25])
  hum_stat=2
  ;;
[26-60])
  hum_stat=1
  ;;
[61-100])
  hum_stat=3
  ;;
*)
  hum_stat=0
  ;;
esac

echo $air_quality
echo $light
echo $noise
echo $temperature
echo $humidity
echo $hum_stat

curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$AIRQ_IDX&svalue="$air_quality""
curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$LIGHT_IDX&svalue="$light""
curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$NOISE_IDX&svalue="$noise""
curl -s -i -H "Accept: application/json" "http://$DOMO_IP:$DOMO_PORT/json.htm?type=command&param=udevice&idx=$TEMP_IDX&svalue="$temperature""
Sensor hum_stat at the moment doesn't works...
Server Domoticz 3.7243 (usually the last beta) on Debian Linux (Jessie) - Hw homemade with Atom CPU/4 GB RAM
RFXCom and ZWave Stick (Aeon)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest