Using RTL_433 app as reciever

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

Moderator: leecollings

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

Re: Using RTL_433 app as reciever

Post by deennoo »

Koensk wrote:
deennoo wrote:yes, but can get one on EBAY for 8€.

A cheap 433mhz emiter can be buy for less than 1€ (actullaly i'm driving my cheap rc switch with one of this, and a lua script and that works like a charme, i'm on the way to get state of this rcswitch if somebody use the remote)

With this of course you have to made your own script and use differente app to make Domoticz as full fonctionnal it can, hobby time is free.
Do you still use this setup?
I also have this 433mhz transmitter but have no idea how to set this up with nu Rpi and Domoticz.
Sorry to be late !

I travel a lot since rtl433...using 433utils, then rfxtrx, then RFLink and finaly got my final solution : RFLink with wifi inside.

For sure please provide all script who can works with rtl433 and domoticz, this might interesse alot of people
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by Koensk »

This is the site I found everything I needed:

https://web.archive.org/web/20150415084 ... spberry-pi
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: Using RTL_433 app as reciever

Post by alexsh1 »

deennoo wrote:
Koensk wrote:
deennoo wrote:and finaly got my final solution : RFLink with wifi inside.
Would you please elaborate on this? Photos and links would be good too. :D
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by dwmw2 »

jcsat wrote:Have a working script, which creates an rtl_433 virtual hardware and detects new devices known to the scripts, puts them as a new detected device in domoticz after which you can handle them as normal input. Started with prologue, continue with some more weather sensors.

If someone is interrested or want to give me a hand coding, pplease let me know. Written in python.
That sounds excellent. Yes please!
Koensk
Posts: 33
Joined: Friday 25 September 2015 9:23
Target OS: NAS (Synology & others)
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by Koensk »

Me 2 please

Verstuurd vanaf mijn XT1562 met Tapatalk
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by dwmw2 »

I'm using this hack now:

Code: Select all

#!/bin/sh

TEMPIDX=16
DEPTHIDX=15
UNITID=676252812
#UNITID=684148751
AUTH="-u oiltank:$PASSWORD"
BASEURL="https://$DOMOTICZURL/json.htm?type=command&param=udevice&nvalue=0"

~/git/rtl_433/src/rtl_433 -R 42 -F json -l 1800 -q -a -t  | tee tankmon-out-$$    |
    sed -un '/"id" : '$UNITID',/s/.*"temperature_C" : \([0-9.]*\).*"depth" : \([0-9]*\).*/\1 \2/p' |
    while read TEMP DEPTH; do
        curl  $AUTH "${BASEURL}&idx=${TEMPIDX}&svalue=${TEMP}"
        curl  $AUTH "${BASEURL}&idx=${DEPTHIDX}&svalue=${DEPTH}"
    done
Ideally though, I think Domoticz would spawn rtl_433 for itself and just read the JSON from its stdout. Or if that's too painful to do under Windows then perhaps we could teach rtl_433 to publish its findings via MQTT. Then we'd have to add support for that to Domoticz, a bit like the existing MySensors support.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by dwmw2 »

Note: I found I needed to get curl to save and use cookies, to work around http://www.domoticz.com/forum/tracker.php?p=1&t=691 and avoid the UserSessions table exploding with expired sessions as they aren't currently cleaned up properly.

I did that by adding "-b .domocookie -c .domocookie" to the curl command lines.
gflvern
Posts: 19
Joined: Monday 29 December 2014 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by gflvern »

dwmw2 wrote:I'm using this hack now:

Code: Select all

#!/bin/sh

TEMPIDX=16
DEPTHIDX=15
UNITID=676252812
#UNITID=684148751
AUTH="-u oiltank:$PASSWORD"
BASEURL="https://$DOMOTICZURL/json.htm?type=command&param=udevice&nvalue=0"

~/git/rtl_433/src/rtl_433 -R 42 -F json -l 1800 -q -a -t  | tee tankmon-out-$$    |
    sed -un '/"id" : '$UNITID',/s/.*"temperature_C" : \([0-9.]*\).*"depth" : \([0-9]*\).*/\1 \2/p' |
    while read TEMP DEPTH; do
        curl  $AUTH "${BASEURL}&idx=${TEMPIDX}&svalue=${TEMP}"
        curl  $AUTH "${BASEURL}&idx=${DEPTHIDX}&svalue=${DEPTH}"
    done
Ideally though, I think Domoticz would spawn rtl_433 for itself and just read the JSON from its stdout. Or if that's too painful to do under Windows then perhaps we could teach rtl_433 to publish its findings via MQTT. Then we'd have to add support for that to Domoticz, a bit like the existing MySensors support.
Is this the script I need to send the values from rtl_433 to my virtual switches in Domoticz?
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by dwmw2 »

gflvern wrote:Is this the script I need to send the values from rtl_433 to my virtual switches in Domoticz?
Yes, but note the subsequent comment about tracker ticket #691(although the tracker seems to be down atm or just entirely absent). Make the 'AUTH=' line look like this (with your own username and password, of course, and your own choice of where to store the authenticate cookie):

Code: Select all

AUTH="-u oiltank:$PASSWORD -b .domocookie -c .domocookie"
gflvern
Posts: 19
Joined: Monday 29 December 2014 11:14
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by gflvern »

dwmw2 wrote:
gflvern wrote:Is this the script I need to send the values from rtl_433 to my virtual switches in Domoticz?
Yes, but note the subsequent comment about tracker ticket #691(although the tracker seems to be down atm or just entirely absent). Make the 'AUTH=' line look like this (with your own username and password, of course, and your own choice of where to store the authenticate cookie):

Code: Select all

AUTH="-u oiltank:$PASSWORD -b .domocookie -c .domocookie"
Thanks

What if I'm not using AUTH on Domiticz?
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: Using RTL_433 app as reciever

Post by dwmw2 »

In that case I think you're fine. Although I have a vague recollection I saw the UserSessions table growing even then. Watch it and check.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest