Glenn,

I've spent some time working through the atmocom driver and I think I have 
a basic understanding of it now. You are correct in that you need to map 
run to dailyrainin (or one of the other cumulative rain fields). 

Your sensor map is using fields from the WU posts so you can ignore the 
Ambient posts (whether you continue to allow your station to post to 
Ambient is up to you, in your current config WeeWX will do nothing with the 
Ambient data). As far as WU is concerned rainin is the rainfall occurring 
in the last hour, you could consider this to be the rain rate. When mapping 
rainin to WeeWX field rain the atmocom driver attempts to take the delta 
between successive rainin values to determine the rainfall in the period. 
This works fine for a source data field that holds the cumulative rain such 
as a daily or yearly rain total but the problem with using rainin as a 
source is that since it is rainfall over the last hour you have rainfall 
dropping off because it fell over an hour ago and rainfall being added that 
just fell in the last period. It is impossible to tell the rainfall in the 
last period without some complexing processing. If you did use rainin 
everything would be fine while there is no rain but once it does start 
raining you will see your rain data going all over the place, certainly not 
something that can be fixed by a simple scaling factor (as you found out).

Try changing you sensor map, restart WeeWX and then either manually 
stimulate your rain gauge or wait for some rain.

One you get some consistent/explainable rain data you may well still have a 
units problem (reading the driver code it is not very units aware) but 
hopefully this will only be a display issue rather than an underlying data 
issue.

Gary

On Sunday, 15 December 2019 13:43:39 UTC+10, Glenn Szlagowski wrote:
>
> Success!
> Thanks for your help-greatly appreciated!
>
> There are two types of packets..looks like one goes to ambient weather and 
> the other one goes to WU. Interestingly only every fourth packet goes to 
> ambient.
>
> Note that the ambient packet contains extra fields.
>
> Here are some samples (sans passwords):
>
> Dec 14 21:54:54 glenn weewx[5373]: atmocomudp: MainThread: raw packet: 
> ('passkey=xxxxxx&rev=0x2E708&data=/weatherstation/updateweatherstation.php?ID=ITEHKUMM2&PASSWORD=xxxxxx&indoortempf=70.5&tempf=32.0&dewptf=29.7&windchillf=32.0&indoorhumidity=50&humidity=91&windspeedmph=1.3&windgustmph=2.2&winddir=210&absbaromin=28.84&baromin=29.50&rainin=0.00&dailyrainin=0.04&weeklyrainin=1.24&monthlyrainin=1.32&yearlyrainin=38.87&solarradiation=0.00&UV=0&dateutc=2019-12-15%202:54:44&softwaretype=AMBWeatherV4.0.2&action=updateraw&realtime=1&rtfreq=5
>  
> ', ('192.168.1.8', 12000))
>
> Dec 14 21:55:33 glenn weewx[5373]: atmocomudp: MainThread: raw packet: 
> ('passkey=xxxxxx&rev=0x2E708&data=/endpoint?stationtype=AMBWeatherV4.0.2&PASSKEY=xxxxxx&dateutc=2019-12-15+02:55:32&winddir=330&windspeedmph=1.3&windgustmph=2.2&maxdailygust=11.4&tempf=32.0&hourlyrainin=0.00&eventrainin=0.04&dailyrainin=0.04&weeklyrainin=1.24&monthlyrainin=1.32&yearlyrainin=38.87&baromrelin=29.51&baromabsin=28.85&humidity=92&tempinf=70.5&humidityin=50&uv=0&solarradiation=0.00
>  
> ', ('192.168.1.8', 12000))
>
> If I change the ATMOCOM sensor mapping to dailyrainin, would that work?
>
> ---
>
>
> On Saturday, December 14, 2019 at 7:17:57 PM UTC-5, gjr80 wrote:
>>
>> Glenn,
>>
>> Ok, I see the raw packet issue (should have seen it before actually). 
>>  Are you up for making a slight change to atmocomudp.py? If so first make a 
>> backup copy of /usr/share/weewx/user/atmocomudp.py then open 
>> /usr/share/weewx/user/atmocomudp.py in a text editor and change line 283 
>> from:
>>
>> loginf('raw packet: %s' % m)
>>
>> to
>>
>> loginf('raw packet: %s' % (m,))
>>
>> Save atmocomudp.py, set log_raw_packets = True in weeewx.conf and restart 
>> WeeWX. Check your log.
>>
>> Gary
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/dc566dbb-7b97-41a0-9e0a-95146384237d%40googlegroups.com.

Reply via email to