ConnectedHumber / Air-Quality-Web

The web interface and JSON api for the ConnectedHumber Air Quality Monitoring Project.
https://sensors.connectedhumber.org/
Mozilla Public License 2.0
9 stars 4 forks source link

FTW says 6 hours ago but last reading was 12:00 (now 16:00) #54

Open BNNorman opened 4 years ago

BNNorman commented 4 years ago

Looking at the FTW sensor.

Data for this sensor is delayed (phone defra) so the chart always shows X hours behind. The cron job which gathers the data runs once per hour.

The odd thing is that the defra data for 12:00 today is on the system but it is 16:00 hours now. So the "time ago" ought to show 4 hours (or 5 ; DST/BST) but not 6.

BNNorman commented 4 years ago

It's peddling backwards - now says 8 hours ago. I have checked the database table and s_or_r is 14:00 today as per the popup chart. Sounds like some form of cacheing? I'm using Firefox on Windows 10 Google Chrome shows it as 3 hours ago - which is nearer the truth. tried other browsers like opera and chromium but they just twirl the circles.

sbrl commented 4 years ago

Hrm, it definitely could be caching. It might also be a rounding error. I'll have to look into this.

Other browsers should work too. I suspect we might have a bit of a performance problem to look into as well.

sbrl commented 4 years ago

Found the bug! It is indeed a stray cache header, I think.

BNNorman commented 4 years ago

Good stuff

sbrl commented 4 years ago

I've also fixed a CI bug too. Does it work on the beta version now?

I've also done the external rename, so feedback on that would be great too.

Internally I use Air Quality all over the place. The README and API documentation still uses the "Air Quality Web" name too. I need a new name to move everything to in that sense before I can go ahead with an internal rename.

BNNorman commented 4 years ago

We should talk next meetup but I think Rob may not be free to attend.

I think the names should be sensors since we are not tied to any particular type.

On Thu, 10 Oct 2019, 22:20 Starbeamrainbowlabs, notifications@github.com wrote:

I've also fixed a CI bug too. Does it work on the beta version now?

I've also done the external rename, so feedback on that would be great too.

Internally I use Air Quality all over the place. The README and API documentation still uses the "Air Quality Web" name too. I need a new name to move everything to in that sense before I can go ahead with an internal rename.

— 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/54?email_source=notifications&email_token=ADY5NXIUTQSK5CX3HZ5QMBLQN6MBTA5CNFSM4I6F6SB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEA6ABUI#issuecomment-540803281, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADY5NXOJK3RBQYYVNLIJJX3QN6MBTANCNFSM4I6F6SBQ .

sbrl commented 4 years ago

Hrm, it doesn't seem to have updated. It's supposed to now show "Sensor Map", not "Air Quality Map". I'll have to look into it @BNNorman.

BNNorman commented 4 years ago

Same here. Bloody caching

sbrl commented 4 years ago

Caching is great when it works....

This time though I'm suspicious of another CI bug :-/

BNNorman commented 4 years ago

Rather screws dynamic content.

sbrl commented 4 years ago

...if done incorrectly.

sbrl commented 4 years ago

Ah, it is showing for me now. It's odd because the title there isn't even part of the API. It's actually part of the static index.html that is served as the entry point to the web interface. Does it work for you too? Here's what I now see:

image

BNNorman commented 4 years ago

No, but im on my tablet watching a movie. Trying to clear history and cache. I do wish they'd leave stuff where i can find it.