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 Username and Password switched. #10

Open
frdbonif opened this issue Sep 24, 2020 · 2 comments
Open

MQTT Username and Password switched. #10

frdbonif opened this issue Sep 24, 2020 · 2 comments

Comments

@frdbonif
Copy link

Hello,

I installed Room Assistant using the playbooks. When provisioning a Pi, the position of the mqtt password was switched with the position of the username:

Eg.:

mqttOptions:
  password: password
  username: username

This prevents the connection to the MQTT server succeeding and prevents any connection to HomeAssistant. There may well be other options that get switched that cause minor errors that I haven't noticed.

For completeness here is the relevant part of my hosts.yaml file:

      homeAssistant:
        mqttUrl: mqtt://mqtt.fjla.uk:1883
        mqttOptions:
          username: room-assistant
          password: password

I've noticed that some of the other parts that move have no effect on function but make the resulting file less readable - arguably not important as it is being managed with Ansible.

The order of the username and password shouldn't matter or the resulting YAML files placed on the host should not be reordered from how they are written in the playbook.

@mKeRix
Copy link
Owner

mKeRix commented Sep 30, 2020

I'm confused as to why this made a difference for you at all - I use exactly the same config options in ansible and don't run into this issue. Not only that, but this part of the YAML is read and passed as a complete object, so it doesn't even have a real order.

But I can look at the options of rendering YAML from ansible, the current mode isn't entirely up to my taste anyway.

@frdbonif
Copy link
Author

I was quite surprised myself when I switched the two and it suddenly started working but it is the only thing that I changed.

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