WeatherFlow PiConsole - Archive

OK. Thanks for the info - I know what the problem is! When you delete all data from a device, it creates a new device_id (see this discussion: Devices gone from the API - #7 by GaryFunk).

The result is that in the list of devices attached to your station, there is ghost entry. A normal device entry looks like this:

{“device_id”:10473,“serial_number”:“SK-00004384”,“device_meta”:{“agl”:30.0,“name”:“outdoor”,“environment”:“outdoor”,“wifi_network_name”:“”},“device_type”:“SK”,“hardware_revision”:“1”,“firmware_revision”:“43”}

Whereas the ghost entry looks like this:

{“device_id”:3752,“device_meta”:{“agl”:0.0,“name”:“outdoor”,“environment”:“outdoor”,“wifi_network_name”:“”}}

Most importantly the ghost entry is missing the field ‘device_type’, and hence the code is falling over. This isn’t a situation I’ve seen before, but is a very easy fix. Unfortunately I am away travelling at the moment and won’t be able to push an update until the weekend. Sorry!

Edit: @dsj Is there an important reason as to why these ghost devices remain in the API? It would certainly be simpler from a development perspective to have them removed.

1 Like