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
11 stars 4 forks source link

A sensor's graph fails due to default choice #12

Closed adamjennison closed 5 years ago

adamjennison commented 5 years ago

A suggestion that the default setting should be pm2.5 or pm10 as they are mandatory.

The current seeing of humidity means that any (e.g. Matt's) that do not send that data will fail.

👍

sbrl commented 5 years ago

Thanks for the report, @adamjennison! This is actually not as simple as you'd think.

The client retrieves a list of measurement types from the system that a specified device has previously reported, and picked the first out of that list as the default.

The issue is that the database currently contains rogue measurement entries for some devices, confusing the system. You can see an example of this at the following URLs:

Note the count parameter of each JSON object returned. This is the number of readings detected in the database for that specific reading type and device combination.

To this end, the rogue data needs to be cleaned out of the database in order to fix the issue.

Note also that not all devices return PM25 data - in particular some of @BNNorman's devices are good examples here.

With this in mind, I think this is a duplicate of #11.

BNNorman commented 5 years ago

NOTE: I have a copy of the database at home for testing and I also have the map running on my Pi. When the rogue entries are removed the pop-up only displays buttons for what is left so this issue is not a bug in the web app but in the database contents. I have given robin the SQL commands to locate and destroy my rogue entries. It is a simple matter to change the device_id etc for any others.