knowit / snappysense

3 stars 1 forks source link

Remove location from the device #56

Closed lars-t-hansen closed 1 year ago

lars-t-hansen commented 1 year ago

Currently the location ID for a device is configurable both on the back-end on the device. This is sort of a feature; the idea was that the user could easily update the device if it moves, without having to worry about the back-end. But it opens up the possibility that the device has an invalid location ID (it can't always check that it's valid) and that the device and back-end have different ideas of the location. It also adds a user-configurable datum that we would just as soon do without (see #55). Therefore:

I probably think that the device doesn't need to know its location. It's only being used for reporting, and if the location ID came from the back-end then this is nearly redundant. (To the extent it's not redundant, the back-end can add the location ID to the JSON package when it arrives at the back-end, by getting it from the device record.)

lars-t-hansen commented 1 year ago

I opted for removing the location ID from the device, and the back-end does not add it to the observation message at this time, it's not currently useful.