Photon online no events seen in particle cloud


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 .



Let me ping someone that might be able to help, @rickkas7 are you able to assist?


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.

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.

Thank you.

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.

1 Like

Thanks @ScruffR!

Does it make a difference between private and public events. It doesn’t really matter to me so why they where just left public.

How do you guard publish re-triggers, simple millis() check prior to calling?

Switch is already debounced, thanks for the idea.

The difference between PUBLIC and PRIVATE is many fold

  • you may not want your “sensitive” data to be seen by others
  • you may want to subscribe to your events but don’t want others to trigger your subscription by just publishing an event of the same name
  • you should not trigger someone elses subscriptions which just happen to listen to the same public event either
  • you don’t want to overwhelm the public event stream with data that’s not of public interest

A millis() guard would work just fine.

1 Like

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

Many, but without your complete code too many :sunglasses:

1 Like