Security issue ???
I think notā¦
Who could possibly ācareā if a sensor has been on multiple stations in its lifetime ?
re: auto-pruning the WF historical data, Iād suggest caution thereā¦I see lots of people on the weewx google group who put stations in very remote and inaccessible places that they canāt get to in the winter that might not report for many months. A blanket āprune stations that have not reported in NNN weeksā would be quite excessive.
Regardless, assuming sensor-NNN is always on one and only one station throughout its lifetime, or any arbitrary data pruning timeframe, is just not reasonable. Itās simply going to happen.
Just looking at the REST API, there are a couple interesting caveats in thereā¦
- āSmart Weather Devices all belong to a Station. This response contains Station metadata and metadata for the Devices in it. Each user can create multiple Stations. A Device can only be in one Station at a time. Only devices with a serial_number value can send new observations. A Device without a serial_number indicates that Device is no longer active.ā
Just looking at your example:
- AR-00001383 is device 18133 on station 5844 AND device 10599 on station 4111.
- SK-00012108 is device 18135 on station 5844 AND device 10723 on station 4111.
If Iām reading their API docs correctly, one station should show two āactiveā devices with a SN, and one station should two inactive devices (no SN).
Whatās interesting in this case is that if you query the two station IDs, the lat/lon are the same, but the hub s/n and station description strings are different, but both stations seem to show the devices as active.
Seems like a bug on the WF side to me. They should be marking devices as inactive in the old station whenever a device is associated with a new/different station. Now how they might do that is an exercise for WF to make happen. I can think of all kinds of reasons why messing with previously-recorded station mappings would cause more pain than it prevents.
Re: how it happened, I can guess that perhaps the owner had multiple stations in one site and they moved sensors around re: which hub they were attached toā¦or alternately their hub was replaced and the air/sky were reassociated with a new hub and they went through the new-station process.
Re: the āhavoc in your appā thing - I can only guess that perhaps you have a db table trying to return a mapping of āwhich station is device-NNN onā and it canāt deal with multiple stations having ever been associated with a particular device. Bad assumption if thatās the case.