OpenSprinkler Forums OpenSprinkler Unified Firmware Understanding the Weather Script

Tagged: 

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #61549

    matthew garton
    Participant

    Hi All,
    Not sure if everyone else is a bit more clued in than me, almost certainly so. However understanding how location works in the weather script is not clear to me.

    To begin with these instruction are excellent for getting setup and going:
    https://github.com/OpenSprinkler/OpenSprinkler-Weather/blob/master/docs/local-installation.md

    Where I lose clarity is on step 7.
    It was easy to put in the URL: http://<Weather Service IP:PORT>/weather1.py?loc=50,1&wto=”h”:100,”t”:100,”r”:100,”bh”:70,”bt”:59,”br”:0
    and get this or something like it:
    &scale=94&rd=-1&tz=56&sunrise=358&sunset=1326&eip=3232235785&rawData={“h”:69,”p”:0,”t”:57.4,”raining”:0}

    I assumed that the parameter loc=50,1 in the example was controlling the location but a support ticket asking was sharply closed, so I must be wrong there.

    Hence I apologise again for not getting the simplest thing but how does the weather service know what location to use? Does it get it from the value set through the primary OpenSprinkler UI and what does this loc parameter mean?

    I have tried changing the location in the UI and tried the call again but as yet (10 minutes) not seen meaningful delta. In doing this I tried setting it from Sydney in Australia (winter) to Austin Tx(summer) and am looking for the obvious temperature change.

    I have also tried putting OpenWeatherMap CityID;s in but these return an error.

    #61559

    Peter
    Participant

    Matthew, the “loc” parameter is short for location and in this example is latitude,longitude (i.e. 50,1 is approx London). You can change this to reflect the lat/lon of your location when testing the interface. In general usage, this api call is automated by OpenSprinkler using the location that was set in the Phone App->Edit Options->Location menu.

    #61601

    matthew garton
    Participant

    Hi Peter,
    Of course it is lat/long!!!!!! Thank you for the kind explanation!

    Kind Regards,
    Matthew

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

OpenSprinkler Forums OpenSprinkler Unified Firmware Understanding the Weather Script