How can we help?


New Aeris weather parser for PWS weather contributors

Pinned Featured

Comments

18 comments

  • Avatar
    Kevin Miller

    I attempted to add this to my system, but it is not running.  Here is a snippit of the log file.  Any ideas what I need to change?

    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-aeris-parser.py", line 92, in perform
        self.jsonResponse = self.apiCall(apiURL)
    AttributeError: 'PWSWeather' object has no attribute 'apiCall'
    2020-03-24 10:16:33,940 - WARNING - rmParserManager:181 -   * Parser Aeris PWS Weather Parser returned no values

    2020-03-24 10:16:38,989 - ERROR - user-aeris-parser:81 - using automatic location identifier
    2020-03-24 10:16:39,000 - ERROR - rmParserManager:168 -   * Cannot execute parser Aeris PWS Weather Parser
    2020-03-24 10:16:39,010 - ERROR - rmParserManager:169 - 'PWSWeather' object has no attribute 'apiCall'
    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-aeris-parser.py", line 92, in perform
        self.jsonResponse = self.apiCall(apiURL)
    AttributeError: 'PWSWeather' object has no attribute 'apiCall'
    0
    Comment actions Permalink
  • Avatar
    GordonL (Edited )

    Have you entered your client ID and client Secret?  Do have "useCustomStation" enabled or disabled? 

    Also, what is the hardware and software level of your Rainmachine?

    I haven't been able to reproduce this error.

     

    Thanks

    edit: Could you turn debug on and run this again, then send me the relevant piece of the log again please?

    0
    Comment actions Permalink
  • Avatar
    Kevin Miller

    Thanks for the reply!  I do have client ID and client Secret from teh Aeris site entered into the RainMachine UI.  I also have tried useCustomStation both on and off with the same results.

    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-aeris-parser.py", line 92, in perform
        self.jsonResponse = self.apiCall(apiURL)
    AttributeError: 'PWSWeather' object has no attribute 'apiCall'
    2020-03-24 12:06:07,149 - ERROR - rmParserManager:168 -   * Cannot execute parser Aeris PWS Weather Parser
    2020-03-24 12:06:07,151 - ERROR - rmParserManager:169 - 'PWSWeather' object has no attribute 'apiCall'
    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-aeris-parser.py", line 92, in perform
        self.jsonResponse = self.apiCall(apiURL)
    AttributeError: 'PWSWeather' object has no attribute 'apiCall'
    2020-03-24 12:11:07,210 - ERROR - rmParserManager:168 -   * Cannot execute parser Aeris PWS Weather Parser
    2020-03-24 12:11:07,212 - ERROR - rmParserManager:169 - 'PWSWeather' object has no attribute 'apiCall'
    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-aeris-parser.py", line 92, in perform
        self.jsonResponse = self.apiCall(apiURL)
    AttributeError: 'PWSWeather' object has no attribute 'apiCall'
    2020-03-24 12:11:24,184 - INFO  - rmMainManager:239 - Upgrade checked.
    2020-03-24 12:12:21,679 - INFO  - rmHTTPResourceApi4Diag:122 - Set log level to: 10
    2020-03-24 12:12:24,191 - DEBUG - rmRestrictions:330 - Restricted for 2 month
    2020-03-24 12:12:24,193 - DEBUG - rmPrograms:698 - Program 1 starts on a restricted day!
    2020-03-24 12:12:24,197 - DEBUG - rmParserManager:155 -      * Ignored because interval 21600 not expired for timestamp 1585069944 lastUpdate: 1585062994
    2020-03-24 12:12:24,199 - DEBUG - rmParserManager:155 -      * Ignored because interval 3600 not expired for timestamp 1585069944 lastUpdate: 1585066622
    2020-03-24 12:12:24,201 - DEBUG - rmParserManager:155 -      * Ignored because interval 21600 not expired for timestamp 1585069944 lastUpdate: 1585062994
    2020-03-24 12:12:24,203 - DEBUG - rmParserManager:138 -      * Ignored because retry delay 300 (sec) was not reached
    2020-03-24 12:12:24,205 - DEBUG - rmParserManager:221 -   * No new value available from parsers
    2020-03-24 12:12:24,207 - DEBUG - rmParserManager:223 - *** END Running parsers: None, 1585069944 (2020-03-24 12:12:24)
    2020-03-24 12:12:30,762 - DEBUG - rmRestrictions:330 - Restricted for 2 month
    2020-03-24 12:12:40,795 - DEBUG - rmMachineDiag:148 - Network gateway (192.168.7.1) up on interface wlan0
    2020-03-24 12:12:40,874 - DEBUG - rmMachineDiag:164 - Wireless interface wlan0: up
    2020-03-24 12:13:09,099 - DEBUG - rmMainManager:161 - run-parser
    2020-03-24 12:13:09,103 - DEBUG - rmRestrictions:330 - Restricted for 2 month
    2020-03-24 12:13:09,108 - DEBUG - rmPrograms:698 - Program 1 starts on a restricted day!
    2020-03-24 12:13:09,110 - DEBUG - rmParserManager:138 -      * Ignored because retry delay 300 (sec) was not reached
    2020-03-24 12:13:09,112 - DEBUG - rmParserManager:221 -   * No new value available from parsers
    2020-03-24 12:13:09,114 - DEBUG - rmParserManager:223 - *** END Running parsers: None, 1585069989 (2020-03-24 12:13:09)
    2020-03-24 12:13:09,117 - DEBUG - rmRestrictions:330 - Restricted for 2 month
    2020-03-24 12:13:09,119 - DEBUG - rmPrograms:698 - Program 1 starts on a restricted day!
    2020-03-24 12:13:09,121 - DEBUG - rmParserManager:109 - Parser None not run lastRunning timestamp 1585069989 current 1585069989
    2020-03-24 12:13:15,308 - DEBUG - rmMainManager:161 - checkForUpgrade
    2020-03-24 12:13:15,860 - INFO  - rmMainManager:239 - Upgrade checked.
    2020-03-24 12:13:15,865 - DEBUG - rmRestrictions:330 - Restricted for 2 month
    2020-03-24 12:13:15,866 - DEBUG - rmPrograms:698 - Program 1 starts on a restricted day!
    2020-03-24 12:13:15,869 - DEBUG - rmParserManager:109 - Parser None not run lastRunning timestamp 1585069989 current 1585069995
    0
    Comment actions Permalink
  • Avatar
    GordonL

    It's almost as if part of the file is missing.  The apiCall method is the last method in the file.  Can you try re-downloading the file and making sure it is complete, and then delete/add it to your RM again please?

    It runs fine here on two different RM's and on the SDK testbed so I'm not seeing where the problem could be otherwise.

    0
    Comment actions Permalink
  • Avatar
    Kevin Miller

    Thanks Gordon for the help.  It may have been a timing issue.  I had to contact Aeris Weather to get my station released to allow data access.  They told me they monitored the data for a few days to ensure quality of signal, but they pushed mine thru.  Also, I added my station in the interface on the RainMachine, and I was not adding the prefix to the naming convention.  The station name needed to have the PWS_ in front and I was only using my station name.  In any event, it seems to be working now. Thanks for sharing!

    1
    Comment actions Permalink
  • Avatar
    GHammer

    Thanks for the additional data source.

    I'm running WeeWX and have a push source from the WeeWX service to my Mini-8.

    Once I configured this parser and enabled it, I do see that it is getting the data.

    However, the local push (WeeWX) failed.

    Any ideas?

    Not sure I'd need both as they have the same data of course.

     

     

    0
    Comment actions Permalink
  • Avatar
    GHammer

    Any idea on detecting rain then using the API to pause or snooze the Rainmachine?

     

    0
    Comment actions Permalink
  • Avatar
    GordonL

    No idea why Weewx would stop working.  I don't use it so can't compare.  I do use the local upload from my Meteobridge and it continues to work.  I only really wanted the Aeris data for the forecast info.

    Not sure what you mean about rain detection.  The rain detection should work the same way no matter what your data source is and you always have the option of using an external rain sensor.

    0
    Comment actions Permalink
  • Avatar
    GHammer

    I have determined that having this parser and the local push enabled causes the local push to fail.

    If there is a way to have this parser serve to snooze or pause the Rainmachine, I'd be happy to disable the local push.

    Else, what logging would you need to see why this parser interferes with the local push?

    0
    Comment actions Permalink
  • Avatar
    GHammer

    On the rain.

    I use IFTTT through Ambient Weather. When my PWS sends rainfall to Ambient and it reaches 0.05" Ambient triggers IFTTT. IFTTT then sends Rainmachine a signal and Rainmachine finally sends my Mini-8 a snooze signal.

    What I'd like to have would eliminate the Ambient to IFTTT and just do it locally. Since IFTTT can do it, there must be an API call that does this.

    Anyway, as I offered, if there are any logs you'd like to see regarding the local push, let me know.

    0
    Comment actions Permalink
  • Avatar
    GordonL

    No way that I know of to have a parser pause or snooze the RM.  Set logging level to debug and send me your log after the local push update.  Might be some clue there.  It doesn't interfere with anything else so I'm at a loss.

     

    0
    Comment actions Permalink
  • Avatar
    GordonL

    There is an API call that does this, if you are using the API.  The parser doesn't.   I do the same as you using my HA controller which uses the RM API to signal a pause/snooze when it sees rainfall above a preset amount reported by my Meteobridge.

    0
    Comment actions Permalink
  • Avatar
    GHammer

    I'll gather the logs tomorrow.

    I wonder what port(s) are used for each as that is what is seems like.

    From WeeWX, I see "Unable to send" on the RM, only that no data has been received from local weather push.

     

    0
    Comment actions Permalink
  • Avatar
    GordonL

    The call to Aeris uses standard http, so destination port 80. Source port could be different.  The API calls are made on either port 8080 or 8081 depending on whether they are https or http so I doubt it's a port conflict.  I'm looking at the WeeWx addin code and it's consistent with that.  I'll wait for your logs.

    0
    Comment actions Permalink
  • Avatar
    GHammer

    First thing in the AM
    I'm at a loss myself.
    I'll pull logs from the RM and WeeWX

    0
    Comment actions Permalink
  • Avatar
    GHammer

    Here's what is in the RM log this morning.

    020-03-26 19:31:44,355 - INFO  - noaa-parser:363 - conditions-icon forecast-NWS day 2020-03-26 00:00:00 in skippedDays skipping
    2020-03-26 19:45:57,327 - ERROR - rmLimits:47 - POP value 1500 more than limits maximum of 100, invalidated
    2020-03-26 19:45:57,344 - ERROR - rmLimits:47 - POP value 6400 more than limits maximum of 100, invalidated
    2020-03-26 19:45:57,358 - ERROR - rmLimits:47 - POP value 8100 more than limits maximum of 100, invalidated
    2020-03-26 19:45:57,374 - ERROR - rmLimits:47 - POP value 6500 more than limits maximum of 100, invalidated
    2020-03-26 19:45:57,388 - ERROR - rmLimits:47 - POP value 4100 more than limits maximum of 100, invalidated
    2020-03-27 01:31:50,638 - INFO  - noaa-parser:115 - Fetching Hourly data from https://noaa.rainmachine.com/xml/sample_products/browser_interface/ndfdXMLclient.php
    2020-03-27 01:31:51,879 - INFO  - noaa-parser:370 - precipitation liquid: reject date 2020-03-26 20:00:00 as it's in the past
    2020-03-27 01:31:52,613 - INFO  - noaa-parser:370 - probability-of-precipitation 12 hour: reject date 2020-03-26 20:00:00 as it's in the past
    2020-03-27 01:31:52,867 - INFO  - noaa-parser:370 - humidity minimum relative: reject date 2020-03-26 20:00:00 as it's in the past
    2020-03-27 01:31:53,038 - INFO  - noaa-parser:119 - Fetching Daily data from https://noaa.rainmachine.com/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php 
    2020-03-27 01:33:01,410 - INFO  - rmMixer:123 - *** DATA IN THE PAST: 2020-03-26 00:00:00
    2020-03-27 01:33:01,427 - INFO  - rmMixer:124 - *** Received data: ('2020-03-26 00:00:00', temp=5.8/1, minTemp=None/0, maxTemp=None/0, rh=64/1, minRh=None/0, maxRh=None/0, wind=0.92/1, solarRad=19.87/1, skyCover=None/0, rain=0/1, et0=None/0, pop=None/0, qpf=None/0, condition=None/0, pressure=101.45/1, dewPoint=-1/1, userData=None, minTemp=-1/0, maxTemp=15/0, minRH=41/0, maxRH=85/0, et0cal=None, et0final=None)
    2020-03-27 01:33:01,651 - INFO  - rmMixer:131 - *** Added Existing data: '2020-03-26 00:00:00', temp=2.6/1, minTemp=None/0, maxTemp=None/0, rh=71/1, minRh=None/0, maxRh=None/0, wind=0.55599999999999988/1, solarRad=16.68/1, skyCover=None/0, rain=0/1, et0=None/0, pop=None/0, qpf=0/1, condition=13/1, pressure=101.65/1, dewPoint=-2/1, userData=None, minTemp=-1/1, maxTemp=13/1, minRH=44/1, maxRH=85/1, et0cal=2.3399235039415425, et0final=2.34
    2020-03-27 01:33:01,669 - INFO  - rmMixer:132 - *** All available Data: [('2020-03-26 00:00:00', temp=5.8/1, minTemp=None/0, maxTemp=None/0, rh=64/1, minRh=None/0, maxRh=None/0, wind=0.92/1, solarRad=19.87/1, skyCover=None/0, rain=0/1, et0=None/0, pop=None/0, qpf=None/0, condition=None/0, pressure=101.45/1, dewPoint=-1/1, userData=None, minTemp=-1/0, maxTemp=15/0, minRH=41/0, maxRH=85/0, et0cal=None, et0final=None), ('2020-03-26 00:00:00', temp=2.6/1, minTemp=None/0, maxTemp=None/0, rh=71/1, minRh=None/0, maxRh=None/0, wind=0.55599999999999988/1, solarRad=16.68/1, skyCover=None/0, rain=0/1, et0=None/0, pop=None/0, qpf=0/1, condition=13/1, pressure=101.65/1, dewPoint=-2/1, userData=None, minTemp=-1/1, maxTemp=13/1, minRH=44/1, maxRH=85/1, et0cal=2.3399235039415425, et0final=2.34)]
    2020-03-27 01:46:19,662 - ERROR - rmLimits:47 - POP value 1500 more than limits maximum of 100, invalidated
    2020-03-27 01:46:19,677 - ERROR - rmLimits:47 - POP value 6400 more than limits maximum of 100, invalidated
    2020-03-27 01:46:19,730 - ERROR - rmLimits:47 - POP value 8100 more than limits maximum of 100, invalidated
    2020-03-27 01:46:19,745 - ERROR - rmLimits:47 - POP value 5500 more than limits maximum of 100, invalidated
    2020-03-27 01:46:19,765 - ERROR - rmLimits:47 - POP value 4100 more than limits maximum of 100, invalidated
    2020-03-27 01:46:19,780 - ERROR - rmLimits:47 - POP value 4400 more than limits maximum of 100, invalidated
    2020-03-27 06:02:40,557 - INFO  - rmThreadWatcher:408 - **  Automatic Update: Starting update check as interval to next watering program is bigger than 3600
    2020-03-27 06:02:41,324 - INFO  - rmMainManager:442 - ** Automatic Update: No updates available
    2020-03-27 07:32:42,115 - INFO  - noaa-parser:115 - Fetching Hourly data from https://noaa.rainmachine.com/xml/sample_products/browser_interface/ndfdXMLclient.php
    2020-03-27 07:32:43,547 - INFO  - noaa-parser:418 - Adding from Cache: temperaturehourly: 43 for 2020-03-27 02:00:00
    2020-03-27 07:32:43,558 - INFO  - noaa-parser:418 - Adding from Cache: temperaturehourly: 41 for 2020-03-27 05:00:00
    2020-03-27 07:32:43,725 - INFO  - noaa-parser:418 - Adding from Cache: temperaturedew point: 36 for 2020-03-27 02:00:00
    2020-03-27 07:32:43,736 - INFO  - noaa-parser:418 - Adding from Cache: temperaturedew point: 38 for 2020-03-27 05:00:00
    2020-03-27 07:32:43,901 - INFO  - noaa-parser:418 - Adding from Cache: wind-speedsustained: 5 for 2020-03-27 02:00:00
    2020-03-27 07:32:43,911 - INFO  - noaa-parser:418 - Adding from Cache: wind-speedsustained: 4 for 2020-03-27 05:00:00
    2020-03-27 07:32:43,996 - INFO  - noaa-parser:370 - probability-of-precipitation 12 hour: reject date 2020-03-26 20:00:00 as it's in the past
    2020-03-27 07:32:44,177 - INFO  - noaa-parser:418 - Adding from Cache: humidityrelative: 76 for 2020-03-27 02:00:00
    2020-03-27 07:32:44,188 - INFO  - noaa-parser:418 - Adding from Cache: humidityrelative: 89 for 2020-03-27 05:00:00
    2020-03-27 07:32:44,430 - INFO  - noaa-parser:119 - Fetching Daily data from https://noaa.rainmachine.com/xml/sample_products/browser_interface/ndfdBrowserClientByDay.php 
    2020-03-27 07:47:01,849 - ERROR - rmLimits:47 - POP value 600 more than limits maximum of 100, invalidated
    2020-03-27 07:47:01,863 - ERROR - rmLimits:47 - POP value 6400 more than limits maximum of 100, invalidated
    2020-03-27 07:47:01,878 - ERROR - rmLimits:47 - POP value 10000 more than limits maximum of 100, invalidated
    2020-03-27 07:47:01,892 - ERROR - rmLimits:47 - POP value 6500 more than limits maximum of 100, invalidated
    2020-03-27 07:47:01,907 - ERROR - rmLimits:47 - POP value 4100 more than limits maximum of 100, invalidated
    2020-03-27 07:47:01,922 - ERROR - rmLimits:47 - POP value 4400 more than limits maximum of 100, invalidated
    2020-03-27 10:53:23,289 - INFO  - rmMainManager:225 - Upgrade checked.
    2020-03-27 10:53:59,834 - INFO  - rmMainManager:225 - Upgrade checked.

    No idea of the source of the errors, but those were logged with the local push disabled.
    Enabled, there is nothing in the log except it has not received data.

    Weather

    Local Weather Push No new weather data pushed
    NOAA Success
    Custom:Aeris PWS Weather Success

    From WeeWX logs I have a winning entry. but don't know why the authentication key failed, nothing was touched on WeeWX or the Mini-8 except adding this parser.

    Mar 27 11:05:33 srvr weewx[2200] DEBUG weewx.manager: Daily summary version is 2.0
    Mar 27 11:05:33 srvr weewx[2200] DEBUG weewx.reportengine: Report 'FTP' not enabled. Skipping.
    Mar 27 11:05:33 srvr weewx[2200] DEBUG weewx.reportengine: Report 'RSYNC' not enabled. Skipping.
    Mar 27 11:05:37 srvr weewx[2200] DEBUG weewx.restx: RainMachine: Failed upload attempt 2: HTTP Error 401: Unauthorized
    Mar 27 11:05:42 srvr weewx[2200] DEBUG user.interceptor: empty queue
    Mar 27 11:05:42 srvr weewx[2200] DEBUG weewx.restx: RainMachine: Failed upload attempt 3: HTTP Error 401: Unauthorized
    Mar 27 11:05:42 srvr weewx[2200] ERROR weewx.restx: RainMachine: Failed to publish record 2020-03-27 11:05:00 EDT (1585321500): Failed upload after 3 tries

     

    Got a new auth key from the Mini-8, changed it in WeeWX config and all is well.
    Thanks for the memory jog and especially for the new parser.

    2020-03-27 11:15:27,900 - INFO  - rmHTTPResourceApi4Parser:416 - Local Weather API push: 1585322100: {'maxtemp': 12.388888888888887, 'temperature': 12.388888888888887, 'dewpoint': -0.61842798406288636, 'maxrh': 40.636363636363631, 'rain': 0.0, 'pressure': 100.92862422567177, 'timestamp': 1585322100, 'mintemp': 6.2647058823529315, 'et': 0.024610959083432281, 'wind': 2.8639007991981077}
    0
    Comment actions Permalink
  • Avatar
    GordonL

    Glad you got it working. Those errors look like something related to the noaa forecast parser as they seem to occur when it runs.

    0
    Comment actions Permalink
  • Avatar
    GHammer

    That the way it looks to me as well and I've posted it to Issues Reporting along with the authkey being lost.
    That BTW, looks like something happened with a recent build, several people are reporting loss of access for this and that device recently.

    Now off to enable my rain sensor.

    Thanks again, working a treat!

    0
    Comment actions Permalink

Please sign in to leave a comment.