Simple enhancement for PressureSensor example (Weatherstation)
-
The pressure sensor example of the mysensors library contains a simple forecast algorithm. When integrating this into FHEM I noticed that the forecast is "stable" most of the time. What I wanted to have was an additional indicator which displays the current weather situation based on the sealevel pressure of 1013hPa. Well, actually this is what a simple analog weatherstation does. So I modified the PressureSensor example so that it transfers a second sensor value: weather situation
enum WEATHER_SITUATION { VERY_LOW_PRESSURE = 0, // p>-7.5hPa LOW_PRESSURE = 1, // p>-2.5hPa NORMAL_PRESSURE = 2, // p <+/-2.5hPa HIGH_PRESSURE = 3, // p>2.5hPa VERY_HIGH_PRESSURE = 4,// p>7.5hPa };
The FHEM plot looks like
Sorry for the german labels:
Vorhersage = forecast
Wetterlage = current weather situationHH = very high pressure
H = high pressure
T = low pressure
TT = very low pressureIn the picture you can see that the forecast is sunny though the current weather situation is rainy: indeed it's raining cats and dogs and cows at the moment.
BTW:
To make it a real weatherstation i merged the dht-22 code into it to get the humidity value, too.
-
Adding a humidity sensor and making a full fledged Weather-station example really makes sense together with the current situation data.
Would it be possible for you to create a pull request of this to the dev-branch?
Converting it to 1.6 is quite simple (you can look at the other examples if you need additional help):
https://docs.google.com/document/d/1NKq5uuNdnxF5jWnum7VT32mbKLjuvqlx2A5D1qQ-H3Q/edit#
-
Ok, no problem, I will create a pull request this weekend.
rgrds Heinz
-
Pull request done.
-
Link to the PR in case someone wants to find it later: https://github.com/mysensors/Arduino/pull/261
Suggested Topics
-
Welcome
Announcements • • hek