How can we help?


Comments

99 comments

  • Avatar
    Seth

    I'm going to let the fixed parser run a couple update cycles on my HD-16 before I upload the changes to github. The short story is that when Ambient Weather changed their API backend and inserted Cloudflare this caused two problems: the default user-agent python uses is blacklisted/blocked by Cloudflare (http 403 error/cloudflare 1010 error), and https won't handshake with Cloudflare (the ssl library error). I fixed it up plus added more logging so the user can turn logs to debug level and verify for themselves that it's getting data.

    I bought an Observer IP last year but I got busy with other stuff before I could look at it.

    0
    Comment actions Permalink
  • Avatar
    Seth

    Everything looked good running overnight for me, so I uploaded the fixes to github.

    0
    Comment actions Permalink
  • Avatar
    Matt Johnson (Edited )

    Just uploaded the new update and everything works great, nice work Seth!

    0
    Comment actions Permalink
  • Avatar
    Robby

    uploaded new one and works. thanks.  i still noticed on the prior version that it would randomly not be installed (most likely after rainmachine reboots itself), so hoping maybe that is also resolved. :) luckily the keys stay in place after reuploading the .py file just sometimes i don't always check and it is frustrating to see it disappear after the rainmachine i guess auto reboots sometimes.

    0
    Comment actions Permalink
  • Avatar
    Morgan

    Thanks for working on the parser update. I didn't notice any issues until I checked my Rainmachine dashboard today and see the error.  My old shell script that calls the API URL still works fine without any changes, though.  Did they just change the output from their API endpoint which broke the earlier parser?

    I find it handy to be able to just run this little script when I want to know the conditions on my Ambient Weather station.  (This is for FreeBSD -- use curl instead of fetch):

    #!/bin/sh

    appKey=<YOUR_APP_KEY>
    apiKey=<YOUR_API_KEY>

    fetch -q -o - https://api.ambientweather.net/v1/devices?applicationKey=$appKey\&apiKey=$apiKey | json_pp

    0
    Comment actions Permalink
  • Avatar
    Morgan

    After updating to the newer parser and rebooting the RainMachine, now the error message shows

    "Retrying: No data returned"

    But, I can still successfully fetch the weather data JSON from the command line, which is the same local network as my RainMachine units.  So I know that the API service is working, the network is working... 

    What might account for this error?

    0
    Comment actions Permalink
  • Avatar
    htims05

    @morgan - be sure to update to the latest file form Seth at https://github.com/WillCodeForCats/rainmachine-amweather  - I updated this morning and it's working fine.

    0
    Comment actions Permalink
  • Avatar
    htims05

    I stand corrected Mine is now saying "Retrying: No Data returned".  Looks like mine started failing at noon time eastern roughly.  My guess cloudflair is blocking the requests...

     

    0
    Comment actions Permalink
  • Avatar
    htims05

    To help the real developers and those that understand python...I noticed that if I run the API call with "&limit=1" at the end it returns no data, removing that it does return data...but a bunch of it...while it seems to work and is loaded to the Rainmachine, it might be excessive.  I know the limit of 1 was working earlier today April 6 2020.

    0
    Comment actions Permalink
  • Avatar
    Morgan

    @htims05 -- not convinced it's a CF issue since I can make a request from my network using other tools, still transiting through CF.  What user agent string is the RainMachine passing? I could emulate that from the command line to see if the server is rejecting based on that.

    0
    Comment actions Permalink
  • Avatar
    Seth

    Cloudflare is 100% the cause of the previous problems (rainmachine ssl library can't negotiate with cloudflare, and outright blocking with a 1010 error code after that), so I wouldn't be surprised if it's a problem again. I can't look at it until tonight when I'm done with work.

    Unfortunately I'm not joining any Facebook groups so the best I can do is what I've been doing. If they're set on using cloudflare now and it's going to be a recurring problem, I will refocus my efforts on looking at the Observer IP. I can try to add something to catch cloudflare errors so at least it can say "blocked by cloudflare" in the UI instead if that's the case.

    0
    Comment actions Permalink
  • Avatar
    htims05

    It's working again now....

    0
    Comment actions Permalink
  • Avatar
    Mark

    Seth, thanks for getting this fixed so quickly.  I've been running the new code for a little more than 24 hrs now and everything is working fine.

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    Hi, I logged into my Mini 8 and noticed that the last date that the original parser was successfully run was 3/30/20. So I uploaded the updated parser and am now getting an error message saying "Error - No data received from server" (similar to what Robby was getting). Do I need to generate a new apikey and applicationkey in order to get this started again? 

    Thanks for your help!

    0
    Comment actions Permalink
  • Avatar
    Robby

    Oneklakes, did you install the 'new' parser, there is a new version that was released a few days ago.

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    Hi Robby, I downloaded it from GitHub yesterday so I'm pretty sure it's the latest version. I just checked again and it's still showing no data received from server. FYI, I tried rebooting the device and they didn't solve it. Any other ideas?

    0
    Comment actions Permalink
  • Avatar
    Robby

    when i reinstalled the new version it did 'not' have the application key/ID info. i had to reinstall the 'old one' so i could get that information, then remove it and reinstall the new one and manually put in the application key/id etc.

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    Interesting! Both keys are always filled in after I delete and reinstall the parser.

    Also, I just tried reinstalling directly from the device UI and now I get the error message saying "Retrying: Failed to run".

    0
    Comment actions Permalink
  • Avatar
    Joe Selfridge

    Strange, I stopped seeing rain 3/30/20. Got error messages no data returned. And then just checked 4/16/20, started working 4/15/20. Weird. Missed about 2" of recorded rainfall in one event. Working now, I'll keep checking to make sure.

    0
    Comment actions Permalink
  • Avatar
    Joe Selfridge

    Forgot to add that I did update the parser. Didn't work at first but now it is.

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    OK, I deleted it and re-uploaded it today and am still getting the "Failed to run" error which is different from the old parser which generated the "no data received from server" error. This leads me to believe something may be wrong with the parser itself (not saying Seth's script is bad but maybe my version is corrupt?) Can someone help me troubleshoot this if I provide you with a log file? Thanks!!

    0
    Comment actions Permalink
  • Avatar
    Matt Johnson (Edited )

    Getting the following error on my RM.

    I have already tried deleting and re-uploading from the UI, haven't gotten in through SSH yet but I am sure that is next.

    2020-04-21 06:18:01,371 - ERROR - rmParserManager:168 -   * Cannot execute parser Ambient Weather Network Parser
    2020-04-21 06:18:01,373 - ERROR - rmParserManager:169 - global name 'urllib' is not defined
    Traceback (most recent call last):
      File "./RMParserFramework/rmParserManager.py", line 165, in run
      File "./RMParserFramework/rmParser.py", line 49, in timedPerform
      File "/rainmachine-app/RMParserFramework/parsers/user-ambientweather-parser.py", line 55, in perform
        query_string = urllib.urlencode(parameterList)
    NameError: global name 'urllib' is not defined
    0
    Comment actions Permalink
  • Avatar
    Seth

    I uploaded a new version, please download it and try again.

    Also, what model are you using?

    1
    Comment actions Permalink
  • Avatar
    Matt Johnson (Edited )

    Now I can't get it to upload, I hope this SSH stuff didn't screw something up.

    Using Touch HD-12

    EDIT : Looks like it's working, for some reason I had to rename to .txt extension.

    0
    Comment actions Permalink
  • Avatar
    Seth

    I have the HD-16, so it would work the same as what I see.

    Possibly delete the parser and reboot and try again.

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    @Seth

    My log showed the same error as Matt. Downloaded and installed your new parser and all is working. Thanks for fixing.

    0
    Comment actions Permalink
  • Avatar
    Matt Johnson

    @Seth I have noticed that while the parser is showing as working on the main page dashboard I am not seeing actual rain results making it to the weather services comparison under the Rain (observed) tab.

     

    It always reads 0.00 inches of rain observed even when there was rain observed by the ambient weather device.

     

    Can anyone else confirm they are seeing this same issue or am I the only one?

    0
    Comment actions Permalink
  • Avatar
    oneklakes

    @Matt

    I'm seeing actual rain results.

    0
    Comment actions Permalink
  • Avatar
    Shawn Nielsen

    Rainmachine updated to 4.0.1132 and wiped out my ambient weather  parser. when trying to reload and setup it says "Error uploading ambientweather-parser.py". here are the log results.

    I have tried different browsers (Google Chrome, Microsoft edge, and internet explorer) all without success. I'm using windows 10. 

    Traceback (most recent call last):
      File "./RMParserFramework/rmParserManager.py", line 382, in installParser
      File "/rainmachine-app/RMParserFramework/parsers/user-ambientweather-parser.py", line 17, in 
    ImportError: cannot import name convertRadiationFromWattsToMegaJoules
    2020-06-05 07:16:45,497 - INFO  - rmHTTPResourceApi4Dev:117 - API:ParserUpload: Error installing parser, wrong format/compile error.
    2020-06-05 07:16:46,687 - ERROR - rmParserManager:419 -   * Error installing/loading parser user-ambientweather-parser.py from file '/rainmachine-app/RMParserFramework/parsers/user-ambientweather-parser.py'
    2020-06-05 07:16:46,689 - ERROR - rmParserManager:420 - cannot import name convertRadiationFromWattsToMegaJoules

    Any help would be appreciated?

    Thanks
    0
    Comment actions Permalink
  • Avatar
    Seth

    That looks like something changed in the framework. The error is referring to a helper function for value conversion. I'll look into it.

    0
    Comment actions Permalink

Please sign in to leave a comment.