SWAT-engineering / kiwi-air-monitor

Kiwi monitor is an open source CO2/Humidity/Temperature sensor intended for monitoring the quality of the air in a room. Kiwi was created to support teachers with a notification to ventilate their classroom.
https://www.kiwimonitor.nl/
GNU General Public License v3.0
10 stars 2 forks source link

Implement Threshold feature #23

Closed DavyLandman closed 4 years ago

DavyLandman commented 4 years ago

We have 3 levels of Warnings we want to give:

Open questions:

  1. which color should the led be for the different levels (taking into account that the case is most likely the logo with the led for an eye)
  2. Should the led always pulse at same intensity?
  3. how to detect decreasing trend?
  4. how to avoid hysteresis?

This is an example CO2 curve:

afbeelding

and a detail shot of a peak: afbeelding

Progress:

DavyLandman commented 4 years ago

Color options from: https://personal.sron.nl/~pault/

PRGn from Paul

or one of these without the reds:

DavyLandman commented 4 years ago

To detect a decreasing trend I compare the current (1 minute wide rolling mean) CO2 value, and compare that to the max value the past half hour. I consider it decreasing if it's closer than 50% of the threshold.

I suspect that we'll need to tweak this logic in the future, as when you get closer to the threshold, the sensitivity between level 1 and 2 changes.

DavyLandman commented 4 years ago

First version is done, for now it works, later we might need to update it with a better way to detect the downwards trend