OpenSprinkler Forums OpenSprinkler Unified Firmware Migrated script – weather_level_adj.py – for new Weatherunderground API (OSPI)

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #60290

    fennsen
    Participant

    @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.py

    See 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

    #60296

    protofALk
    Participant

    thank 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?

    #60306

    fennsen
    Participant

    @protofALk

    What 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 documentation

    Regarding forecast:
    – In the script, forecast summary (3 days) of rain will be rated with a probability of 50 percent as default

    Yes, 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.

    #60309

    fennsen
    Participant

    Update: Version 1.1 attached

    #60311

    fennsen
    Participant

    -deleted-

    #60315

    protofALk
    Participant

    thank you I will give it a try!

    #60319

    fennsen
    Participant

    Update: 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…)
    #

    #60327

    fennsen
    Participant

    Sorry 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 approach

    Cheers

Viewing 8 posts - 1 through 8 (of 8 total)
  • 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)