Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsubscribed Topics #163

Closed
n7qnm opened this issue Jun 17, 2022 · 8 comments
Closed

Unsubscribed Topics #163

n7qnm opened this issue Jun 17, 2022 · 8 comments
Assignees

Comments

@n7qnm
Copy link

n7qnm commented Jun 17, 2022

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
Copy link
Owner

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

@n7qnm
Copy link
Author

n7qnm commented Jun 17, 2022 via email

@bellrichm
Copy link
Owner

bellrichm commented Jun 17, 2022

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
Copy link
Author

n7qnm commented Jun 17, 2022 via email

@bellrichm
Copy link
Owner

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
Copy link
Owner

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
Copy link
Author

n7qnm commented Jun 18, 2022 via email

@bellrichm
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants