Cayenne / Thningspeak / mqqt

Hi,

I recently discover Cayenne and thingspeak. Cayenne sounds interesting because we have nice interface for web and phone.
As well we can act on data as an easy web by button.
Thingspeak is interesting beacause we can use matlab to analyze, replot and reuse values.

Is there a way to connect the arduino to the cayenne mqtt server and to thingspeak ? (I am using an arduino with esp8266 with the librairie: #include <CayenneMQTTESP8266Shield.h>)

I have not seen this done yet. BUT, if you are able to do it please let me know because this would be cool!

~Benny

I’m sending sensor data to both Cayenne and ThingSpeak, it isn’t big deal - just add both definition sets, and in loop push to both servers in specified intervals (I use old Cayenne implementation, so I push data every second, otherwise device renders disconnected, and every 10 seconds to ThingSpeak, not to burn all request limits they have…).

I guess this all-time-connected-devices ARE main reason for Cayenne to force MQTT for main client protocol, as this kind of devices consume a lot of resources… MQTT is, as I understand it, much lighter load on servers (am I right?).

1 Like

We would love to see the code used & why not also Blynk ??? Of course it is possible until you maybe run out of memory on say a UNO. I’ve tinkered with this idea and also considered a local Oled display
Regards all

1 Like

It would be really kind if you can share your programme !!

Thanks

I’m not especially good at this, but this works for me (I guess there is at least one better way to implement all this, optimized, cleaner - but this is the way I deal with it…).

I’m giving both my ways: simple (and older) Cayenne and ThingSpeak client and one with WiFiManager with set up fields for Cayenne token and ThingSpeak channelID and API key.

I work mainly with Wemos D1 Mini boards, which is ESP8266 based. I guess my sketches will work for most ESP8266 based boards, but some changes are probably needed. Use if in any way you find it usefull :slight_smile:

cayenne and thingspeak simple clients.txt (2.2 KB)
wifiManager for cayenne and thingspeak.txt (8.2 KB)

1 Like

Thank you so much for your help ! Your contribution is very nice ! I am going to make it work !
:wink:

2 Likes