OpenSprinkler Forums Third-Party Software weewx-opensprinkler: Local weather control for OpenSprinkler

This topic contains 9 replies, has 5 voices, and was last updated by  Peter 3 weeks ago.

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #52852

    stibbons
    Participant

    I have a weather station in my yard, using weeWX to run a website on my LAN with current and historical weather data. Rather than having OpenSprinkler rely on an active internet connection for weather adjustments, I wanted to be able to get the required data from the local weeWX install. So after reading through the code that drives the OpenSprinkler-Weather service, I’m attempting to provide the same information in a weeWX skin.

    The project is still in a pretty rough state. Not all information is available (most importantly, weeWX does not support any timezone operations), and setting adjustment options and sensitivity in the OpenSprinkler UI is currently ignored. But it does seem to be working so far.

    If you have a weeWX based weather station, and are interested in trying it out, the skin is available from https://bitbucket.org/pjhardy/weewx-opensprinkler

    #52861

    calanish
    Participant

    Oh neat 🙂

    Thanks for this. I will have a play with it later this week.

    #52865

    stibbons
    Participant

    Cool, would be interested to see how it compares to OpenSprinkler-Weather adjustments in other areas. 🙂

    I’ve uploaded a new version that lets you set Zimmerman Method base parameters and sensitivity in the skin.conf. That’s the best compromise I have for allowing customisation without generating fully dynamic pages (which I may still do, if I can remember how CGI works).

    #54198

    debbiep
    Participant

    Nice! I have been getting unreliable results from the default service since it moved to OpenWeatherMap, with watering levels close to zero when my stations run around sunrise, like this thread.

    Just a little gotcha, which I only worked out from reading the source, that the files have to be served from http://web-server/, no HTTPS, no subdirectories. I had to put some symlinks into my web server at the top level to point to my weewx installation.

    Zimmermann adjustment works well enough for me, but weewx knows about evapotranspiration. I might have a play with that.

    #61222

    alco
    Participant

    I just followed these instructions to connect weewx to opensprinkler by using the reporting function. I has a slightly disadvantage that you can’t upload to weatherunderground anymore because Weewx allows only one connection per uploader. But if you OK with that it will work.. kind of…

    Because now it I see that OpenSprinkler accepts the data.. only the calculation is wrong, and also the temp/hum levels that are showed are not what the weather-services uploader gets from WeeWx. and the water % isn’t changing at all stuck on 22%..

    I attached some print-screens to clarify it.

    • This reply was modified 3 weeks, 1 day ago by  alco. Reason: attached some print-screens to clarify it
    #61243

    Peter
    Participant

    Update: Just seen that you are referring to a custom WeeWX skin and not the new PWS support now built directly into the OS Weather Service. I don’t have any experience of the Skin so will leave it to others to feedback on this.
    —————
    @alco, which instructions did you follow? I can see that OSPi is not successfully calling the weather service. Did you test that the local Weather Service was receiving your PWS data from WeeWX ? Happy to help but I need to understand a bit more about your set-up.

    Note that there is a defect in the System Diagnostic page that is displaying the wrong Temp and Humidity data. The only relevant fields are the Last Weather Call and Last Successful Weather Call.

    • This reply was modified 3 weeks, 1 day ago by  Peter.
    #61247

    alco
    Participant

    Hi Peter,

    I don’t use the skin method for weewx. just the Wunderground “push” data way as documented at opensprinkler Github opensprinkler-weather. In fact I updated that document with a little more comments (pushed to master)

    I’m sure that Weewx is sending the data, it’s in the log from Weewx (and I’m one of the developers on the Weewx system!) and I also see a log from the OS weather service, example:

    Jun 25 20:10:30 OSPI npm[201]: OpenSprinkler Weather Observation: {"action":"updateraw","ID":"opensprinkler","PASSWORD":"opensprinkler","softwaretype":"weewx-3.9.1","baromin":"29.980","dewptf":"62.3","humidity":"038","dateutc":"2019-06-25 18:10:00","dailyrainin":"0.00","winddir":"253","tempf":"91.6","windspeedmph":"1.5","windgustmph":"2.7","rainin":"0.00"}
    

    Bit more system info, running the OSPI software and the weather-service on the same RPI 2 B+, the weather-service is on port 8081 and OS on default 8080.
    then I go to the SU page (example url: 192.168.1.111:8080/su) and fill in 192.168.1.111:8081 for the weather-service.

    I also asked some friends on WeeWx google forum if the got it working…. some one build a own CGI interface for it 😀

    #61249

    Peter
    Participant

    @alco, OK, thanks for clarifying, the OP was talking about a weewx skin so I presumed you were referring to that as well.

    I assume you tried hitting the local Weather Service directly to ensure the port was open and accessible, i.e. http://192.168.1.111:8081/weather1.py?loc=50,1&wto="h":100,"t":100,"r":100,"bh":70,"bt":59,"br":0. This should result in a json response with the watering scale. If that works then the problem is upstream. Can you confirm that you have set a “location” in App i.e. you have gone into the App->Options->Location and clicked to specifiy your PWS location. Without that things wont work at the moment. Let me know and happy to help diagnose.

    #61250

    alco
    Participant

    yes I set a location and I also get a response like: &scale=200&rd=-1&tz=56&sunrise=348&sunset=1330&eip=******&rawData={"h":51.75,"p":0,"t":82.2,"raining":0}
    and I had it working for about a hour… didn’t changed at weewx side.. at OS I pressed a few times the save button on /SU page and config..

    So somehow it’s losing or time-out the calls to the weather-service. (OS weather-service is receiving a new weather update from weewx on every 5 minutes).

    I poked the weather-service call a few times now.. and yes it’s updating the output on the api when WeeWx has send a update.
    &scale=200&rd=-1&tz=56&sunrise=348&sunset=1330&eip=******&rawData={"h":52.56,"p":0,"t":81.7,"raining":0} for now.. clearly a new temperature and humm.

    so I think it’s upstream from the weather-service to the OS kernel that don’t updates the weather stats or calculations.

    • This reply was modified 3 weeks ago by  alco. Reason: more info
    • This reply was modified 3 weeks ago by  alco.
    #61253

    Peter
    Participant

    @alco, can we give this 24 hours to see if it settles down ? There have been service issues posted by one of the third-party data providers that may be causing api timeouts. Bad timing but I’ve seen the log files to confirm. If you can keep an eye on the “Last Weather Call” and “Last Successful Weather Call” results then we can see if this is transitory or something more fundamental. The weather call is only made every two hours so you should see the System Diagnostics timestamps update on that cycle. Let me know how you get on.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

OpenSprinkler Forums Third-Party Software weewx-opensprinkler: Local weather control for OpenSprinkler