atmospi
atmospi copied to clipboard
Adding support for "switches" as a device class
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.
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.
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