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

Support TLS connections to MQTT server #43

Merged
merged 2 commits into from
Mar 8, 2021

Conversation

andreasbrett
Copy link
Contributor

Added support for TLS connection to the MQTT server. Configuration through 2 settings:

  • Verify TLS connection by checking if MQTT server's certificate is signed by one of the CA certificates provided in the path MQTT_TLS_CACERTS
  • If MQTT_TLS_INSECURE is set to True server name will not be checked against host name provided in server certificate (caution, as the name suggests this is insecure! only use in non-production environments)

@lolouk44
Copy link
Owner

lolouk44 commented Mar 8, 2021

Thanks for your PR.
I've had a quick look and can't see anything that would break at first glance.
That being said I don't use TLS now, never have before either, and unfortunately don't have time to set something up for testing right now.
I can publish a beta version of the repo and docker container if you can test and feedback on the TLS side?
I'll test on the non TLS with your version.
How does that sound

@andreasbrett
Copy link
Contributor Author

Yes, I can test this end of this week (Mi Scale is still in delivery).

@lolouk44 lolouk44 merged commit 45223ba into lolouk44:master Mar 8, 2021
@lolouk44
Copy link
Owner

lolouk44 commented Mar 8, 2021

0.1.15a published.
Make sure you use the 0.1.15a tag in your docker-compose, not latest

@andreasbrett
Copy link
Contributor Author

Tested and working! I did find a bug though with the default of MQTT_DISCOVERY, I'll create a separate PR for that.

I also checked if the retain=false works and it did.
#44

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

Successfully merging this pull request may close these issues.

None yet

2 participants