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 without a username and password #18

Open
tonyhardcode opened this issue Sep 26, 2024 · 2 comments
Open

MQTT without a username and password #18

tonyhardcode opened this issue Sep 26, 2024 · 2 comments

Comments

@tonyhardcode
Copy link

My MQTT container does not have user/pass restrictions and this might be causing issues with hass-unraid.

KeyboardInterrupt
Task was destroyed but it is pending!
task: <Task pending name='Task-1' coro=<Client._resend_qos_messages() done, defined at /usr/local/lib/python3.9/site-packages/gmqtt/client.py:176> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x14d5fc1e11c0>()]>>
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<UnRAIDServer.mqtt_connect() done, defined at /app/main.py:141> exception=AttributeError("'NoneType' object has no attribute 'encode'")>
Traceback (most recent call last):
File "/app/main.py", line 153, in mqtt_connect
self.mqtt_client.set_auth_credentials(mqtt_username, mqtt_password)
File "/usr/local/lib/python3.9/site-packages/gmqtt/client.py", line 210, in set_auth_credentials
self._username = username.encode()
AttributeError: 'NoneType' object has no attribute 'encode'

I tried leaving the MQTT username and password empty in the config as well as completely removing them. Still the same issue.

@jtmoore81
Copy link

I am having the same issue. Is it possible to update to remove the username and password requirements.

@Samo27
Copy link

Samo27 commented Dec 25, 2024

I dont have username and password set on my mqtt broker. In config.yaml I just put some random text under username and password. Works like a charm.

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

3 participants