Cayenne refuse the conection?

Hi,
how Could I know that cayyene is refusing my conection and why?
My project was starting good and some minutes later start to lost comunication.
Im using 3 sliders and sending a data about the feeback status of the vaue send as well of the typican sensors, humidity,temperature and luminosity.

I am surfering a very poor experience and I sure that something wrong I am doing because with the old library it was working very good.

Now I’m with arduino and ESP8266-01 as a wifi shield in MQTT.

You may be hitting the rate limit.

How we could know?

You can post your code and we can tell you :slight_smile:

Here is a example of how to only send your data at intervals rather than flooding the connection/server with data. This sends the virtualwrites every 10 seconds.

insert code into your sketch:

unsigned long time4 = 0;  // declare variable

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


void loop()
{
    Cayenne.loop();

	if (millis() - time4 > 10000)  // sends data every 10 sec
	  {
		  Cayenne.virtualWrite(0, 1, "digital_sensor", "d");  // send any data here
		  time4 = millis();  // resets timer
	  }
}
1 Like