Closed BNNorman closed 4 years ago
on the plus side I makes the colour mapping make more sense.
after this a way to automate it,
cron job is a good idea but deciding how long to wait is the question. Less than a month could be waiting for repair. longer could be dead and buried. Won't be quick - need to write a python program in amongst the current pixelbot stuff I'm doing whilst Rob focusses on writing his next source of income.
Great catch - thanks for this. I think a filter in the SQL is a great idea, as it allows us to hide dead / test / irrelevant sensors.
However, I think there's room for colour-coding the SVG marker too. Since we already have last_seen
, the marker shouldn't be too much of a problem, but dynamically setting the marker in Leaflet.js in a manner that's both future-proof and extensible in the future is more bothersome than it should be (but I've now got an idea of how to do it - it's just a case of doing it).
Crack on Tommy )
On Fri, 1 May 2020, 23:25 Starbeamrainbowlabs, notifications@github.com wrote:
Great catch - thanks for this. I think a filter in the SQL is a great idea, as it allows us to hide dead / test / irrelevant sensors.
However, I think there's room for colour-coding the SVG marker too. Since we already have last_seen, the marker shouldn't be too much of a problem, but dynamically setting the marker in Leaflet.js in a manner that's both future-proof and extensible in the future is more bothersome than it should be (but I've now got an idea of how to do it - it's just a case of doing it).
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ConnectedHumber/Air-Quality-Web/issues/62#issuecomment-622592188, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY5NXIANYQYVBUEBWCO253RPND5RANCNFSM4MXCBIGQ .
Fixed - this should show up in beta soon.
We've already got a task in #36 about the marker colouring, so I'm going to close this issue.
A cron job has been added which should run once per week at 5a.m.
It will set/reset the device visible flag. I.e. if a device hasn't sent data for 31 days or more visible is set to 0. If the device then comes back on line it will be made visible again.
Cool, thansk @BNNorman! I'll let you know when I implement the device marker colouring.
device.visible was implemented in the device table so we could hide sensors from the map however sensors still remain visible when device.visible is set to zero.
I have set visible=0 for the "bonus_a" sensor (see screenshot) which was used for a demo at the arena last October but it can still be seen. This is not a caching issue because I used a browser I don't normally use to double check that.
Please can this filter condition be added to the SQL to eliminate sensors which have stopped sending data for any reason. Then I can remove the dead devices.
This will be better for anyone looking at the map as it shows we are active. On the downside it shows we have fewer active devices - can't win!
Thanks