To start we are only at ~700k events of our 2.5MM for the month. I have a bunch of devices which after running for a time will be on line (breathing cyan), show in Particle Cloud as online, but no events are being received from the device. During this condition I can call functions and request variables from the device.
Restarting the device corrects this issue. After restarting, the device goes online and events start flowing again.
I am not really sure where to start troubleshooting here as the events just stop. There are three events published. One every 10 seconds, and two others every 30 seconds.
Any help in a direction on troubleshooting is really appreciated .
Thank you @KyleG and @rickkas7. The events are driven using a timer e.g.: Timer statusTimer(doStatusPeriod, doStatusAction);
There are three of them as stated above.
where: unsigned int doStatusPeriod = 10000; // How often to send status data
void doStatusAction() { doSendStatus = true; }
Any work is done in loop() based on boolean doSendStatus. The publish looks like: Particle.publish("TCRE-NeedHelp", 'GREEN');
I am thinking this may be something to do with the timer where it stops firing or something. The particle has a switch connected to it, which when closed fires an event (Particle.publish). This event is received as expected.
Just for consideration:
If you donāt need your events to be public publish them as PRIVATE.
Also guard your publishing calls against unintentional retriggers within the same second. Violating the rate limit once will require your code to keep silent for 4+ seconds and unserviced timers might queue up till they get a chance to fire and might cause a rate limit violation.
Also bouncing switches might cause rate limit violations.
So I created my own ātimerā using millis() in the loop() function and I have not seen an issue yet today. All events are firing as expected. So there is certainly something I did which is affecting the software timer stuff. Not sure what since I am only setting a bool in the call. Thoughts? @ScruffR@rickkas7