Error when change config to use Custom directory

Hi there,

I want to setup the Mosquitto Add-on as an Bridge.

but when is change

customize:
  active: false
  folder: mosquitto

to this

customize:
  active: true
  folder: mosquitto

the Addon does start but gives me some errors

here is my log:

Error: Unable to open include_dir '/share/mosquitto'.
Error found at line /etc/mosquitto/mosquitto.conf:33. 
[09:12:35] INFO: Successfully send discovery information to Home Assistant.
[09:12:35] INFO: Successfully send service information to the Supervisor.

the Problem is that i dont have an /etc/mosquitto/mosquitto.conf to lock up for the Error.

The /etc/mosquitto/mosquitto.conf is the configuration you set in the HA addon configuration page.
What is not there is the /share/mosquitto, which you enabled on the configuration page by setting active: to true.

Okay. Thanks for your quick response but according to the documentation for setting up mosquitto as a bridge I have to change it to “true” and create another conf file in the mosquitto directory. So why is there an error?

Ps: my mosquitto.conf file doesn’t have line 33 it only has 9

logins:
  - username: ****
    password: ****
require_certificate: false
certfile: fullchain.pem
keyfile: privkey.pem
customize:
  active: true
  folder: mosquitto

When you set active: to true you tell Mosquitto to look for additional config files in the /share/<folder:>
In your case /share/<folder:> would be /share/mosquitto, which probably do not exist, but then you need to make it and place your config files there.

Yeah, thats what I thought.

Im on Hassio so my folder structure looks like /share/hassio/share/mosquitto/
And with that I have 2 Options

  1. Place the necessary files in /share/mosquitto/
  2. Point to the Path in config "folder: /share/hassio/share/mosquitto/

neither off this ways works as it should in the Logs there is always the same Error

Does the configuration file you have end on .conf?

Sure.

connection hisensetv
address ***.***.***.***:36669
username hisenseservice
password  multimqttservice
clientid HomeAssistant
bridge_tls_version tlsv1.2
bridge_cafile hisense.crt
bridge_certfile rcm_certchain_pem.cer
bridge_keyfile rcm_pem_privkey.pkcs8
bridge_insecure true
start_type automatic
try_private true
topic /remoteapp/# both 0 hisense ""

And it’s located in /usr/share/hassio/share/mosquitto?

Yes, it is.

So, whats next? there must be an issue. Did i do Anything wrong?

Try to raise an issue on the GitHub link I posted earlier.

1 Like

Okay i try it. From your Point of few everything is done right?

I read that GitHub page and it seems to follow the guidelines.

I solved it. I misplaced the files in /usr/share/mosquitto/… Instead of /share/mosquitto/

Great!
As long as there is a solution, then nothing was wasted