Page 1 of 1

GET data from thingspeak.com into domoticz temperature tab

Posted: Sunday 13 November 2016 10:56
by kevink
I have a Thingspeak channel with Temperature and Humidity and would like to import this data into Domoticz, so that I can see the graphs in the "temperature" tab.
(And next: PID control my z-wave thermostat with it? or maybe some rules like IF I'm home && temp < 17 degC THEN Set temperature to 20degC something like that would be cool)

In thingspeak there are some data export fields:
Screen Shot 2016-11-11 at 13.37.47.png
Screen Shot 2016-11-11 at 13.37.47.png (254.86 KiB) Viewed 2364 times

So how do I get this data into Domoticz? I tried Setup->more->DataPush->Http, but there I should specifiy which device? Ehm? A new one? So I go to hardware to add a device. Which one should I select at 'type'? maybe http/https poller? If so, what should I put in the config fields?
I'm really lost here and hope some of you can point me into the right direction:)

Re: GET data from thingspeak.com into domoticz temperature tab

Posted: Sunday 13 November 2016 14:01
by four2six
i'd do a search for updating user variables with lua scripts, or any other script language your system supports

Re: GET data from thingspeak.com into domoticz temperature tab

Posted: Sunday 13 November 2016 18:45
by kevink
Thanks @four2six,
So if I understand correctly I can make and update user variables using the domoticz api / json url http://www.domoticz.com/wiki/Domoticz_A ... _variables
And I need to make a script to pass my values from thingspeak into that url.... Then run this script every minute or so (using cron?). Correct me if I'm wrong!
Then I have the data in user variables in domoticz. Is there a way to display them in the temperature tab?

PS: If someone knows an easier way, please let me know. The above method is going to be quite a challenge for me.

Re: GET data from thingspeak.com into domoticz temperature tab

Posted: Sunday 13 November 2016 22:46
by four2six
actually, thinking again, i would add a virtual sensor, not a user variable. but the process is the same.
if you choose the right virtual sensor it will be displayed in the temperature tab.
this seems a good example to start from:
http://www.domoticz.com/wiki/Virtual_weather_devices