Suppress "spark/device/diagnostics/update" events

I’m testing sleep scenarios (specifically “stop”) and I see the spark/device/diagnostics/update event firing on every reconnect. I’m reconnecting every minute right now. Is there a way to sleep and reconnect without this event firing? If this is normal behavior, is there a way to disable this event entirely?

1 Like

It is normal behaviour to see spark/device/diagnostics/update at startup and after a wake from “stop”. It is there to populate the device vitals data you see in the console. It was introduced from Device OS 0.8.0 so with a Boron you don’t have the option of going pre-feature. AFAIK - there isn’t a way to turn off the event. Why is this event causing you a problem? I have a large fleet (Gen2) which spend a lot of time in sleep/stop and we just ignore this event for any monitoring.

With many wake cycles the data quota “wasted” for potentially unwarranted publishes may become a concern.

I’d agree that something like System.disableFeature(FEATURE_DIAGNOSTIC_EVENT) could be handy for some use cases.


I just stumbled upon a solution. If I call Particle.disconnect() prior to turning off the modem and going to sleep, the diagnostics event is not triggered on the next connection. I don’t know if this is by design or not.

This seems to work in some cases but is not a reliable solution.

We plan on providing a way to suppress those for use cases like that.

However, if your sleep time is less than 5 minutes, you’ll actually use less power if you use stop mode sleep with SLEEP_NETWORK_STANDBY. Not only will you save power and data, but you won’t get the diagnostic sleep events when you wake because a new cloud connection is not made after sleep in that mode.

1 Like

Second this. I am seeing a more than doubling of my data usage since this was implemented along with an additional 8% increase in power consumption (which is very much not ideal in my device scenario).

1 Like