Yea, I did stop/start weewx after I made the changes.
When it is set aggregation = individual, and debug set to 2, here's the
results....appears that it simply takes the first value and publishes that
to MQTT and ignores all the others. Seems like perhaps the parser is broken.
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: lines=['{"time" :
"2019-03-08 16:06:56", "model" : "Acurite 5n1 sensor", "sensor_id" : 3420,
"channel" : "A", "sequence_num" : 0, "battery" : "OK", "message_type" : 49,
"wind_speed_mph" : 0.000, "wind_dir_deg" : 180.000, "wind_dir" : "S",
"rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 11427}\n', '{"time"
: "2019-03-08 16:06:56", "model" : "Acurite 5n1 sensor", "sensor_id" :
3420, "channel" : "A", "sequence_num" : 1, "battery" : "OK", "message_type"
: 49, "wind_speed_mph" : 0.000, "wind_dir_deg" : 180.000, "wind_dir" : "S",
"rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 11427}\n', '{"time"
: "2019-03-08 16:06:56", "model" : "Acurite 5n1 sensor", "sensor_id" :
3420, "channel" : "A", "sequence_num" : 2, "battery" : "OK", "message_type"
: 49, "wind_speed_mph" : 0.000, "wind_dir_deg" : 180.000, "wind_dir" : "S",
"rainfall_accumulation_inch" : 0.000, "raincounter_raw" : 11427}\n', '{"time"
: "2019-03-08 16:06:59", "model" : "Acurite tower sensor", "id" : 8806,
"sensor_id" : 8806, "channel" : "A", "temperature_C" : 18.600, "humidity" :
50, "battery_low" : 0}\n', '{"time" : "2019-03-08 16:06:59", "model" :
"Acurite tower sensor", "id" : 8806, "sensor_id" : 8806, "channel" : "A",
"temperature_C" : 18.600, "humidity" : 50, "battery_low" : 0}\n', '{"time"
: "2019-03-08 16:06:59", "model" : "Acurite tower sensor", "id" : 8806,
"sensor_id" : 8806, "channel" : "A", "temperature_C" : 18.600, "humidity" :
50, "battery_low" : 0}\n', '{"time" : "2019-03-08 16:07:01", "model" :
"Acurite tower sensor", "id" : 2070, "sensor_id" : 2070, "channel" : "A",
"temperature_C" : 20.500, "humidity" : 36, "battery_low" : 0}\n', '{"time"
: "2019-03-08 16:07:01", "model" : "Acurite tower sensor", "id" : 2070,
"sensor_id" : 2070, "channel" : "A", "temperature_C" : 20.500, "humidity" :
36, "battery_low" : 0}\n', '{"time" : "2019-03-08 16:07:01", "model" :
"Acurite tower sensor", "id" : 2070, "sensor_id" : 2070, "channel" : "A",
"temperature_C" : 20.500, "humidity" : 36, "battery_low" : 0}\n']
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: packet={'BatteryStatus'
: 0, 'dateTime': 1552061216, 'windDir': 180.0, 'windSpeed': 0.0,
'rain_total': 114.27, 'usUnits': 1}
Mar 8 11:07:04 weewx weewx[15660]: message repeated 2 times: [ sdr:
MainThread: packet={'BatteryStatus': 0, 'dateTime': 1552061216, 'windDir':
180.0, 'windSpeed': 0.0, 'rain_total': 114.27, 'usUnits': 1}]
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: packet={
'BasementHumidity': 50.0, 'BasementTemp': 18.6, 'usUnits': 16, 'dateTime':
1552061219}
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: ignoring duplicate
packet {'BasementHumidity': 50.0, 'BasementTemp': 18.6, 'usUnits': 16,
'dateTime': 1552061219}
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: ignoring duplicate
packet {'BasementHumidity': 50.0, 'BasementTemp': 18.6, 'usUnits': 16,
'dateTime': 1552061219}
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: packet={'dateTime':
1552061221, 'usUnits': 16, 'LivingRoomTemp': 20.5, 'LivingRoomHumidity':
36.0}
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: ignoring duplicate
packet {'dateTime': 1552061221, 'usUnits': 16, 'LivingRoomTemp': 20.5,
'LivingRoomHumidity': 36.0}
Mar 8 11:07:04 weewx weewx[15660]: sdr: MainThread: ignoring duplicate
packet {'dateTime': 1552061221, 'usUnits': 16, 'LivingRoomTemp': 20.5,
'LivingRoomHumidity': 36.0}
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: data: {'BatteryStatus':
'0.0', 'hourRain_in': '0.0', 'windSpeed_mph': '0.0', 'rain24_in': '0.0',
'rainRate_inch_per_hour': '0.0', 'dateTime': '1552061216.0', 'dayRain_in':
'0.0', 'rain_in': '0.0', 'rain_total': '114.27', 'usUnits': '1.0'}
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: url: http:
//tick.home:8086/write?db=weewx
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: data: record
BatteryStatus=0.0,dayRain_in=0.0,rainRate_inch_per_hour=0.0,rain_total=
114.27,hourRain_in=0.0,rain_in=0.0,usUnits=1.0,dateTime=1552061216.0,
windSpeed_mph=0.0,rain24_in=0.0 1552061216000000000
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: Published record 2019-03-08
11:06:56 EST (1552061216)
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: data: {'BatteryStatus':
'0.0', 'hourRain_in': '0.0', 'windSpeed_mph': '0.0', 'rain24_in': '0.0',
'rainRate_inch_per_hour': '0.0', 'dateTime': '1552061216.0', 'dayRain_in':
'0.0', 'rain_in': '0.0', 'rain_total': '114.27', 'usUnits': '1.0'}
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: url: http:
//tick.home:8086/write?db=weewx
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: data: record
BatteryStatus=0.0,dayRain_in=0.0,rainRate_inch_per_hour=0.0,rain_total=
114.27,hourRain_in=0.0,rain_in=0.0,usUnits=1.0,dateTime=1552061216.0,
windSpeed_mph=0.0,rain24_in=0.0 1552061216000000000
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: Published record 2019-03-08
11:06:56 EST (1552061216)
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: url: http:
//tick.home:8086/write?db=weewx
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: data: record
BatteryStatus=0.0,dayRain_in=0.0,rainRate_inch_per_hour=0.0,rain_total=
114.27,hourRain_in=0.0,rain_in=0.0,usUnits=1.0,dateTime=1552061216.0,
windSpeed_mph=0.0,rain24_in=0.0 1552061216000000000
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: data: {'BatteryStatus':
'0.0', 'hourRain_in': '0.0', 'windSpeed_mph': '0.0', 'rain24_in': '0.0',
'rainRate_inch_per_hour': '0.0', 'dateTime': '1552061216.0', 'dayRain_in':
'0.0', 'rain_in': '0.0', 'rain_total': '114.27', 'usUnits': '1.0'}
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: Published record 2019-03-08
11:06:56 EST (1552061216)
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: data: {'hourRain_in': '0.0'
, 'BasementHumidity': '50.0', 'rain24_in': '0.0', 'rainRate_inch_per_hour':
'0.0', 'dateTime': '1552061219.0', 'dayRain_in': '0.0', 'BasementTemp_F':
'65.48', 'usUnits': '1.0'}
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: Published record 2019-03-08
11:06:59 EST (1552061219)
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: data: {'rain24_in': '0.0',
'hourRain_in': '0.0', 'LivingRoomTemp_F': '68.9', 'rainRate_inch_per_hour':
'0.0', 'dateTime': '1552061221.0', 'dayRain_in': '0.0', 'usUnits': '1.0',
'LivingRoomHumidity': '36.0'}
Mar 8 11:07:04 weewx weewx[15660]: restx: MQTT: Published record 2019-03-08
11:07:01 EST (1552061221)
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: url: http:
//tick.home:8086/write?db=weewx
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: data: record
BasementHumidity=50.0,dayRain_in=0.0,rainRate_inch_per_hour=0.0,hourRain_in=
0.0,BasementTemp_F=65.48,usUnits=1.0,dateTime=1552061219.0,rain24_in=0.0
1552061219000000000
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: url: http:
//tick.home:8086/write?db=weewx
Mar 8 11:07:04 weewx weewx[15660]: restx: Influx: data: record dayRain_in=
0.0,rainRate_inch_per_hour=0.0,hourRain_in=0.0,LivingRoomTemp_F=68.9,usUnits
=1.0,LivingRoomHumidity=36.0,dateTime=1552061221.0,rain24_in=0.0
1552061221000000000
Monitoring the MQTT broker:
[root@server ~]$ mosquitto_sub -v -t weewx/#
weewx/BatteryStatus 0.0
weewx/BatteryStatus 0.0
weewx/BatteryStatus 0.0
weewx/hourRain_in 0.0
weewx/rain24_in 0.0
As you can see from the debug log, I also have the Influx extension
running, and the data does in fact get inserted into InfluxDB properly.
Any more ideas from anyone?
On Friday, March 8, 2019 at 7:27:53 AM UTC-5, HoracioDos wrote:
>
> Hello!.
>
> It works for me. Perhaps it's a silly question. Did you stop and start
> weewx when you set aggregation = individual?
>
> mosquitto_sub -h localhost -t weather/#
> 8.38659531877
> 404.057634127
> 79.9993663432
> 1053.16600212
> 0.0
> 463.258922832
> 1053.16600212
> 12.9336678556
> -2.73389218279
> 1.0
> 0.0
> 0.000203954856889
> 12.0
> 0.306093482847
> 0.508
> -0.511552874707
> 0.0
> 1055.96899606
> 0.306093482847
>
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.