Diagnostic info in 0.8.0-rc1

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.

  1. how can I trigger this event (so that I can access the data via the Cloud)?; and /or
  2. how can I access this info from within the photon (to create error-trapping / self-healing code)?

If you go into Particle Console and select the respective device, you will see some new tab that lets you have some look at the “health” diagnostics for that device

1 Like

I don’t have that. Is it a ‘paid for’ extra?

You have to be running >= 0.8.x to see the diag data publishes. It really is brand new.

cheers,
Dave

1 Like

Nope, it’s planned to be a public/free feature, but it might not yet be released and I only see it as part of the beta tester group.
I was convinced it would go live with the pre-release of 0.8.0-rc.1, but obviously I was wrong with that assumption.
However, now you got a glimpse of what’s about to come with 0.8.0 :see_no_evil:

3 Likes

There is some information about this here:

https://docs.particle.io/guide/tools-and-features/remote-diagnostics/photon/#running-diagnostic-tests