jim-easterbrook / pywws

Python software for USB Wireless WeatherStations
https://pywws.readthedocs.io/
GNU General Public License v2.0
204 stars 62 forks source link

Update for paho-mqtt >= 2.0 #117

Closed GeekyTim closed 1 month ago

GeekyTim commented 2 months ago

Allow self-certification

Currently, the paho-mqtt 2.0+ library causes pywws to fail with an error. This version fixes that error, as well as allowing self-generated certificates to be used if a TLS certificate has been set up on the MQTT broker. If using an external MQTT broker using a certificate from a cert authority, this probably won't be an issue, but if you are using TLS within your own network you might need to tell SSL not to be so tight with the certs.

GeekyTim commented 2 months ago

I know it would be better to check the version of paho the library, but it doesn't look like the version method/property has been implemented.

GeekyTim commented 2 months ago

Oh, and paho-mqtt 2+ requires Python 3.7-3.12+, so that depreciates Python 2. Not sure how to handle that at the moment. Perhaps pywws should also depreciate Python2?

jim-easterbrook commented 2 months ago

Hi Tim. I'm on holiday at the moment but will merge this and do a new release when I return.On 16 Jul 2024 22:16, Tim Richardson @.***> wrote:Allow self-certification Currently, the paho-mqtt 2.0+ library causes pywws to fail with an error. This version fixes that error, as well as allowing self-generated certificates to be used if a TLS certificate has been set up on the MQTT broker. If using an external MQTT broker using a certificate from a cert authority, this probably won't be an issue, but if you are using TLS within your own network you might need to tell SSL not to be so tight with the certs.

You can view, comment on, or merge this pull request online at:   https://github.com/jim-easterbrook/pywws/pull/117

Commit Summary 9bb5557 Update for paho-mqtt >= 2.0

File Changes (1 file)

M
src/pywws/service/mqtt.py
(40)

Patch Links: https://github.com/jim-easterbrook/pywws/pull/117.patchhttps://github.com/jim-easterbrook/pywws/pull/117.diff

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>

jim-easterbrook commented 1 month ago

Oh, and paho-mqtt 2+ requires Python 3.7-3.12+, so that depreciates Python 2. Not sure how to handle that at the moment. Perhaps pywws should also depreciate Python2?

Users who want to use mqtt will need Python 3.7 or higher, the rest of us can carry on with older versions. No problem.