Arduino Mega with ESP8266-01 Shield multiple server connections


I just found out on Cayenne this weekend I would like like to use this in my own project.
My existing project is built on an Arduino Mega R3 and a ESP8266-01 module as a Shield using HardwareSerial2.

I succesfully got the Cayanne dashboard working with the “ESP8266Shield” example provided with the library. However I want more :slight_smile:

I would like to combine this in my existing Sketch which also relies on my own home webserver which provides settings etc for my project. I use the WiFiEsp library in my project (

By creating my own version of “CayenneMQTTWifiClient.h”, I changed this to use the WiFiESP library. Now the result is that I can send information to the Cayenne Dashboard, which is OK, but when I need to receive information from the Cayenne Dashboard (e.g. button pressed) a time-out occurs. I tried debugging and resolving this, but I cannot seem to fix this.

So next I tried to use the ESP8266SerialLibrary which is in the package also, however I cannot get this to work in combination with my own webserver.

I desperately need some help, has anyone a version of the library which has the full capabilities for connecting to some defined webserver and also in parallel connect to the Cayenne MQTT dashboard?

I would very much appreciate any help!

Regards, Richard

can you share the exact error you are getting?

For what are you using the webserver for?