Connecting with Tasmota/ESPURNA and Mosquitto Bridge


Hi is so nice that im surprised the community is empty.
This looks like the best option for replacing china sonoff service.

But i tried with many configurations and still cant make it working.
Are there any logs for gbridge? mosquito is connecting but its not working in google home.


Even when i dont use mosquitto and connect using plain mode. No action when using google home. Ofcourse always after “sync my devices”


Thanks for sending your user id and moving this thread to the forum!

I’ve checked the logs, however there were now obvious issues in the last five hours.

Please try subscribing to the MQTT topics, either with
mosquitto_sub -h localhost -d -v -t gBridge/# when using your local bridge or
mosquitto_sub -u gbridge-uXYZ --pw 'your-password' -p 8883 --capath /etc/ssl/certs -t gBridge/# -d -v -h (direct). This will show whether it is an communication issue or a problem with the Tasmota conf.


Done this and this the output

end maybe it seems to me but when i click light in google home the messages shows in (mosquitto_sub -h localhost -d -v -t gBridge/#) window


Think I got it, thanks for the last image. Don’t know why I haven’t seen that earlier.

There is a problem with your Mosquitto bridge conf. Two problems there:

  1. The lines
    topic cmnd/# in 0 {local_prefix}/ gBridge/u{userid}/
    topic stat/# out 0 {local_prefix}/ gBridge/u{userid}/
    are commented out (a hash is before those lines). They are not applied.

  2. The lines from 1 only work for the default tasmota config. You’ve entered a custom “full topic” in your sonoff, so you’d need to bridge topics like that:
    topic gBridge/u{uid}/cmnd/+/power both 0 "" ""
    topic gBridge/u{uid}/stat/+/POWER both 0 "" ""

Another problem: The tasmota firmware requires you to use lowercase power for the Action topic and uppercase POWER for the status topic. I’ve checked your devices in the database, you are using POWER (uppercase) for both.

Sorry if the documentation is not clear at those points, we’ll improve some parts (especially those for integration) soon.


Yes Yes Yes :slight_smile: Now everything working like a charm . And it’s working waaay better than openhab2 cloud. Thanks. And I wish you this project to be more popular :slight_smile:

So for others making Tasmota working with Mosquitto more clearly .

  1. Install Mosquito newest version:

  2. Edit /etc/mosquitto/mosquitto.conf adding at the end:

connection gbridge-io
bridge_attempt_unsubscribe true
bridge_protocol_version mqttv311
cleansession true
remote_username {gbridge-mqtt-username}
remote_password {gbridge-mqtt-password}
remote_clientid gbridge-u{userid}-{randomstring}
topic gBridge/u{uid}/cmnd/+/power both 0 "" ""
topic gBridge/u{uid}/stat/+/POWER both 0 "" ""
bridge_capath /etc/ssl/certs/
bridge_tls_version tlsv1.2
  1. Configure Tasmota MQTT settings

  2. Add Device on

Edited by Administrator on 01-29-2019: Adapted config for new MQTT server (


Awesome! Thanks for the hints, I’ll consider them when updating the docs.


@Paddy Is your problem resolved now?


Thank you very much @kaju666 !

I could not get the bridge working, with your screenshots I managed to get it working perfectly !

@peter it would be great to update the page with the correct configurations :slight_smile:


Honestly, I don’t See what the problem with the documentation is…

It just works, as well as this guide. The only difference is that the guide in the docs uses default Sonoff settings, while this one modifies them to directly match gBridge topics.

Could you give me a hint there?


@peter the issue was the configuration to bridge mqtt messages to the tasmota module.

Mqtt messages from your server arrive successfully on my mosquitto server, I see them in the logs, but aren’t forwarded to my tasmota module.


So i changed in my house from Tasmota to ESPURNA becouse of low stability of mqtt conection

This is working config for ESPURNA:

  1. /etc/mosquitto/mosquitto.conf

    connection kappelt-gbridge
    bridge_attempt_unsubscribe true
    bridge_protocol_version mqttv31
    cleansession true
    remote_username {gbridge-mqtt-username}
    remote_password {gbridge-mqtt-password}
    remote_clientid gbridge-u{userid}-{randomstring}
    topic gBridge/u{uid}/+/relay/0/set both 0 "" ""
    topic gBridge/u{uid}/+/status both 0 "" ""
    #you might need to change the path of the CA files
    #This one is valid for most Debian based systems
    bridge_capath /etc/ssl/certs/
    bridge_tls_version tlsv1.2
  2. ESPURNA Config MQTT

  1. Config


Yes, sorry. I just had a typo :sweat_smile: