mstenta / atmospi

Atmospheric monitoring app for logging and graphing temperatures and humidities over time using a Raspberry Pi and DS18B20, DHT11, DHT22, and AM2302 sensor(s).
31 stars 9 forks source link

Adding support for "switches" as a device class #24

Open ultima-originem opened 9 years ago

ultima-originem commented 9 years ago

It would be useful to add support for "switches" [for lack of a better name] as a device class. The requirement is to capture the state of a switch/relay/valve, etc in a binary fashion, i.e. the state of the device is either on or off and is rendered only as a vertical plot band in the chart and not as a line/spline.

aukeboskma commented 9 years ago

For me it would be useful to add the possibility to trigger a relay when a sensor measures a certain temperature or humidity. Actually what I would like is to check if the air outside is dryer than the air inside, e.i is the absolute humidity of the air outside less then inside. If that is true trigger the relay to switch a fan to get the dryer air inside :). But the state of the relay would also be a nice check to see if the fan is actually on. I first going to try to make a python script to retrieve the latest values from the database and calculate the absolute humidity.

Farstucker commented 8 years ago

I second this idea. Maybe we could use syncronized charts to show when a switch is open(1)/closed(0) to show how it corresponds to temperature.

Something like this: http://www.highcharts.com/demo/synchronized-charts