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