gfroerli / api

Coredump Gfrörli Water Temperature Sensor API
https://watertemp-api.coredump.ch/
GNU Affero General Public License v3.0
3 stars 0 forks source link

Filter out all values <= 0°C #136

Open dbrgn opened 1 year ago

dbrgn commented 1 year ago

We already filter this at the relay level, but some historic data ist still part of the database.

This could easily be filtered out in all SQL queries we're calling (WHERE temperature > 0):

dbrgn commented 1 year ago

For testing: Check out the Tribschen Sensor. It shows historic minimal values at -0.1°C.

rnestler commented 1 year ago

Do you want to filter it or clean it?

rnestler commented 1 year ago

Like removing it from the DB or only filter it in the queries?

dbrgn commented 1 year ago

Hm, I think filtering is probably better... Or do you think removing the values would be better (e.g. with an admin command)?

Something else I thought of: In case we ever deploy an ice-proof sensor in a lake that occasionally freezes (e.g. Sihlsee), we'd need to adjust the logic 🙂

rnestler commented 1 year ago

Something else I thought of: In case we ever deploy an ice-proof sensor in a lake that occasionally freezes (e.g. Sihlsee), we'd need to adjust the logic 🙂

Well if the ice get's 80cm thick, then we need to adjust the logic :laughing: otherwise the water below the ice will still have above zero temperature.

dbrgn commented 1 year ago

Yeah, that's the thing, the ice does sometimes get that thick near the shallow shore up there 😄