Page 1 of 1
Sending raw live data somewhere else
Posted: Saturday 06 May 2017 14:19
by kasei
Hello,
So I get temperature and humidity readings thanks to an RFLink connected to my raspberry pi.
Domoticz is set to read data from the rflink.
I'd like to send temperature and humidity values to another website as they come (via POST or GET)
any idea ?
thanks in advance !
Re: Sending raw live data somewhere else
Posted: Saturday 06 May 2017 15:40
by jvdz
Should be fairly simple when you use for example lua.
You simply make a device script which tests for the devicechanged() containing the information and do an OpenUrl command.
Something like this: (untested)
Code: Select all
commandArray = {}
if devicechanged("Temp") then
tempval = otherdevices_svalues['Temp']
commandArray['OpenURL']='website/url?temp=' .. tostring(tempval)
EndFunc
return commandArray
Jos
Re: Sending raw live data somewhere else
Posted: Saturday 06 May 2017 16:20
by asjmcguire
jvdz wrote:Should be fairly simple when you use for example lua.
You simply make a device script which tests for the devicechanged() containing the information and do an OpenUrl command.
Something like this: (untested)
Code: Select all
commandArray = {}
if devicechanged("Temp") then
tempval = otherdevices_svalues['Temp']
commandArray['OpenURL']='website/url?temp=' .. tostring(tempval)
EndFunc
return commandArray
Jos
Shouldn't this devicechanged test be using:
devicechanged['Temp_Temperature'] ?
Re: Sending raw live data somewhere else
Posted: Saturday 06 May 2017 20:37
by Lebo2d9
With mqtt?
Verstuurd vanaf mijn SM-G920F met Tapatalk