MQTT User authentication
Closed this issue · 2 comments
Describe the bug
I can only get Belchertown to work if I "allow anonymous" in mosquitto.conf. When I add a username and password and disable anonymous, it immediately fails to connect.
For the purposes of debugging, I've added user: belcherdebug pass: debugme to the mosquitto broker @ mqtt.sethratner.com:443 (websockets). This account works fine using an MQTT client
Link to your website (IMPORTANT)
wx.sethratner.com
Version of the skin you're using
1.2
To Reproduce
Steps to reproduce the behavior:
- Go to 'wx.sethratner.com'
- Look for MQTT connection
- See error
Expected behavior
MQTT should connect using user name and password in weewx.conf/skin.conf
Screenshots
None
Device Information (please complete the following information):
- Device: RPi Zero W
- OS: Raspberry Pi OS
- Browser: Chrome on Desktop and Laptop
Ok, #499 actually addressed this, and it was merged. But when I looked at my belchertown.js.tmpl in /etc/weewx/skins/belchertown/js it did not have the merged if
statement that solves the issue.
I only installed Belchertown yesterday, so I'm not sure how I didn't have that commit, but when I added the code into my tmpl file and reset everything, it works... so... I dunno.
Ok, I realized I was using 1.2 instead of the master branch. Resolved.