marcelm / radonwave

Read radon levels from Airthings Wave

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

mqtt with username and password

qingz2004 opened this issue · comments

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!

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.

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!

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.

EDIT:
It works now.
Thanks!

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