CloudMQTT - Mosquitto - bridge

I am trying to bridge Cloudmqtt with my Mosquitto add-on but Mosquitto fails to even load the config file, giving the following error.

starting version 3.2.2
Error: Unable to open include_dir '/share/mosquitto'.
Error found at /etc/mosquitto.conf:19.
Error: Unable to open configuration file.

Can anyone suggest a reason why it can’t open the include directory?

I have searched the forums and it seems to work for others - it really must be something very simple.

My Mosquitto config is:

{
  "plain": true,
  "ssl": false,
  "anonymous": false,
  "logins": [
    {
      "username": "xxxx",
      "password": "xxxx"
    },
  ],
  "customize": {
    "active": true,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem"
}

And my .conf file is in this directory structure

image

Thanks.

Your screenshot looks like you’ve created a folder named share inside your config folder.
Using hass.io’s Samba add-on you can configure the mapping of share, making it available like you did it with config:

{
  ...
  "map": {
    "config": true,
    ...
    "share": true,
    ...
  },
  ...
}

Put the folder and the config file(s) there and it should work :slight_smile:

I read your reply smacked my forehead, was about to thank you profusely and tell what a genius you were as well as apologise for being a dummy.

But… I went to make that change to my Samba add-on and guess what?

  "map": {
    "config": true,
    "addons": true,
    "ssl": false,
    "share": true,
    "backup": true

I believe this is the default as it was installed.
Now, I’ve just thought… Samba is (of course :slight_smile:) password protected. Does Mosquitto somehow need to know that password? (Sorry if that is a dumb question).

Let’s assume your hass.io’s ip is 192.168.0.111 making your config folder available using \\192.168.0.111\config. Now, instead of \config your have to use \share to connect to the correct place to put your mosquitto folder and config file(s) under…

Thanks but I though that was what I had done?

Windows Explorer >
image

No, you are using \\192.168.1.27\config\share but you have to use \\192.168.1.27\share.

The Samba add-on provides multiple shares. With the config you’ve posted above you can access:

  • \\192.168.1.27\config
  • \\192.168.1.27\addons
  • \\192.168.1.27\share
  • \\192.168.1.27\backup

Edit: You can also navigate to \\192.168.1.27\ in Windows Explorer to see all the available shared folders.

1 Like

What can I say?
Thank you so much for the answer and your patience.

I had (wrongly) assumed that everything to do with hassio was in the config folder, I never even considered looking higher up the tree!

Once again thank you very much, I’ve learned something more than just how to bridge Mosquitto!!

1 Like