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 };
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 • 23 Mar 2014, 08:24 • hek 2 Apr 2014, 14:39 -
Why You Should Encase Your Nodes
Hardware • 2 Sept 2016, 13:46 • wergeld 5 Sept 2016, 18:29 -
Wio-E5 (STM32 and SX1262)
My Project • 31 Dec 2024, 17:52 • nagelc 25 Jan 2025, 20:21 -
Long time test done with soil sensor!
My Project • 7 Jan 2025, 09:13 • Nicklas Starkel 13 Jan 2025, 09:10 -
Simulate Online-Recreating 'Flappy Bird' with Arduino Nano
My Project • 15 Jan 2025, 09:13 • Skylar Jones 15 Jan 2025, 09:13 -
Water Meter or "How to get Home Assistant to send saved data to an Arduino"
My Project • 18 Oct 2024, 02:19 • OldSurferDude 18 Oct 2024, 02:19