# Guide to Connecting gBridge to Homey for Google Assistant

**URL:** <https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234>\
**Category:** Devices\
**Created:** [February 15, 2019, 3:04pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234 "2019-02-15T15:04:24Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 1:17pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/61 "2019-02-23T13:17:22Z")

</div>

Well need to make the LWT optional, so need to add do some settings first before i can publish it

---

<div class="post-metadata">

**Author:** ![Camelen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/camelen/32/9613_2.png) [@Camelen](https://community.homey.app/u/Camelen)\
**Post date:** [February 23, 2019, 1:19pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/62 "2019-02-23T13:19:38Z")

</div>

No rush 🙂

What does Lastwill do?  
Is there any harm to disable it?

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 1:21pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/63 "2019-02-23T13:21:40Z")

</div>

LWT = Last Will and Testament

Its a predefined topic + message that is published when a client looses connection.  
And disabling it, does not harm anything.

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 2:12pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/64 "2019-02-23T14:12:04Z")

</div>

Uploaded for approval.

---

<div class="post-metadata">

**Author:** ![KonradWalsh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/konradwalsh/32/147_2.png) [@KonradWalsh](https://community.homey.app/u/KonradWalsh)\
**Post date:** [February 23, 2019, 2:30pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/65 "2019-02-23T14:30:09Z")

</div>

Well done… That was fast

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 23, 2019, 2:57pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/66 "2019-02-23T14:57:05Z")

</div>

@scanno

Is there a way to connect to two different brokers simultaneously with your client - one for use in flows and one for MQTT-Hub or will I have to install the ‘other’ client app, or bridge brokers?

Could I install it twice with a rename - via CLI or will that confuse the MQTT-Hub usage?

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 3:02pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/67 "2019-02-23T15:02:11Z")

</div>

At the moment there is no way (besides renaming the client and cli install it i guess) to connect to multiple brokers. Ofc that is something that can be added if the nodejs lib can support that.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 23, 2019, 3:03pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/68 "2019-02-23T15:03:46Z")

</div>

It was just a thought - maybe bridging is actually going to work out better as I don’t want to load Homey unduly.

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 3:10pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/69 "2019-02-23T15:10:15Z")

</div>

Well it is possible i guess, but i would need to create another broker connection instance. But this is not something i can do on a short time.

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 3:41pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/70 "2019-02-23T15:41:24Z")

</div>

Just did a little test…  
Got two connections running to different brokers… So its possible…  
But the logic behind this (like settings, setting topics) is a bit more work…

---

<div class="post-metadata">

**Author:** ![scanno](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/scanno/32/8358_2.png) [@scanno](https://community.homey.app/u/scanno)\
**Post date:** [February 23, 2019, 3:45pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/71 "2019-02-23T15:45:26Z")

</div>

What is exactly needed for gBridge?

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 23, 2019, 4:04pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/72 "2019-02-23T16:04:59Z")

</div>

I’m new to gBridge but they offer a hosted MQTT broker which then precludes you using a local one for something else e.g. flows via your client (there are other options though) . To connect to gBridge is pretty easy - you preface the topics with your username `gbridge/username/#` as you can’t subscribe to root. So supporting that directly as a broker doesn’t need much config at all, and topic is fixed.

However I think the posts above suggest a workaround within MQTT-Hub which would preclude you using MQTT-Hub for its normal role (homie3) so that might not suit me. I’m thinking it might need Harrie to support gBridge specifically if you also want to use homie3. Not given any thought to if that is something sensible to do.

At the moment I use flows through your app alongside MQTT-Hub with homie3 so to add gBridge an MQTT bridge to local server might be the best way forward or a full local hosted gBridge.

You have the additional complexity of Homey apps using your client via API and thus need a way for them to define a broker (and maybe topics).

I can see from an ease of use perspective people liking a plug and play gBridge solution as this allows them to use Google Assistant or a Google Home Hub screen to control Athom devices, but I have other ways to achieve this so it’s not a request as such.

