I have a Xenon that is set up to publish a piece of data, then go into stop mode via System.sleep(D2,RISING,30); for 30 seconds followed by waking up and repeating.
I use Particle.publish for the data. It works great, but when I view the api where my data is being published, I notice weird stuff. Rather than seeing a data point being published about every 30 seconds. I see a variation of the following 1 data point published, followed by the device vitals diagnostics being published, followed by a second vitals diagnostics post, followed by another data point being published. Finally, my device goes into the stop mode again.
Sometimes, instead of data, diagnostics, diagnostics, data… I get data, diagnostics, data, diagnostics… Other times I get another variation. Sometimes it isn’t all four, it may be 3 publishings or 5. It is very random.
I need the system to only publish one data point, and not publish the diagnostics. This occurrence is killing my battery life.