ThingSpeak MQTT

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
rayE
Normal user
Posts: 144
Joined: 12 Oct 2017, 12:53
Location: Philippines

ThingSpeak MQTT

#1 Post by rayE » 21 Apr 2019, 02:14

Hi All,
My project currently sends 8 data fields to Thing speak using the REST API at 30 second intervals, example below.

Code: Select all

SendToHTTP api.thingspeak.com,80,/update?key=yourWriteAPIkey&field1=[HLW_Accu#V]&field2=[HLW_Accu#A]&field3=[HLW_Accu#W]&field4=[HLW_Accu#Count]&field5=[S_Info#WiFi]&field6=[S_Info#Load]&field7=[S_Info#Uptime]&field8=[VAR#1
This works fine but every now and again Thingspeak does not receive the data i send (maybe 1 out of 20 sends).

Thingspeak also supports MQTT so i was thinking of setting up a new channel and sending the data from espEasy using both sendToHTTP and MQTT methods so i can compare the 2 methods, maybe one is better than the other? Thingspeak MQTT API below.
https://www.mathworks.com/help/thingspeak/mqtt-api.html

I have never used MQTT and im looking for any pointers to get this working. so i guess the questions are.......
1. Which MQTT controller do i use?
2. Will the controller allow me to send all 8 values in one go?
3. Can i just use the Publish command instead of a controller?

Any help/ideas mucho appreciated.
Ray

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests