paho-mqtt 1.6.1 Still Required for WeeWX 5.x?

259 views
Skip to first unread message

gary....@gmail.com

unread,
Oct 1, 2024, 9:23:47 PM10/1/24
to weewx-user
There was an issue with paho-mqtt that needed version 1.6.1 installed as a workaround.
I've lost track of the issue and would like to know if this workaround is still needed.
Thanks

vince

unread,
Oct 1, 2024, 10:05:46 PM10/1/24
to weewx-user
weewx itself does not require paho-mqtt at all, although some extensions of course do require that library.

A quick search says there were breaking changes in paho-mqtt 2.0.0 which came out in January but these were reportedly fixed in the default config in 2.1.0 according to a followup in https://stackoverflow.com/questions/77984857/paho-mqtt-unsupported-callback-api-version-error if you want to do the reading.

You can certainly pin your setup to 1.6.1 if you want to do so and if you're running a pip installation.   Looks like 1.6.1 is the current version for raspi os if you use their dpkg.

You'd have to find whatever 'issue' you are thinking of for folks to answer yes/no on whatever question you can't remember.  Or give it a try and let us all know !

gary....@gmail.com

unread,
Oct 1, 2024, 10:51:20 PM10/1/24
to weewx-user
Yeah, I read the stackoverflow thread and it doesn't suggest that the issue was fixed. The breaking changes are still there, just a workaround for developers. Or so it seems. Perhaps the extension in question is a limited circumstance.
I'll give it a try and report back. I'm doing a favor install for a friend who requires SDR and a BMP for pressure. For this install, I'll just stay with 1.6.1

Update 2024-05

Version 2.1 has now been released. This now defaults to CallbackAPIVersion.VERSION1 which will, in limited circumstances, mean old code still runs. This will not help if you pass positional parameters to client (e.g. mqtt.Client("thisIsMyClientID")) and specifying a callback version is recommended to avoid future confusion (because this has an impact on the parameters passed to callbacks

tarob...@gmail.com

unread,
Oct 15, 2024, 9:20:00 AM10/15/24
to weewx-user
Is it confirmed that paho-mqtt (latest is version 5.0) works with weewx-mqtt extension? Having a hard time on installing paho-mqtt version 1.6.1 on Bookworm given the externally managed environment error.

tarob...@gmail.com

unread,
Oct 15, 2024, 10:58:40 AM10/15/24
to weewx-user
Disregard. I ran apt-cache policy python3-paho-mqtt which showed version 1.6.1-1 as the latest for rpi on Bookworm.
Reply all
Reply to author
Forward
0 new messages