Photon Offline Issue

I have a Particle Photon collecting data at intervals between deep sleep mode and have recently had issues with it going offline (not crashing) at seemingly random points. When it goes offline it is has a solid dark blue LED and is instantly fixed when I manually reset it via the reset button. Here is a picture of it.


I have four other systems with the exact same code and hardware which are doing the same things. They are all outdoors in waterproof enclosures. Here is the code: https://github.com/StevenBucher98/Particle-Debugging

Thank you so much!

How are you powering the photon?

I am powering it with a 5W solar panel with the power shield and a 3.3V 1800mAh battery.

I see one instance of your using String() (in field.h); maybe I missed others… But anyway, as ScruffR will tell you, String() can cause heap fragmentation over time. I don’t have a feel for how long it takes for that to happen, but I thought I’d mention it.

The RGB LED should never be a solid color (unless you’re forcing it to be). If it’s solid, then the device has locked up. I know, that doesn’t help much 8^(.

In your last paragraph – I want to confirm that all five systems are doing this, correct?

1 Like

As a bit of a follow up to Dave’s statements here.

Dave is indeed correct that if you are noticing solid colors, the device has likely locked up.

Regarding heap fragmentation from usage of String() – I wouldn’t focus too much on trying to remedy this first. Fragmentation can simply occur overtime through continued usage of the device.

Something I often see recommended by rickkas7 is to try and have your devices restart themselves on a routine to prevent fragmentation and try to keep the device in a healthy state. I believe his recommendation is around once per week, but if you can afford some minimal downtime, it may not hurt to have the devices restart overnight once every 1-3 days.

I would give this a shot and keep an eye on them to see if they continue to exhibit this behavior.

1 Like

All five systems have experienced this yes. Thank you so much!

Ok Thank so much for the suggestions!