matthewwall / weewx-interceptor

weewx driver that intercepts web traffic from internet 'bridge' devices such as Acurite Access, ObserverIP, OS LW30x, LaCross GW1000U, FineOffset GW1000
GNU General Public License v3.0
104 stars 43 forks source link

"Rainin" - Acurite/Interceptor driver #58

Closed ZXant closed 4 years ago

ZXant commented 5 years ago

Weewx/Interceptor Driver for Acurite/Atlas give unidentified 'rainin' error. I was not sure what 'rainin' might be related to, then some research and may have figured-out as the following:

1) 'rain' sensors in Acurite Atlas as acquired by Interceptor driver

identifiers: {} raw data: ID=KNYCLIFT14&PASSWORD=XXXX& softwaretype=myAcuRite&dateutc=now&action=updateraw&realtime=1&rtfreq=35&baromin=30.05&UV=0&humidity=78&tempf=75.1&windspeedmph=3&winddir=291&windgustmph=4&windgustdir=55&dewptf=67.8&dailyrainin=0.06&rainin=0.06 raw packet: {'wind_speed': 3.0, 'barometer': 30.05, 'wind_gust': 4.0, 'dewpoint': 67.8, 'humidity_out': 78.0, 'uv': 0.0, 'rain': None, 'dateTime': 1564448985, 'temperature_out': 75.1, 'wind_dir': 291.0, 'rain_total': 0.06, 'wind_gust_dir': 55.0, 'usUnits': 1} mapped packet: {'barometer': 30.05, 'dewpoint': 67.8, 'outHumidity': 78.0, 'UV': 0.0, 'rain': None, 'dateTime': 1564448985, 'windDir': 291.0, 'outTemp': 75.1, 'windSpeed': 3.0, 'windGust': 4.0, 'usUnits': 1, 'windGustDir': 55.0}

That is "dailyrainin", "rainin", "rain", "rain_total". Not exactly clear which one is what, but may have info overlap.

2) "rainin" in Interceptor driver Previous postings in weews Forum mention "rainin" error and not recognized, which was puzzling as "rainin" mentioned to be at Interceptor.py as 'IGNORED_LABELS'.

That gave a hint from Developers that "rainin" might be overlap info, and should be ignored. While "rainin" is indeed in IGNORED_LABELS section, was still generating error... and the reason is the IGNORED_LABELS shows twice in Interceptor.py (one with "rainin", the other without "rainin").

    IGNORED_LABELS = ['realtime', 'rtfreq', 'action', 'ID', 'PASSWORD', 'dateutc', 'softwaretype']

    IGNORED_LABELS = ['rainin', 'dewptf', 'realtime', 'rtfreq', 'action', 'ID', 'PASSWORD', 'dateutc', 'updateraw', 'sensor', 'mt', 'id', 'probe', 'check', 'water']

Once 'rainin' is added to other IGNORED_LABEL instance, the msg error is gone, while still providing the correct Rain data correlation.

In summary, simple fix... please add at missing 'rainin' at IGONORED_LABEL

Best, Xant

matthewwall commented 4 years ago

adding 'rainin' to every 'IGNORED_LABELS' array is just putting a band-aid on the problem - it does not solve the underlying issue.

each class in the interceptor is designed to handle one protocol. unfortunately, some hardware sends data using multiple protocols. so this is a fundamental design flaw in the interceptor. for the HTTP GET protocols, instead of using a protocol/hardware specified in the weewx config file, the interceptor should detect the protocol then use it. alternatively, if a protocol is specified in the config file, then the interceptor should ignore any other packet that is not that protocol.

for example, if you have an ecowitt gw1000, it can send (at least) 3 different protocols. the interceptor will happily intercept all three of them, grab what it can from each one, and treat that as three different loop packets, instead of just one.

that is the fundamental design flaw that must be addressed.

meanwhile, configure the hardware to send out only one protocol.