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

🐛 [Samba NAS] Manual MQTT configuration don't work with mqtt_nexgen_entities #206

Closed
lp55 opened this issue Jan 26, 2024 · 4 comments
Closed

Comments

@lp55
Copy link

lp55 commented Jan 26, 2024

Addon

SambaNAS

Description

Hi,

I tried enabling the mqtt (mqtt_enable) option with the ip/user/password to connect to my (offical) mosquitto addon. I use it for other things, so I know it's working. It doesn't seem to be able to authenticate with the mosquitto server and causes the samba nas addon to fail to initializate. The only thing that I can think that's different is that the username has an accent (nevermind, tried with another user and got the same error).

Reproduction steps

1. Ser enable_smart, mqtt_nexgen_entities and mqtt_enable to true, and set mqtt_host, mqtt_username and mqtt_password to correct values
2. Start addon
3. Check logs
4. See error

Addon Logs

From Samba Nas:

s6-rc: info: service cifs-supervisor-mount successfully started
s6-rc: info: service mqtt-disk-handler: starting
s6-rc: info: service mqtt-disk-handler successfully started
s6-rc: info: service mqtt-handler: starting
s6-rc: info: service mqtt-handler successfully started
s6-rc: info: service legacy-services: starting
[11:15:33] INFO: Starting the MQTT daemon for partitions info...
s6-rc: info: service legacy-services successfully started
[11:15:33] INFO: New MQTT integration
Traceback (most recent call last):
  File "/usr/local/bin/mqtt_daemon.py", line 18, in <module>
    from ha_mqtt_discoverable import Settings, DeviceInfo
  File "/usr/lib/python3.11/site-packages/ha_mqtt_discoverable/__init__.py", line 470, in <module>
    class DeviceInfo(BaseModel):
  File "pydantic/main.py", line 186, in pydantic.main.ModelMetaclass.__new__
TypeError: Argument 'bases' has incorrect type (expected list, got tuple)
[11:15:34] WARNING: mqtt-handler crashed, halting add-on
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-smartd: stopping
s6-rc: info: service mqtt-handler: stopping
s6-rc: info: service hd-idle: stopping
s6-rc: info: service avahi: stopping
s6-rc: info: service init-smartd successfully stopped
Got SIGTERM, quitting.

From Mosquitto (log from a few tries):

2024-01-26 11:09:48: New connection from 172.30.32.1:44574 on port 1883.
error: received null username or password for unpwd check
2024-01-26 11:09:48: Client auto-34BBB44E-0D5F-D9D5-3C27-A7284131D8A8 disconnected, not authorised.
2024-01-26 11:10:14: Saving in-memory database to /data//mosquitto.db.
2024-01-26 11:11:45: New connection from 172.30.32.2:46680 on port 1883.
2024-01-26 11:11:45: Client <unknown> closed its connection.
2024-01-26 11:13:45: New connection from 172.30.32.2:59118 on port 1883.
2024-01-26 11:13:45: Client <unknown> closed its connection.

Addon Config

workgroup: WORKGROUP
username: ****
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
  - 169.254.0.0/16
  - fe80::/10
  - fc00::/7
automount: true
moredisks:
  - /dev/sdb1
mountoptions:
  - nosuid
  - relatime
  - noexec
available_disks_log: true
medialibrary:
  enable: true
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - icon?
  - .Trashes
compatibility_mode: false
recyle_bin_enabled: false
wsdd2: false
mqtt_nexgen_entities: true
autodiscovery: {}
other_users: []
acl: []
interfaces: []
mqtt_use_legacy_entities: false
password:  ****
enable_smart: true
mqtt_enable: true
mqtt_host:  ****
mqtt_username:  ****
mqtt_password:  ****

Architecture

amd64

OS

HaOS

@lp55 lp55 added the bug Something isn't working label Jan 26, 2024
@dianlight
Copy link
Owner

I will check.

As workaround you don't need to set host/user and password if you use the mosquitto add-on

@dianlight dianlight added workaround Found a workaround [ SambaNas ] labels Jan 26, 2024
@dianlight dianlight changed the title 🐛 [Samba NAS] <title> 🐛 [Samba NAS] Manual MQTT configuration don't work with mqtt_nexgen_entities Jan 26, 2024
@dimmuboy
Copy link

dimmuboy commented Feb 1, 2024

Same to me. I'm using EMQX in LXC container.

@dianlight
Copy link
Owner

Fixed in 12.2.0-nas2.beta68 Beta Repository

Copy link

github-actions bot commented Apr 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 11, 2024
@dianlight dianlight reopened this Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants