[New Addon] Samba NAS. (Mount external disk and share it )

Seem that I have found a solution myself. It was a crazy bug and reinstallation fixed the issue.

Thanks for this amazing add-on, very useful. Does you know how I can edit the the samba.conf template, to enable me to have my mounted drive name not show in capital letters please? I presume if I go into the docker container and edit it there it will just revert next time the add-on is loaded and actually needs to be done within the configuration section?


On another note, any idea why I can’t use manually configured MQTT (yaml) without it crashing? I would like to be able to limit the number of entities it produces via auto discovery, and also to be able to tweak their units/precision settings, so have set the following in the autodiscovery section of the configuration:

disable_discovery: true
disable_persistent: true

Initially this seemed to work for a while. However now I can’t run the add-on without a load of MQTT related errors, usually culminating in an add-on crash. If I set disable_persistent to true then the add-on works again, but I get all the entities back again that I don’t want via auto discovery.

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)
[14:25:08] WARNING: mqtt-handler crashed, halting add-on

I’ve tried deleting the sambanas auto discovery topics in MQTT explorer. Any suggestions please? Thanks.

Just adding a note of thanks for this Addon. Just stumbled on it today as I started to update my home LAN. Using a Pi4, I initially thought it would be a dedicated NAS project but seems like this addon with an external drive is able to meet all my needs streaming to various home media players and TV’s.

Thank you for this !

Hi, I tried using the veto file option but face an issue where all files disapear, just like in official addon Custom Samba Share? - #18 by diamant-x
Any idea if your addon could have a fix for it? Or how to hide files from specific points? Thanks.


I have the latest Home Assistant OS running on my RPi 4B with Samba NAS add on installed. I have an external SSD connected (not mounted) to my Pi 4B on a USB 3.0 port with two ext4 partition, sdb1 (filesystem) and sdb2 (main storage). I want to be able to use the sdb2 partition connected to the Pi as a Network Time Machine Backup through Samba. I was earlier able to do this when I was running Raspberry Pi OS by mounting the drive (at /home/ex and made a folder named pibackup inside which served as target folder for backup) and edited the file smb.conf file at /etc/samba/ as follows.



vfs objects = catia fruit streams_xattr

fruit:metadata = stream

fruit:model = MacSamba

fruit:posix_rename = yes

fruit:veto_appledouble = no

fruit:nfs_aces = no

fruit:wipe_intentionally_left_blank_rfork = yes

fruit:delete_empty_adfiles = yes


   comment = Home Directories
   browseable = no

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
   read only = no (previously yes)

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
   create mask = 0777 (previously 0700)

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
   directory mask = 0777 (previously 0700)

Ran the following commands to add password:

sudo smbpasswd -a pi
sudo systemctl enable smbd
sudo nano /etc/nsmb.conf

Added at the end to make it accessible directly in the file browser:

path = /home/ex/pibackup


create mask=0777

directory mask=0777


Since, I am new to Home Assistant OS, I am unable to replicate this. I have setup root SSH access using ‘HassOS SSH port 22222 Configurator’ add-on and also installed Samba NAS add-on. How do I accomplish this? Is there some smb.conf file installed by this addon that I can edit in a similar way?

Also, some instructions to create an MQTT sensor to track the sdb2 disk usage would be really appreciated!