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
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.
#!/bin/sh
TEMPIDX=16
DEPTHIDX=15
UNITID=676252812
#UNITID=684148751
AUTH="-u oiltank:$PASSWORD"
BASEURL="https://$DOMOTICZURL/json.htm?type=command¶m=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.
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.
#!/bin/sh
TEMPIDX=16
DEPTHIDX=15
UNITID=676252812
#UNITID=684148751
AUTH="-u oiltank:$PASSWORD"
BASEURL="https://$DOMOTICZURL/json.htm?type=command¶m=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?
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):
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):