How can we help?


Local Weather Push via Rest API calls not logging consistently

Comments

5 comments

  • Avatar
    Gregory Santos

    Folks,

    I've actually partially figured this out.  The local weather data push scheduling on the RainMachine appears to be on some type of cycle.  I can't say for sure how it works, probably the software development team know.  I send a Local Weather Data call via a REST API call each hour to report rain data about 2 minutes after the hour.  My RainMachine reports the push on some hourly cycle that's not aligned with my REST API call.  So in this case, it appears that the weather data push is recognized at 19 minutes past the hour, although it seems to vary a little hour by hour.  I can't say for sure, how this is works but it's likely related to some internal scheduling algorithm in the RainMachine firmware.

    Anyway, I would say at this point, that it is working.   I suppose if others are debugging the Rest API calls for local weather data to understand how and when they are picked up and used by the Rain Machine weather data mixer, it would be good to have some documentation on this.  If the documentation is known or available somewhere, and I didn't see it then that's on me.

    The API calls that I'm using to push local weather data are:

    login/auth POST <-- to get an access token

    parser/data POST <-- to push hourly rain data

    0
    Comment actions Permalink
  • Avatar
    Gregory Santos

    I've performed some additional evaluation of the local weather data push for rain data, and I don't believe this works as stated in the documentation.  In the documentation for the API it says:

    IMPORTANT: The QPF and RAIN values shouldn't be send a cumulative but the measured/forecasted values for that hour/day. The RainMachine Mixer will sum all QPF or RAIN values in the current day to have the day QPF or RAIN.

    Based on my runs, I've found that the if you push hourly rain data that's not cumulative (just the rain amt for that hour), then only the last local weather data rain value is logged and recorded by the iOS app and web interface.  So, for example, if you have rain early in the day, and push the recorded data for those hours, but at the end of the day, there is no rainfall, and push a rain data value of zero just prior to midnight, then Rain Machine records a value of 0 rainfall for that day.

    If someone can clarify, then I would appreciate it.

    0
    Comment actions Permalink
  • Avatar
    Lukas

    Hello Gregory!

    I stumbled upon your post while searching for a possibility to push local weather data to my RainMachine. I activated the Local Weather Push under Weather Services but I am unable to find a documentation of how to actually push weather data.

    Could you point me in the right direction where to find documentation for this Rest API? I also have Home Assistant running and was wondering if you would share your setup.

    Thanks!

    Lukas

    0
    Comment actions Permalink
  • Avatar
    Gregory Santos

    Lukas,

    Rainmachine has a full set of documentation on there Rest API interface here:

    https://rainmachine.docs.apiary.io/

    To push local weather data, your need to look at the following commands:

    Authentication

    /auth/login  <-- Login and authenticate

    Weather Services

    /parser/data

    Just for some background.  I'm using a platform call Home Assistant, running on Raspberry Pi to push my local weather data to my rain machine.  I have a rain gauge and temperature sensor outdoors.  Hourly, I collect data from these sensors, and push it to my RainMachine.  My rain gauge, and temp sensor are simple sensors connected to an Arduino compatible micro-controller with an ESP8266.  The ESP8266 has WIFI capabilities, and reports the rain data, and temp sensor info back to my Home Assistant platform via a Mosquito broker exchange protocol.  I'm using curl commands (it's a REST API command line utility) inside a shell automation script on Home Assistant to send the data over to my Rain Machine.  You can look up "curl rest api" and get some online documentation, if you need it.

    Good luck....

    Greg

     

    0
    Comment actions Permalink
  • Avatar
    Lukas

    Thanks! I will take a look at the API documentation. Using Home Assistant myself I am positive that i am on the right track...

     

    Cheers,

    Lukas

    0
    Comment actions Permalink

Please sign in to leave a comment.