GET data from thingspeak.com into domoticz temperature tab

Moderator: leecollings

Post Reply
User avatar
kevink
Posts: 7
Joined: Thursday 08 September 2016 16:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5700
Location: Netherlands
Contact:

GET data from thingspeak.com into domoticz temperature tab

Post 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 2347 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:)
four2six
Posts: 53
Joined: Wednesday 24 February 2016 9:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NRW, Germany
Contact:

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

Post by four2six »

i'd do a search for updating user variables with lua scripts, or any other script language your system supports
User avatar
kevink
Posts: 7
Joined: Thursday 08 September 2016 16:08
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.5700
Location: Netherlands
Contact:

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

Post 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.
four2six
Posts: 53
Joined: Wednesday 24 February 2016 9:16
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: NRW, Germany
Contact:

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

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest