I’ve a bit trouble to introduce my wall box openWB into HA. For the first mosquitto runs flawlessly and I can look at HA by mqtt-Explorer.
The mosquitto yaml looks like:
logins:
require_certificate: false
certfile: full chain.pm
keyfile: privkey.pem
customize:
active: false
folder: mosquitto
However if I change the mosquitto configuration from active: false into active: true. the Mosquitto stops and there is no more access to HA by mqtt-Explorer.
I have to change to “active: true”, because I have to apply the access to the wallbox. I’ve prepared an file in the folder
/home assistant/share/mosquitto/mosquitto.conf, which is:
connection openwb
address 192.168.nn.nn:1883
start_type automatic
topic openWB/#
local_clientid openwb.mosquitto
try_private false
clean session true
When restarting Mosquitto I get the log file info:
1742990286: Error: Unable to open include_dir ‘/share/mosquitto’.
1742990286: Error found at /etc/mosquitto/mosquitto.conf:43.
[11:58:06] WARNING: Halt add-on
I’m totally confused. Why HA can’t open “dir share/mosquitto” and what about the error in the next line .
When I check the dir /etc by the SSH-Terminal I don’t see neither a directory “mosquitto” nor a file “mosquitto.conf”. Where is it, because HA obviously sees /etc/mosquitto/mosquitto.conf
I’ll be totally happy if anybody can help me in that issue.
thx Adi
I prepared the conf-file by the entries of ‘username’ and ‘password’, but I couldn’t save the file after change:
logins:
username: xyzzy
password: 12345
I got an error message
Fehler beim Speichern der Add-on Konfiguration, Invalid list for option ‘logins’ in Mosquitto broker (core_mosquitto). Got {‘logins’: {‘username’: ‘xyzzy’, ‘password’: ‘12345’}, ‘require_certificate’: False, ‘certfile’: ‘full chain.pm’, ‘keyfile’: ‘privkey.pem’, ‘customize’: {‘active’: True, ‘folder’: ‘mosquitto’}}
Sorry I’ not very familiar to prepare code informations. To avoid another understanding. I append some screenshots.
My username and password have been entried in another menu. If I put username and entry into YAML-file I receive an error message like this(red marked):
Have a look onto the <code> active: true <code>.
I need this to lead mosquitto to the customized mosquitto.conf file.
With <code> active: false <code> I have mqtt-access to Home Assistant by mqtt-Explorer
With <code> active: true <code> I have no more access and server has disconnected
Please have a look at the error message. I’ve no idea why HA can’t include directory share/mosquitto.
The second error message points at /etc/share/mosquitto. I’ve checked the directory /etc by ssh-terminal, but couldn’t find neither mosquitto folder nor mosquitto.conf file.
Hope you have an idea to bring light into darkness.
Thx Adi
Your config should go just i one config file and that is the one you can edit in addon. I don’t know why you have some “special” file. If you don’t use docker and you probably don’t then your config should be placed in addon editor.
You should also remove any special config files you made.
Thx a lot. I followed an instruction that seemed to work at least for that author.
For file editing I use the add-on “file editor”. What about docker. I’m just a beginner of Home Assistant. How can I install and use it? Do I have access to HACS in a docker container?
In the file-editor I only see configuration.yaml no else config file. Referring to my error message when starting Mosquitto I wonder in which file I have to specify the directory /share/mosquitto in any configuration file, to avoid the message
1743005055: Error: Unable to open include_dir '/share/mosquitto'.
1743005055: Error found at /etc/mosquitto/mosquitto.conf:43.
[16:04:15] WARNING: Halt add-on
You recommend to delete any customer config file.
If I set customizing.active=false Mosquitto works fine.
My issue is that I want to establish an integration that integrates a lot of sensors in my electric wall box into Home assistant. It seems that I must customize Mosquitto in order to proceed that.
.
Well don’t jump into conclusion. All you see on the net doesn’t have to be truth.
First set up mqtt addon. Use addon built in editor for mqtt config.
If you are able to get it work then set up mqtt integration.
Leave docker alone for a while.
My problem has been solved. I’m so sorry to bother you. My issue has been to place the mosquitto.conf file in a wrong folder.
I’ve been mistaken by using the addon ‘file-editor’. Thus I’ve not been able to change into the root directory. Mosquitto couldn’t open the customized mosquitto.conf.
SSH -Terminal has been much better for editing file.