weatherlinkip.parser not loading at startup
I just discovered a major problem with this parser. It doesn't load automatically after power cycling the RM as if there were a power failure. This needs to be fixed. If I can't use the data from my local weather station after a power failure then I can't use RM.
I see this in the log:
rmParserManager:228 - *** BEGIN Loading parsers from '/rainmachine-app/RMParserFramework/parsers' 2019-02-11 12:43:09,614 - INFO - rmParser:69 - *** Registering parser METNO Parser with interval 21600 2019-02-11 12:43:09,681 - INFO - rmParser:69 - *** Registering parser Simulator Parser with interval 10800 2019-02-11 12:43:09,742 - INFO - rmParser:69 - *** Registering parser My Example Parser with interval 21600 2019-02-11 12:43:09,764 - INFO - rmParser:69 - *** Registering parser Netatmo Parser with interval 21600 2019-02-11 12:43:09,816 - INFO - rmParser:69 - *** Registering parser FAWN Parser with interval 21600 2019-02-11 12:43:09,856 - INFO - rmParser:69 - *** Registering parser ForecastIO Parser with interval 21600 2019-02-11 12:43:09,904 - INFO - rmParser:69 - *** Registering parser WeatherDisplay Parser with interval 21600 2019-02-11 12:43:09,964 - INFO - rmParser:69 - *** Registering parser WUnderground Parser with interval 21600 2019-02-11 12:43:10,017 - INFO - rmParser:69 - *** Registering parser CIMIS Parser with interval 21600 2019-02-11 12:43:10,069 - INFO - rmParser:69 - *** Registering parser NOAA Parser with interval 21600 2019-02-11 12:43:10,107 - INFO - rmParser:69 - *** Registering parser OpenWeatherMap Parser with interval 21600 2019-02-11 12:43:10,210 - INFO - rmParser:69 - *** Registering parser Weather Rules Parser with interval 3600 2019-02-11 12:43:10,275 - INFO - rmParserManager:313 - *** END Loading parsers
...but it doesn't include the the Weatherlinkip parser. It needs to load any that were loaded by the user.
-
I tried and I cannot replicate. I took the parser source code from Developers Repository and it's loading fine.
2019-02-18 22:28:34,111 - INFO - rmThreadWatcher:143 - ThreadWatcher running True
2019-02-18 22:28:34,112 - INFO - rmLocalNetworkAdvertise:115 - Local Network Advertiser starting
2019-02-18 22:28:34,122 - INFO - rmParserManager:228 - *** BEGIN Loading parsers from './RMParserFramework/parsers'
2019-02-18 22:28:34,123 - INFO - rmParser:69 - *** Registering parser ForecastIO Parser with interval 21600
2019-02-18 22:28:34,157 - INFO - rmParser:69 - *** Registering parser DavisWeatherLinkIP Parser with interval 21600
2019-02-18 22:28:34,191 - INFO - rmParser:69 - *** Registering parser Fixed Parser with interval 21600Could you DELETE this weather service from Web UI (User Uploaded) (I know I've said that before), reboot RainMachine, ADD NEW in Web UI and send me the logs from device after this operation.
These is my log after this operation:
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:6: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMParserFramework.rmParser import RMParser
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:7: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMUtilsFramework.rmLogging import log
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:8: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMDataFramework.rmWeatherData import RMWeatherConditions
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:9: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMDataFramework.rmUserSettings import globalSettings
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:10: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMUtilsFramework.rmTimeUtils import *
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:11: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
from RMUtilsFramework.rmUtils import convertKnotsToMS, convertFahrenheitToCelsius, convertInchesToMM
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:13: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
import datetime, time
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:14: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
import socket
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:15: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
import struct
/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py:16: RuntimeWarning: Parent module 'user-weatherlinkip2-parser' not found while handling absolute import
import binascii
2019-02-18 22:45:44,315 - INFO - rmParser:69 - *** Registering parser DavisWeatherLinkIP second Parser with interval 21600
2019-02-18 22:45:44,315 - INFO - rmParserManager:384 - * Parser user-weatherlinkip2-parser.py successful loaded from file '/indevel/rainmachine2/rainmachine/RMParserFramework/parsers/user-weatherlinkip2-parser.py'I'm also adding a renamed version for you to try maybe there is an issue in registration DB that prevent the original parser to be loaded. You should load this version (maybe rename to .py instead of .txt beforehand ).
-
I tried the renamed version. It loads ok and runs and retrieves the data from the weather station but when I reboot it still doesn't load.
Would it have to do with this
2019-02-19 15:23:13,432 - INFO - rmMainManager:136 - Starting bonjour service 2019-02-19 15:23:13,434 - INFO - rmBonjourService:16 - Not available for this platform
-
OK. I deleted the parser and then rebooted and then loaded weatherlinkip2-parser.txt
Here's the log.
2019-02-19 15:40:31,411 - INFO - rmUtils:114 - REBOOTING MACHINE... 2019-02-19 15:40:31,414 - INFO - rmUtils:127 - reboot 2019-02-19 15:40:52,512 - INFO - main:50 - RainMachine v2 Copyright (c) 2015 Green Electronics LLC 2019-02-19 15:40:52,530 - INFO - main:51 - Running on platform Android 2019-02-19 15:40:52,535 - INFO - main:66 - Waiting for IP address (0/40) Current: None 2019-02-19 15:40:53,539 - INFO - main:66 - Waiting for IP address (1/40) Current: None 2019-02-19 15:40:54,544 - INFO - main:66 - Waiting for IP address (2/40) Current: None 2019-02-19 15:40:55,548 - INFO - main:66 - Waiting for IP address (3/40) Current: None 2019-02-19 15:40:56,552 - INFO - main:66 - Waiting for IP address (4/40) Current: None 2019-02-19 15:40:57,556 - INFO - main:66 - Waiting for IP address (5/40) Current: None 2019-02-19 15:40:58,562 - INFO - main:66 - Waiting for IP address (6/40) Current: None 2019-02-19 15:40:59,566 - INFO - main:66 - Waiting for IP address (7/40) Current: None 2019-02-19 15:41:00,570 - INFO - main:66 - Waiting for IP address (8/40) Current: None 2019-02-19 15:41:01,574 - INFO - main:66 - Waiting for IP address (9/40) Current: None 2019-02-19 15:41:04,032 - INFO - main:66 - Waiting for IP address (10/40) Current: None 2019-02-19 15:41:05,036 - INFO - main:66 - Waiting for IP address (11/40) Current: None 2019-02-19 15:41:06,066 - INFO - main:66 - Waiting for IP address (12/40) Current: None 2019-02-19 15:41:07,263 - INFO - main:66 - Waiting for IP address (13/40) Current: None 2019-02-19 15:41:08,267 - INFO - main:73 - WIRELESS Interface wlan0, Mode: None, IP: 192.168.114.150, MAC: 50:3e:aa:3f:c4:8f, hasClientLink: 0, Mode: None 2019-02-19 15:41:08,278 - INFO - main:110 - Valves available 16 2019-02-19 15:41:08,480 - INFO - rmRestrictions:394 - *** Populating week weather data from database. 2019-02-19 15:41:08,599 - INFO - rmTimeZoneAndroid:49 - Setting timezone to: America/Los_Angeles Olson: PST8PDT,M3.2.0,M11.1.0 2019-02-19 15:41:08,725 - INFO - rmStationDownloader:27 - Downloading station info: http://54.186.186.3/api/et_stats/nearby_stations?latitude=47.302244799999997&longitude=-122.6712361&elevation=66.235519409199995 2019-02-19 15:41:09,063 - INFO - rmDoyDownloader:22 - Downloading DOY database: http://54.186.186.3/api/et_stats/eto?station_id=9741&source=station 2019-02-19 15:41:09,447 - INFO - rmDoyDownloader:48 - Got 365 values for et0 and 4.20 as et0Avg 2019-02-19 15:41:09,660 - INFO - rmUserSettings:138 - --------------------------------------------------------------------------------------------- 2019-02-19 15:41:09,663 - INFO - rmUserSettings:160 - Version ('4.0.974') Running for: - name: '4809 100th Ave Ct NW, Gig Harbor, WA 98335, USA' - timezone: 'America/Los_Angeles' - latitude: 47.302244799999997 - longitude: -122.6712361 - elevation: 66.235519409199995 - et0Average: 4.6200000000000001 - krs: 0.16 - rainSensitivity: 0.80000000000000004 - windSensitivity: 0.5 - wsDays: 2 - database path: '/rainmachine-app/DB/Default' - httpsServerPort: 8080 (ssl) - httpServerPort: 18080 - wizardHasRun: 1 2019-02-19 15:41:09,665 - INFO - rmUserSettings:161 - --------------------------------------------------------------------------------------------- 2019-02-19 15:41:09,668 - INFO - rmThreadWatcher:136 - ThreadWatcher running True 2019-02-19 15:41:09,679 - INFO - rmLocalNetworkAdvertise:111 - Local Network Advertiser starting 2019-02-19 15:41:09,740 - INFO - rmParserManager:228 - *** BEGIN Loading parsers from '/rainmachine-app/RMParserFramework/parsers' 2019-02-19 15:41:09,825 - INFO - rmParser:69 - *** Registering parser METNO Parser with interval 21600 2019-02-19 15:41:09,935 - INFO - rmParser:69 - *** Registering parser Simulator Parser with interval 10800 2019-02-19 15:41:09,993 - INFO - rmParser:69 - *** Registering parser My Example Parser with interval 21600 2019-02-19 15:41:10,015 - INFO - rmParser:69 - *** Registering parser Netatmo Parser with interval 21600 2019-02-19 15:41:10,070 - INFO - rmParser:69 - *** Registering parser FAWN Parser with interval 21600 2019-02-19 15:41:10,120 - INFO - rmParser:69 - *** Registering parser ForecastIO Parser with interval 21600 2019-02-19 15:41:10,180 - INFO - rmParser:69 - *** Registering parser WeatherDisplay Parser with interval 21600 2019-02-19 15:41:10,268 - INFO - rmParser:69 - *** Registering parser WUnderground Parser with interval 21600 2019-02-19 15:41:10,323 - INFO - rmParser:69 - *** Registering parser CIMIS Parser with interval 21600 2019-02-19 15:41:10,377 - INFO - rmParser:69 - *** Registering parser NOAA Parser with interval 21600 2019-02-19 15:41:10,398 - INFO - rmParser:69 - *** Registering parser OpenWeatherMap Parser with interval 21600 2019-02-19 15:41:10,524 - INFO - rmParser:69 - *** Registering parser Weather Rules Parser with interval 3600 2019-02-19 15:41:10,668 - INFO - rmParserManager:313 - *** END Loading parsers 2019-02-19 15:41:10,875 - INFO - rmMainManager:136 - Starting bonjour service 2019-02-19 15:41:10,877 - INFO - rmBonjourService:16 - Not available for this platform 2019-02-19 15:41:10,920 - INFO - rmAlexaServer:439 - IP address available 2019-02-19 15:41:13,806 - WARNING - rmProgramScheduler:97 - Program (1) already run or this day: programLastRun=2019-02-19 00:00:00, newStartTime=2019-02-19 06:00:00. It will be scheduled again with the new start info! 2019-02-19 15:42:08,431 - INFO - rmParser:69 - *** Registering parser DavisWeatherLinkIP second Parser with interval 3600 2019-02-19 15:42:08,433 - INFO - rmParserManager:384 - * Parser user-weatherlinkip2-parser.txt successful loaded from file '/rainmachine-app/RMParserFramework/parsers/user-weatherlinkip2-parser.txt' 2019-02-19 15:42:10,952 - INFO - user-weatherlinkip2-parser:55 - Sent LOOP command 2019-02-19 15:42:15,960 - INFO - user-weatherlinkip2-parser:66 - Recv timeout (timed out) retrying. 2019-02-19 15:42:17,963 - INFO - user-weatherlinkip2-parser:69 - Sent LOOP command 2019-02-19 15:42:18,634 - INFO - user-weatherlinkip2-parser:77 - Parsing Response 2019-02-19 15:42:18,637 - INFO - user-weatherlinkip2-parser:118 - Barometer: 98.194 2019-02-19 15:42:18,639 - INFO - user-weatherlinkip2-parser:123 - Outside Temp: 5.55555555556 2019-02-19 15:42:18,641 - INFO - user-weatherlinkip2-parser:130 - Wind Speed (10min avg): 0.0 2019-02-19 15:42:18,643 - INFO - user-weatherlinkip2-parser:133 - Humidity: 89 2019-02-19 15:42:18,645 - INFO - user-weatherlinkip2-parser:139 - Solar Radiation: 60 2019-02-19 15:42:18,647 - INFO - user-weatherlinkip2-parser:144 - Day Rain: 0.0 2019-02-19 15:42:18,650 - INFO - user-weatherlinkip2-parser:150 - Day EvapoTranspiration: 0.0 2019-02-19 15:42:18,652 - INFO - user-weatherlinkip2-parser:157 - Condition: 7 -> 18 -
The Bonjour service doesn't affect, the Bonjour is used from Android not from Rainmachine code.
I see that you use .txt extension instead of .py in my tests I used .py extension that would prevent RainMachine from compiling the code and might affect operation.
So with your latest log it still doesn't load at reboot automatically ? If it doesn't I'm not sure where the culprit can be, we could reset to defaults or at least delete /rainmachine-app/DB/Default/rainmachine-parser.sqlite (with a ssh login) but you'll lose the weather service parser graphs.
-
I'm using Win10 and Chrome for the web ui. It won't upload with the .py extension. It will upload it and run it with either the .txt or .py.txt extension. Perhaps this is the problem with the automatic loading feature...it has to be loaded as a .py file. I have a linux mint machine available or I could SSH in using WinSCP/Putty with my Win10 box. Which do you recommend?
I found this instruction for SSH:https://support.rainmachine.com/hc/en-us/articles/228652648-How-to-SSH-on-Touch-HD-2nd-generation-devices Is this the proper procedure?
Once I connect via SSH, what is the command for uploading the parser file?
Or, if I were to use the web ui from my linux machine would it take the .py file? That would be easier.
-
Excellent. That's a good improvement.
Now I'm working on implementing a watchdog to trigger a power cycle of the RM's if they hang. I hope that it won't be needed, but I don't want to take the chance. It's easy for me to do this using HomeSeer but not so easy for most users. It could be done with an arduino easily as well. Something you could do as an optional accessory.
Please sign in to leave a comment.
Comments
9 comments