weewx driver that intercepts web traffic from internet 'bridge' devices such as Acurite Access, ObserverIP, OS LW30x, LaCross GW1000U, FineOffset GW1000
Using the WUClient with an ESP32 controlling and monitoring a small greenhouse. There are two moisture sensors and two pumps. I'm using the rain field and counting each the pump cycles as a mm of rainfall. I'd like to separate the two and decided to use the hail field for the second pump as it is in the same class as rain. I've added the fields to the DEFAULT_SENSOR_MAP and LABEL_MAP and it is parsing out the records. But there seems to be an lot more special case handling on the rain records than there is on hail records. Is there a better way to do this?
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: raw data: tempf=73&humidity=49&soilmoisture1=70.73&soilmoisture2=1.22&soilmoisture3=80.00&soilmoisture4=0.00&dailyrain=0.00&dailyhail=0.12&solarradiation=200&rssi=62
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: using rain_total 0.0 from dailyrain
Using the WUClient with an ESP32 controlling and monitoring a small greenhouse. There are two moisture sensors and two pumps. I'm using the rain field and counting each the pump cycles as a mm of rainfall. I'd like to separate the two and decided to use the hail field for the second pump as it is in the same class as rain. I've added the fields to the DEFAULT_SENSOR_MAP and LABEL_MAP and it is parsing out the records. But there seems to be an lot more special case handling on the rain records than there is on hail records. Is there a better way to do this?
syslog output ----------- Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: ServerThread: GET: tempf=73&humidity=49&soilmoisture1=70.73&soilmoisture2=1.22&soilmoisture3=80.00&soilmoisture4=0.00&dailyrain=0.00&dailyhail=0.12&solarradiation=200&rssi=62
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: raw data: tempf=73&humidity=49&soilmoisture1=70.73&soilmoisture2=1.22&soilmoisture3=80.00&soilmoisture4=0.00&dailyrain=0.00&dailyhail=0.12&solarradiation=200&rssi=62
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: using rain_total 0.0 from dailyrain
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: raw packet: {'soil_moisture_3': 80.0, 'solar_radiation': 200.0, 'humidity_out': 49.0, 'hail': 0.12, 'dateTime': 1602182773, 'temperature_out': 73.0, 'rain': 0.0, 'rxCheckPercent': 62.0, 'soil_moisture_1': 70.730000000000004, 'soil_moisture_2': 1.22, 'rain_total': 0.0, 'soil_moisture_4': 0.0, 'usUnits': 1}
Oct 8 11:46:12 gato weewx.irrigate[30193]: interceptor: MainThread: mapped packet: {'soilMoist2': 1.22, 'outHumidity': 49.0, 'soilMoist4': 0.0, 'radiation': 200.0, 'hail': 0.12, 'dateTime': 1602182773, 'soilMoist3': 80.0, 'outTemp': 73.0, 'soilMoist1': 70.730000000000004, 'rain': 0.0, 'rxCheckPercent': 62.0, 'usUnits': 1}
diff output ------ diff /usr/share/weewx/user/interceptor.py weewx-interceptor-master/bin/user/interceptor.py 414,416d413 < # added ATM < 'hail': 'hail', < 'rxCheckPercent': 'rxCheckPercent',
802,804d798 < # added these ATM < 'rssi': 'rxCheckPercent', < 'dailyhail': 'hail',