bellrichm / WeeWX-MQTTSubscribe

A WeeWX service and driver that receives data from MQTT.
GNU General Public License v3.0
52 stars 13 forks source link

Unsubscribed Topics #163

Closed n7qnm closed 2 years ago

n7qnm commented 2 years ago

Hi - I've got MQTTSubscribe set up and am seeing some messages that I haven't subscribed to show up. Here's my config: [[topics]]

Units for MQTT payloads without unit value.

    # Valid values: US, METRIC, METRICWX
    # Default is: US
    unit_system = US

    [[[skyweather2/state]]]
        [[[[BarometricPressureSeaLevel]]]]
            name = barometer
            ignore = false
            units = kPa
        [[[[SunlightUVIndex]]]]
            name = UV
            ignore = false
        [[[[SunlightVisible]]]]
            name = luminosity
            ignore = false

    [[[skyweather2/WSAQI]]]
        [[[[PM1.0A]]]]
            name = pm1_0
            ignore = false
        [[[[WS_PM2.5A]]]]
            name = pm2_5
            ignore = false
        [[[[WS_PM10A]]]]
            name = pm10_0
            ignore = false

    [[[Radiation]]]
        [[[[uSV]]]]
            name = signal1
            ignore = false

And here's s snip from the log Jun 17 00:37:46 weewx weewx[6128] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-06-17 00:37:42 PDT (1655451462): 'dateTime': '1655451462', 'outHumidity': '100.0', 'outTemp': '157.6', 'txBatteryStatus': '0', 'usUnits': '1', 'windSpeed': '99.380834998'

I've also got mosquitto_sub running and logging and I DO NOT see this in that log. Any idea what might be going on?

bellrichm commented 2 years ago

Hard to say with that amount of information. More log would be needed. Ideally from startup to the line you showed.

n7qnm commented 2 years ago

OK – I’ll try to find the start – there’s a LOT of debug information; although it looks like the issue I’m chasing (random high wind speeds) is actually coming out of sdr and then I see what looks like an “echo” of the sdr packet.

Does MQTTSubscribe decode and report ALL of the packets, or just one’s from subscribed messages?

Thx!

From: Rich Bell @.> Sent: Friday, June 17, 2022 1:53 PM To: bellrichm/WeeWX-MQTTSubscribe @.> Cc: n7qnm @.>; Author @.> Subject: Re: [bellrichm/WeeWX-MQTTSubscribe] Unsubscribed Topics (Issue #163)

Hard to say with that amount of information. More log would be needed. Ideally from startup to the line you showed.

— Reply to this email directly, https://github.com/bellrichm/WeeWX-MQTTSubscribe/issues/163#issuecomment-1159219652 view it on GitHub, or https://github.com/notifications/unsubscribe-auth/AGDARKMIOX3F6B7ESNMY4LLVPTQSLANCNFSM5ZC24KJQ unsubscribe. You are receiving this because you authored the thread. https://github.com/notifications/beacon/AGDARKIJEMI34H4AALKMJ3TVPTQSLA5CNFSM5ZC24KJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIUMETRA.gif Message ID: < @.> @.>

bellrichm commented 2 years ago

I think you are on the correct path. That line is the final packet, after any MQTT updates. So it would include the SDR data and any MQTT additional data. A few lines before should show the MQTT data. We could attack it from thst angle. But I am now pretty sure it is SDR...

n7qnm commented 2 years ago

Ah….so that packet is what is used to create the LOOP record?

Clay

From: Rich Bell @.> Sent: Friday, June 17, 2022 3:17 PM To: bellrichm/WeeWX-MQTTSubscribe @.> Cc: n7qnm @.>; Author @.> Subject: Re: [bellrichm/WeeWX-MQTTSubscribe] Unsubscribed Topics (Issue #163)

I think you are on the correct path. That line is the final packet, after any MQTT updates. Do it would include the SDR data and any MQTT additional data. A few lines before should show the MQTT data. We could attack it from thst angle. But I am now pretty sure it is SDR...

— Reply to this email directly, view it on GitHub https://github.com/bellrichm/WeeWX-MQTTSubscribe/issues/163#issuecomment-1159273150 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDARKKUBGNMBT7KMJYTVCDVPT2MHANCNFSM5ZC24KJQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AGDARKIWO2DYTBZRGWPYHRTVPT2MHA5CNFSM5ZC24KJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIUMRVPQ.gif Message ID: @. @.> >

bellrichm commented 2 years ago

I think WeeWX uses the terminology ‘loop packet’ and ‘archive record’. Packets are accumulated/aggregated into archive records. If you think it is not MQTTSubscribe, you can disable it by setting enable = false in its section. This will certainly reduce the log messages :)

bellrichm commented 2 years ago

A bit before Jun 17 00:37:46 weewx weewx[6128] DEBUG user.MQTTSubscribe: (Service) data-> final packet is 2022-06-17 00:37:42 PDT ([1655451462](tel:1655451462)): 'dateTime': '[1655451462](tel:1655451462)', 'outHumidity': '100.0', 'outTemp': '157.6', 'txBatteryStatus': '0', 'usUnits': '1', 'windSpeed': '99.380834998', you should see a line starting with Packet prior to update is. This the packet before MQTTSubscribe augments it. So yes, it ‘touches’ all packets, but if there is no data it essentially flows through untouched.

n7qnm commented 2 years ago

Thanks! Some great insight here –

I’m pretty sure now that it’s SDR; but I have to find what/how. I went back and just started collecting raw data from RTL and as of now, there’s NOTHING anomalous in there

If you want to close this issue, feel free.

Clay

From: Rich Bell @.> Sent: Friday, June 17, 2022 4:44 PM To: bellrichm/WeeWX-MQTTSubscribe @.> Cc: n7qnm @.>; Author @.> Subject: Re: [bellrichm/WeeWX-MQTTSubscribe] Unsubscribed Topics (Issue #163)

I think WeeWX uses the terminology ‘loop packet’ and ‘archive record’. Packets are accumulated/aggregated into archive records. If you think it is not MQTTSubscribe, you can disable it by setting enable = false in its section. This will certainly reduce the log messages :)

— Reply to this email directly, view it on GitHub https://github.com/bellrichm/WeeWX-MQTTSubscribe/issues/163#issuecomment-1159306040 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AGDARKI43SC2OWXMYCU3MMLVPUEVLANCNFSM5ZC24KJQ . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AGDARKN3BIHKQCR3J465PUDVPUEVLA5CNFSM5ZC24KJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOIUMZWOA.gif Message ID: @. @.> >

bellrichm commented 2 years ago

Closing since it appears to not be MQTTSubscribe. If you have any other questions/challenges, feel free to open a new issue or start a discussion topic.