Crawls information from public netatmo stations
To find the url of your preferred weather station, follow these steps:
-
Open the Netatmo Weathermap
-
Find your station and click the share icon
-
Click on copy link
-
Insert the link in the instance settings of the adapter
The “Netatmo Crawler” parse a lot of real local information near you. What do you do with all this information? Here are some general facts and examples:
Netatmo use the relative humidity, this is the ratio of the current absolute humidity to the highest possible absolute humidity (which depends on the current air temperature). A reading of 100 percent relative humidity means that the air is totally saturated with water vapor and cannot hold any more, creating the possibility of rain. This doesn't mean that the relative humidity must be 100 percent in order for it to rain — it must be 100 percent where the clouds are forming, but the relative humidity near the ground could be much less.
Uses the unit millimeter. If you wish the unit liter per meter cube, you can use this anyway. You can use it for watering in the garden (for example).
The air around you has weight, and it presses against everything it touches. That pressure is called atmospheric pressure, or air pressure. What should you do with this value? As simple as it sounds: Weather forecast! High pressure = good weather, low pressure = bad weather. The normal middle value is 1013 mBar. For “real” weather forecast you should need pressure history for some hours (I use four hours). If it falls it should be bad weather in future, if it rise it should be good weather. I found a script for forecast here (it’s called zambretti method for a 90% forecast). Other units: 1 mbar = 100 Pa = 1 hPa
Here you can calculate chill temperature level. For low temperatures the windchill (10 °C or lower, calculate with wind) for high temperatures you can use the heat index (25 °C or higher, calculate with humidity). example script:
windchill1 = windchill(temp, windkmh); //Vars to-from IOBroker
function windchill(temperature, windspeed) {
var windchill = 13.12 + 0.6215 * temperature - 11.37 * Math.pow(windspeed, 0.16) + 0.3965 *
temperature * Math.pow(windspeed, 0.16);
return windchill;
}
heatindex1 = heatindex(temp, hum); //Vars to-from IOBroker
function heat(temperature, humidity) {
var heatindex = -8.784695 + 1.61139411 * temperature + 2.338549 * humidity - 0.14611605 *
temperature * humidity - 0.012308094 * (temperature * temperature) -
0.016424828 * (humidity * humidity) + 0.002211732* (temperature *
temperature) * humidity + 0.00072546 * temperature * (humidity * humidity)
- 0.000003582 * (temperature * temperature) * (humidity * humidity);
return heatindex;
}
Wind speed is a measure from air moving from high to low pressure, usually due to changes in temperature. The gust strength is the highest value of wind, measured in a short time (something like three seconds). You should do a script for your awning or for the Zambretti method (look above).
This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.
Many thanks to backfisch for the initial idea and support!
- (Bart19) Adds additional 'rain_lastHour' state as 'rain' state is now real time value
- (Bart19) removed old news (#17)
- (Bart19) saves states as read-only (#23)
- (Bart19) updates dependencies
- (Bart19) updates dependencies
- (Bart19) updates dependencies and changes some warnings to information level
- (Xenon-s) saves states with acknowledgement (#23 & #26)
- (Bart19) updates dependencies and documentation (#25 & #27)
- (Bart19) updates dependencies
- (Bart19) adds measures for wind and gust with m/s (#22) and do not query rain_today in the first 15 minutes of a day (#21)
- (Bart19) changes exit code and introduces an exit message
- (Bart19) Rounds values to two decimals
- (Bart19) updates dependencies
- (Bart19) updates dependencies
- (Bart19) small fix in error handling
- (Bart19) caches authorization token
- (Bart19) adds Sentry for error reporting
- (Bart19) fix for new netatmo website
- (Bart19) optimizes error handling
- (Bart19) changes some log level
- (Backfisch) adds more documentation
- (Bart19) fixes, that rain_yesterday was saved with value rain_today
- (Bart19) optimizes error handling
- (Bart19) adds timestamps, when last info retrieved from Netatmo and timestamp, when each measure was updated last. In addition, rain_yesterday added
- (Bart19) changes admin view. Now you can enter as many station urls as you want. In addition, you can select, how the data should be stored
- (Bart19) fix for station4 and introduces allowInit, so adapter will run once on config edits
- (Bart19) removes files from archive which are unnecessary
- (Bart19) implements automatic tests
- (Bart19) updates logo
- (Bart19) changes loglevel
- (Bart19) updates description
- (Bart19) bugfixes
- (Bart19) bugfixes
- (Bart19) bugfixes
- (Bart19) bugfixes
- (Bart19) initial release
MIT License
Copyright (c) 2022 Bart19 [email protected]
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.