Setting up using Hassio with Mosquitto Broker


I have my HA system up and running. I flashed a few Gosung outlets last night and they are working with HA. I am able to turn them on/off through HA without issue. I’m trying to figure out how to get going with gbridge. I have an account set up, as well as a test device configured. I can turn the virtual device on/off using google home, but it does nothing to the actual device. I do not believe I have made a connection between Mosquitto Broker and gbridge. I read the docs and tried watching some youtube videos and am coming up short. I can’t seem to figure out how to make the connection. Documentation refers to mosquitto.conf file, but I am not finding one and unsure how to tell it to look for one if I create it.

If anyone could get me pointed in the right direction, it would be greatly appreciated!


I just finished going through all of this. Documentation is very lacking but I eventually figured it out.
I am using so the steps might be a little different for you.
You need to be using the Mosquitto broker, not the built in one. If you have, just go to the add-on store and add it.
Then in the Config, make sure the customize section looks like this

“customize”: {
“active”: true,
“folder”: “mosquitto”

Then (I am using open up the Configurator and click the left arrow beside config/ to go up a directory level, scroll down to share and select it. You should have another folder called mosquitto, select it. Now make a new file called anything ending in .conf. I called mine mosquitto.conf.

Put this in it, and update your user name/password and topics

connection gbridge
remote_username gbridge-u777
remote_password PASSWORDHERE

topic # in 0 “” gBridge/u777/
topic stat/# out 0 “” gBridge/u777/

bridge_attempt_unsubscribe true

bridge_protocol_version mqttv31

bridge_insecure false
bridge_capath /etc/ssl/certs
bridge_tls_version tlsv1.2

start_type automatic
try_private true
cleansession true
notifications false

Let me know if you need more help.


Thanks for the help! I finally have it working!!!

After your help, it still wasn’t working and eventually I found that in the Mosquitto Broker, I had specified a username/pwd and that was breaking it. I set it back to default, changed the customize active to true, saved and restarted and now it is working. The whole problem I was having was not changing customize active to true and putting the mosquitto.conf in /share/mosquitto.


try adding

log_type all

to your config to see if it logs any more information. I needed this part to figure out the topic remapping info and how I had the topics set in my tasmota switches.

I also added my gbridge username and password as a user in HA. I am not sure if that was required or not but I did it.
I am by no means an expert but it looks like it is connecting as I also have the same sort of info in my log

1552410781: Connecting bridge gbridge (
1552410781: Socket error on client local.core-mosquitto.gbridge, disconnecting.
1552410794: |-- mosquitto_auth_acl_check(..., client id not available, mqttuser1, Piano/tele/STATE, MOSQ_ACL_WRITE)
1552410794: |-- url=
1552410794: |-- data=username=mqttuser1&password=&topic=&acc=-1&clientid=
1552410794: |-- aclcheck(mqttuser1, Piano/tele/STATE, 2) SUPERUSER=Y by http
1552410794: |--  Cached  [48E9F74D6175F6D459CBC20B922EE72C9CA025D1] for (client id not available,mqttuser1,2)
1552410794: |-- mosquitto_auth_acl_check(..., client id not available, homeassistant, Piano/tele/STATE, MOSQ_ACL_READ)
1552410794: |-- url=
1552410794: |-- data=username=homeassistant&password=&topic=&acc=-1&clientid=
1552410794: |-- aclcheck(homeassistant, Piano/tele/STATE, 1) SUPERUSER=Y by http
1552410794: |--  Cached  [C0D0C574CAD381CCE6ECE60EFA4D43027289FA06] for (client id not available,homeassistant,1)


See above. I edited my post, but was too slow :slight_smile:

It is working great now. You may not think you are that good, but you saved my butt!!!


So, I have another small trouble you may be able to assist with… When I reboot my, the switches retain their on or off status, but when I look at them in, they all show off, until I change the state of them. It is like it isn’t polling them for status.


I also had the issue of not setting active to true. I missed it the first few times I looked at it.

Take a look at this video. It might be the retain flag.


See…you are a GOD!

Works like a charm now!


haha. Your just lucky I went through all of this 2 weeks ago, hunting and pecking.


Now I have a sonoff 4ch pro I want to flash…apparently the easy way to flash doesn’t apply to this device, so I’m going to have to crack the case open on it :frowning: and try to do it the hard way.

Thanks again for all your help!


Good luck and watch the ground pin :wink:


Hi - I’m a bit curious: What made you choose gBridge for your Hass instance?

I know they have an own plugin for Google Assistant available (, so I haven’t put any effort in targeting users of Home-Assistant (and providing documentation, examples or alike)


With Hass, the Google Assistant plugin requires you to create your own Google Actions application that you then create a Simulator Test version of. This test version expires after a while and you need to redo it.
Also at the exact time I looked into creating it there was an issue with Actions on Google and it wouldn’t let you create a simulator test version. The instructions for Hass were not that clear with some of the steps and when I already had a few other Google Test apps it was getting confusing.

gBridge was a lot more straight forward once I understood how to do the topic remapping that I needed for my other switches. Steps for gBridge are add the device and set your topics, create a config file which is basically the same for everyone, add Kappelt gBridge to google home.