@Abbe You have posted 2 topics that are essentially the same thing.
They phase off and on a lot and I am trying to diagnose whether it is the power infrastructure or the wifi infrastructure.
What do you mean by this?
If you mean the devices lose Cloud connection then this could be a WiFi issue (devices lose WLAN connection - you could monitor the signal) or could be the AP they are connected to loses internet connection (not much you can do about that). One approach to help you monitor what is going on would be to publish a regular (once a minute) heartbeat event with you device’s RSSI, free memory say.
If you mean the devices are restarting (reseting) then you could include monitoring of the restart reason, you could then include this in a restart event to see what is happening.
Lastly, if you want to be certain about not missing the events then you need to publish to a queue held in battery backed memory so that if it is restarting and losing connection (unlikely to be connected immediately on restart) you don’t miss any events.
The console gives you an indication of these causes but not always precise enough.
Also is there anything I can do remotely using the CLI to try and reboot them?
You can implement a Particle Function that indirectly (i.e. not from the function handler) calls