Let me play some more and I’ll post back…

---

<div class="post-metadata">

**Author:** ![KonradWalsh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/konradwalsh/32/147_2.png) [@KonradWalsh](https://community.homey.app/u/KonradWalsh)\
**Post date:** [February 23, 2019, 5:28pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/73 "2019-02-23T17:28:15Z")

</div>

Sent you a small donation

---

<div class="post-metadata">

**Author:** ![Camelen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/camelen/32/9613_2.png) [@Camelen](https://community.homey.app/u/Camelen)\
**Post date:** [February 23, 2019, 6:48pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/74 "2019-02-23T18:48:22Z")

</div>

If you use mosquitto you can then bridge it to gBridge. That’s what I’m doing now and it works perfectly. The change in MQTT Hub is to make brightness go from 0.0-1.0 to 0-100 which from what I understand do not break homie 3.0 since it is not specified in the convention.

From what I can tell what you want is already possible.

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 23, 2019, 7:15pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/75 "2019-02-23T19:15:58Z")

</div>

Yes, I too have bridged my brokers and it works well. The absence of 0-100 dim was a problem for my HomeAssistant integration so having that helps too. homie3 doesn’t specify this but It’s the change of the homie root topic name and the next sub level names that I was more concerned about. But bridging the brokers suits me better I think anyway.

K

---

<div class="post-metadata">

**Author:** ![Camelen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/camelen/32/9613_2.png) [@Camelen](https://community.homey.app/u/Camelen)\
**Post date:** [February 23, 2019, 7:25pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/76 "2019-02-23T19:25:54Z")

</div>

Ah ok. Didn’t realize that the names of those topics were non-optional.

---

<div class="post-metadata">

**Author:** ![KonradWalsh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/konradwalsh/32/147_2.png) [@KonradWalsh](https://community.homey.app/u/KonradWalsh)\
**Post date:** [February 25, 2019, 3:32pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/77 "2019-02-25T15:32:58Z")

</div>

Moving conversation back here as it was muddying up the MQTT Hub Thread

so I did this in **GBridge**

_Light: Window Lights_  
Features and MQTT-Topics:  
**On and Off**  
gBridge/u\*\*\*/window-light/onoff  
gBridge/u\*\*\*/window-light/onoff/set

**Brightness**  
gBridge/u\*\*\*/window-light/brightness  
gBridge/u\*\*\*/window-light/brightness/set

* * *

**in MQTT Hub I have**

COMMUNICATION PROTOCOL - Custom  
ROOT TOPIC = gbridge  
Device ID = my u\*\*\* id from gBridge  
Include Class and Include Zone unticked or off

I hit the switch in Homey and it doesnt replicate to gBridge

When the light state in gBridge… should I see the log entry in MQTT Hub?.. seems I should…

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 25, 2019, 3:42pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/78 "2019-02-25T15:42:11Z")

</div>

> [@KonradWalsh](#):
>
> ROOT TOPIC = gbridge

The root topic needs to be gBridge

I think the protocol should still be Homie Convention v3.0.1 (but will work with custom as long as you don’t include class or zone options)

---

<div class="post-metadata">

**Author:** ![KonradWalsh](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/konradwalsh/32/147_2.png) [@KonradWalsh](https://community.homey.app/u/KonradWalsh)\
**Post date:** [February 25, 2019, 3:45pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/79 "2019-02-25T15:45:42Z")

</div>

arrghh, SORRY!  
So stupid!

Yes that was what was wrong

Thanks!

---

<div class="post-metadata">

**Author:** ![xAPPO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/xappo/32/13726_2.png) [@xAPPO](https://community.homey.app/u/xAPPO)\
**Post date:** [February 25, 2019, 3:46pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/80 "2019-02-25T15:46:25Z")

</div>

Glad you’re up and running

[Previous page](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234.md?page=3)

[Next page](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234.md?page=5)
