Simple Cayenne on ESP


I would add Cayenne to my project.

Unfortunately, I don’t know which library to use. Everywhere is full of examples but ready for given boards and systems.

I already have my system working on ESP and NRF24. Connects to WiFi, sends to Thingspeak and other things. I would like to add the option to send it to Cayenne. I just don’t know which library to use and what functions.

for esp8266 you can use this code Cayenne-MQTT-Arduino/ESP8266.ino at master · myDevicesIoT/Cayenne-MQTT-Arduino · GitHub

I connect via wifi.begin and I don’t want to change it.

When use Cayenne.begin (username, password, clientID) kills ESP

Another option is to use PubSubClient.h and publish the data manually. Here are the docs on manually publishing Cayenne Docs

any specific reason?

Yes. I have deep sleep support, channel data download and BSSID etc.

I thought it would be a simple and quick topic. That I would add one or two lines of code to send to Cayenne. The topic can be closed.

void setup() {
  WiFi.begin(ssid, wifiPassword);
  Cayenne.begin(username, password, clientID);

this works for me.

1 Like