I have noticed that firmware 0.8.0-rc1 for the photon has a new diagnostic event that publishes to the cloud on device reset. (It may have appeared before this release by it wasn’t available in 0.6.3).
The event name is ‘spark/device/diagnostics/update’ and the data is a hash similar to this…
{"data":"{\"device\":{\"system\":{\"uptime\":2,\"memory\":{\"total\":83200,\"used\":34384}},\"cloud\":{\"disconnects\":0,\"publish\":{\"rate_limited\":0},\"coap\":{\"unack\":0}},\"network\":{\"signal\":{\"rssi\":-65,\"strength\":70,\"quality\":58.06,\"qualityv\":27,\"at\":1,\"strengthv\":-65}}},\"service\":{\"device\":{\"status\":\"ok\"},\"coap\":{\"round_trip\":255},\"cloud\":{\"uptime\":0,\"publish\":{\"sent\":1}}}}","ttl":60,"published_at":"2018-02-08T20:42:45.906Z","coreid":"44002000105136xxxxxxxxxx","name":"spark/device/diagnostics/update"}
(I have anonymised my coreID)
There is some nice diagnostic info embedded in here. I cannot find any documentation on this as yet. So my question is two fold.
- how can I trigger this event (so that I can access the data via the Cloud)?; and /or
- how can I access this info from within the photon (to create error-trapping / self-healing code)?