Reading data from ThingSpeak

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Reading data from ThingSpeak

#1 Post by velja » 08 Feb 2017, 08:27

Hello,
First of all, I want to say that is very nice forum but so sad that development of ESP Easy is finish. I hope that somebody will continue Martinus work.

Now, I start to play with ESP8266 (ESP-01). I measuring temperature and sent it to Thingspeak. https://thingspeak.com/channels/223650 . As I want to make weather station which will be located outdoor and send data to Thingspeak, indoor I'll make second device with display with measuring data.

How I connect this second device to ThingSpeak and read temperature, humidity...? I read some topics on forum about MQTT import but I can't understand whole procedure of making firmware since I'm not Arduino user.

Thanks,
Sory about my english

Velja

parbar
Normal user
Posts: 13
Joined: 28 Oct 2015, 07:26

Re: Reading data from ThingSpeak

#2 Post by parbar » 08 Feb 2017, 09:42

I have similar setup and I use Globalsync.
One esp with oled is displaying values from a second esp. I use Wemos d1 mini units.

Have a look at http://www.letscontrolit.com/wiki/index ... GlobalSync

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: Reading data from ThingSpeak

#3 Post by velja » 08 Feb 2017, 09:56

This is the last solution. I like to have server that allow me and somebody else to view what's happen when I'm not at home.

parbar
Normal user
Posts: 13
Joined: 28 Oct 2015, 07:26

Re: Reading data from ThingSpeak

#4 Post by parbar » 09 Feb 2017, 08:23

Still possible. Using rules I also update thingspeak with data from both ESP.

https://thingspeak.com/channels/21739

Field 1,2 and 3 are one ESP with 3 pcs of ds18b20.
Field 4 is another esp with Oled and a SI7021sensor. I have the scrolling oled plugin. This ones sends data from both ESP to thingspeak by rules.

Both units also send data individually to my own domoticz server.

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: Reading data from ThingSpeak

#5 Post by velja » 09 Feb 2017, 09:36

Exellent! Is possible to send me your rules to see how to do that?

parbar
Normal user
Posts: 13
Joined: 28 Oct 2015, 07:26

Re: Reading data from ThingSpeak

#6 Post by parbar » 09 Feb 2017, 11:22

Yes, I will do that in evening when home.

parbar
Normal user
Posts: 13
Joined: 28 Oct 2015, 07:26

Re: Reading data from ThingSpeak

#7 Post by parbar » 09 Feb 2017, 20:00

I made my best to explain below. Maybe confusing but let me know any questions. I'm sure there are more experience menbers that can help out to.

1: Enable Global sync on devices
2: Enable Rules
Test that Global sync is working. It is described in the wiki. If you allready set your ESP up you might have to change the device task number i.e Number 1 will also be number 1 on the other unit.
In rules in one of the ESP I have this code:

Code: Select all

On Ute#Temperature do
SendToHTTP 184.106.153.149,80,/update.html?key=XXXXXXXXXXXXXX&field1=[Ute#Temperature]&field2=[t1#Temp]&field3=[t2#Temperature]&field4=[InneK#Temperatur]
endon
endon
You have to replace XXXXXXXXXXXXXX with your key to thingspeak. Also change the part after each fieldx=to match your sensors. In My case I have 4 sensors reported to thingspeak. What happens is that when the Ute#Temperature is updated (It is set to 60 seconds) the SendToHTTP part is triggered and sends all data to thingspeak. You should have the sensor for triggering on same ESP as the rules. I guess this means that some senor data could be upto 1 minute old, however this doesnt matter for me just measuring outdoor and indoor temperatures.

velja
Normal user
Posts: 31
Joined: 08 Feb 2017, 08:07

Re: Reading data from ThingSpeak

#8 Post by velja » 10 Feb 2017, 08:45

Thank you! I wait some parts to come from China and when they come I 'll try.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 15 guests