zefanja / aqi

Measure AQI based on PM2.5 or PM10 with a Raspberry Pi and a SDS011 particle sensor
GNU General Public License v3.0
94 stars 46 forks source link

Data is not refreshing on web #14

Open readthebook opened 4 years ago

readthebook commented 4 years ago

Kind of new to all of this and followed your Openschoolsolutions post. The sensor worked after I set it up and rebooted the Raspberry Pi, but the last time the web shows it refreshed was the same time as when it first booted back up, 17:39:28. I have not received any more current measurements to the web interface since.

If I ssh to the Pi and run ./aqi.py then the page will refresh.

Any help is appreciated.

sharad643 commented 3 years ago

Hi, I am having the same issue. I only get the readings when I run ./aqi.py manually and leave it running on the terminal.

Also, where can I access the historical data or do I need to write a separate code to store numbers over a period of time.

Thank you!

vvidovic commented 3 years ago

Also, where can I access the historical data or do I need to write a separate code to store numbers over a period of time.

Historical data are available by clicking on the link "history" from the main view. Measurements are saved only in the memory of the running program and the maximum number of available measurements is limited to 100. In case you would like to have a persistent (and longer) history of measurements, you would need to write a code for that purpose.

rgmcleod52 commented 3 years ago

I have successfully followed the steps in the OpenSchool article and can see the AQI measurements on the web page. But the link to the history page generates a "404 page not found" error since there is no "history.html" file included either in the article or as part of this github location. Has someone created this page? I would like to be able to see the history but I'm not well versed enough in constructing a web page for this purpose.

rgmcleod52 commented 3 years ago

Mea culpa. I just found the history.html file here on github! Neither the OpenSchool or the Hackernoon article calls out to download the history.html file from github. Once that is done the history page shows up as expected.