Proposal: Send telemetry in debug mode
CURRENTLY JUST A PROPOSAL. Needs more investigation and references.
Enable a debug mode in which, when the device has to send data, a message is created and sent to dark-sky/debug/${DEVICE_ID} (maybe not send anything if everything goes alright?).
The message will send a JSON representation of a Diagnostics struct with data that would help to debug device malfunctions/crashes. That Diagnostics, should contain data like:
- Current loop number
- A list of the latest N errors in the device (f. ex. the device couldn't connect to network)
- Reset cause
- Time needed to attach to the network.