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

mqtt with username and password #8

Open
qingz2004 opened this issue Dec 5, 2020 · 5 comments
Open

mqtt with username and password #8

qingz2004 opened this issue Dec 5, 2020 · 5 comments

Comments

@qingz2004
Copy link

The script works good for me.
Thank you for your effort.
Now I want to publish the radon data to my mqtt server.
Is there a way to connect to a mqtt server with username and password?
What is the command?

Thanks!

@marcelm
Copy link
Owner

marcelm commented Dec 5, 2020

I assume you have already found the --mqtt and --topic command-line options. There were no --username and --password options, so I just added them. Please get the newest version of the script to be able to use them. Also, I added an MQTT section to the README, please have a look.

@qingz2004
Copy link
Author

qingz2004 commented Dec 6, 2020

Is there a way to specify the port of the mqtt server? I'm using a non standard port to avoid being attached.

I installed a new mosquitto server with standard port, and no username/password, no radon message received.

Thanks!

@marcelm
Copy link
Owner

marcelm commented Dec 6, 2020

That was missing from the documentation. You need to install the paho.mqtt package into the virtual environment, so run something like env/bin/pip install paho.mqtt. I have updated the README.

Also, I added a --port argument to the script, so you can write --port 12345.

@qingz2004
Copy link
Author

qingz2004 commented Dec 6, 2020

EDIT:
It works now.
Thanks!

@marcelm
Copy link
Owner

marcelm commented Dec 6, 2020

Great to hear! I’ll close this issue now, thanks for letting me know.

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