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.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login