OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Migrated script – weather_level_adj.py – for new Weatherunderground API (OSPI)
- This topic has 7 replies, 2 voices, and was last updated 5 years, 4 months ago by fennsen.
-
AuthorPosts
-
May 12, 2019 at 2:47 pm #60290
fennsenParticipant@All
After testing phase and final code optimization:
Here is my script for the OSPI – migrated to the new WU API and enhanced by MQTT and standalone capabilities : weather_level_adj.pySee remarks and hints in the header of the script before using.
Also included is an Excel File which shows the used parameters / calculation and provides a ‘WHAT IF’ calculation if U like to test adjustments before editing the parameters.Cheers
Attachments:
May 13, 2019 at 1:04 am #60296
protofALkParticipantthank you @fennsen for doing this. Any reason this can´t be included into the OSPI main code? (I hope I can figure out how to get it to run with my primitive coding skills -.-)
I have one grievance so and that is forecasts… Forecast is really not working here in the last two years. For example in the last 3 Weeks there was rain forecast about 8 times. Only one time rain actually arrived here. Last year out of 30 or so forecasted rain events NONE happened. (I live in the driest part of germany and its unclear why rain here never arrives). I really need to turn of the forecast feature to make use of this. Is there a percentage setting in the code where the forecast is caclculated in that I can turn to 0 or something similar?
May 13, 2019 at 4:45 am #60306
fennsenParticipantWhat do U mean with ,,..can’t be included into OSPI main code”?
This script is intendet to be included into the main code (if you mean the python version of the program, not the microcode version). It replaces 1:1 the existing plugin (in the OSPI version). You don’t need any coding skills for this, only basic linux skills (copy a file, change file permissions(set executable bit with chmod).
See also the comments in the script header for further & detailed information and setup documentationRegarding forecast:
– In the script, forecast summary (3 days) of rain will be rated with a probability of 50 percent as defaultYes, you can ‘disable’ the forecast function as follows (See lines 246 in the code):
rain_mm = rain_hist + (rain_fc * float(0.5))
If you change the factor from 0.5 (which means 50% propability of the sum of rain forecast) to a lower value (e.g. 0.1 = 10%) or to zero (which will complete disable the consideration of forecasted rain).But good hint; in the next version I’ll include this factor as a configuration-parameter in the header.
May 13, 2019 at 4:47 am #60309
fennsenParticipantUpdate: Version 1.1 attached
Attachments:
May 13, 2019 at 6:02 am #60311
fennsenParticipant-deleted-
May 13, 2019 at 7:18 am #60315
protofALkParticipantthank you I will give it a try!
May 13, 2019 at 12:33 pm #60319
fennsenParticipantUpdate: Version 1.2 attached
# Change log
# Version 1.1
# Added description and installation documentation
# NEW Probability factor – how the sum of forecasted rain from WU is used in calculation – included as config-parameter
# Version 1.2
# NEW consistency check on reported history rain amount. value must not be higher than e.g. 120mm (after my PWS reported 2540mm rain today and this shi* was returned by WU history! I always thought that wrong data feeds is filtered by WU.. (WTF…)
#Attachments:
May 14, 2019 at 3:41 am #60327
fennsenParticipantSorry to spent some confusion here.
I realized that this is the wrong forum, as the script is for the alternate Firmware called ‘SIP’ from Dan-in-CA/SIP which is a fork of the OSPI firmware
https://github.com/Dan-in-CA/SIP
I leave it here; maybe useful for someone who likes to adopt the approachCheers
-
AuthorPosts
- You must be logged in to reply to this topic.
OpenSprinkler › Forums › OpenSprinkler Unified Firmware › Migrated script – weather_level_adj.py – for new Weatherunderground API (OSPI)