# 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:** 3

<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 21, 2019, 11:49am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/41 "2019-02-21T11:49:11Z")

</div>

curious… the site says its specifically requires TLS 1.3 minimum

---

<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 21, 2019, 11:49am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/42 "2019-02-21T11:49:54Z")

</div>

Then they are crazy. TLS 1.3 has just been approved.

---

<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 21, 2019, 11:51am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/43 "2019-02-21T11:51:21Z")

</div>

I am wrong… i mixed up protocol and tls and read 3.1 backwards

this is what I read

| Server: | [mqtt.gbridge.io](http://mqtt.gbridge.io) |
| --- | --- |
| Port: | 8883 |
| MQTT Protocol: | Version 3.1.1 and 3.1 supported |
| TLS: | TLS V1.2 is required |
| Authentication: | required, as described above |

---

<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 21, 2019, 11:52am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/44 "2019-02-21T11:52:10Z")

</div>

And that is exactly what the MQTT client supports

---

<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 21, 2019, 11:52am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/45 "2019-02-21T11:52:59Z")

</div>

Ill reach out to them and check … maybe the error message is ambiguous

---

<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 21, 2019, 12:04pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/46 "2019-02-21T12:04:06Z")

</div>

Isn’t there anything in the gBridge logs?

---

<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 21, 2019, 12:15pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/47 "2019-02-21T12:15:16Z")

</div>

They arent visible

I opened a thread over there

> **[Connecting with Homey - MQTT Client App](https://community.gbridge.io/t/connecting-with-homey-mqtt-client-app/79)**
>
> I am trying to get GBRIDGE to connect with Homeys community app MQTT Client and handle the devices this way. However it wont connect. I have spoken with the dev of the app and he cant see any reason it wont connect since many other services connect...

---

<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 21, 2019, 12:20pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/48 "2019-02-21T12:20:24Z")

</div>

> <https://github.com/mqttjs/MQTT.js/issues/652>

Seems there are some comparable issues. But no solution.

---

<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 21, 2019, 12:39pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/49 "2019-02-21T12:39:16Z")

</div>

Also tried to connect to gBridge from the client and got this:

20190221-13:36:17 MQTT Reconnect  
20190221-13:36:17 Broker State: RECONNECTING  
20190221-13:36:18 MQTT Closed  
20190221-13:36:18 Broker State: DISCONNECTED

Not sure what it means but I didn’t get the same message as @KonradWalsh. Anyway I’ll probably not try this type of connection.

Edit: Could this below be the culprit? (I did use “Disable Certificate Checking”)

“The server uses certificates signed by Let’s Encrypt. This CA is trusted by most systems, your shouldn’t need to do anything more than specifying your system’s CA directory.”

I know far too little about certificates and how they work to have any insights.

---

<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 21, 2019, 1:52pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/50 "2019-02-21T13:52:24Z")

</div>

There seems to be some incompatibility in the MQTT protocol. At least that is what the error states. The MQTT library I use, states it supports MQTT 3.1, 3.1.1 and 5.0. So 3.1 and 3.1.1 matches the versions gBridge supports.

At the moment there is nothing I can do to change this.

---

<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 21, 2019, 1:53pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/51 "2019-02-21T13:53:02Z")

</div>

Really appreciate you chiming in and clarifying…

---

<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 21, 2019, 1:54pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/52 "2019-02-21T13:54:31Z")

</div>

From the MQTT specs:  
The Server does not support the level of the MQTT protocol requested by the Client.

While at work I tried to force the mqtt protocol version the client uses, but I still get that error with 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 21, 2019, 4:00pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/53 "2019-02-21T16:00:57Z")

</div>

Currently gBridge does allow basic non encrypted connection on port 1883 - and I have tried it from the Homey MQTT client but still get the unacceptable protocol message. I can connect on port 1883 from other clients but that’s not going to help.

K

---

<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 21, 2019, 4:13pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/54 "2019-02-21T16:13:54Z")

</div>

The message has nothing to do with TLS. This message is a result of an error message generated by the MQTT library that the MQTT protocol cannot be matched.

That this happens is strange because the MQTT client and gBridge support the same client versions.

If the problem is the TLS connection, there would be another error.

---

<div class="post-metadata">

**Author:** ![pkappelt](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/pkappelt/32/3750_2.png) [@pkappelt](https://community.homey.app/u/pkappelt)\
**Post date:** [February 23, 2019, 10:16am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/55 "2019-02-23T10:16:52Z")

</div>

Hi everyone,

that’s me - the head of [gBridge.io](http://gBridge.io)

sorry I haven’t seen this thread earlier. Please feel free to notify my (or my employee) using the support email about such threads if there is an issue that affects many people.

It’s hard for me to debug these problems (since I don’t have a Homey at home and don’t known anyone who got one). Is someone reading along who is located in Dresden (Germany) or Nuremberg? I’d be willing to do a “personal debug session” for a evening or so then.

By the way, where have you seen that TLS 1.3 is required? This was a typo that has appeared accidentally in some documents (and has scared a whole lot of people). I’ve thought that I’ve corrected all documents to the correct _TLS 1.2_ 🤔

Sadly, I need to keep the log files at a bear minimum (to be on the safe side regarding data privacy). Only critical errors are logged. So, of course, there’s nothing obvious in the log files for the past week. Starting a detailed trace for a single user is quite hard either on the production server.

Well, long story short, I’ve seen this problem before. Is it possible for you to define a last will topic for the connection to the gBridge mqtt server? Please try disabling this last will message (or set its topic to `gBridge/u{userid}/lastwill`.

Regards,  
Peter

---

<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, 10:24am UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/56 "2019-02-23T10:24:23Z")

</div>

Hi Peter,

I am setting a last will message (default and hard codes for now). Will try to see if disabling the last will solves the problem.

---

<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, 12:11pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/57 "2019-02-23T12:11:00Z")

</div>

Hi Peter,

Thanks for the hint regarding the LWT. Disabling the LWT results in a successful connection.

---

<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, 12:12pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/58 "2019-02-23T12:12:00Z")

</div>

This is how it should look like 🙂

20190223-13:08:49 Broker not connected, attempting connection  
20190223-13:08:49 Broker URL: mqtts://mqtt.gbridge.io:8883  
20190223-13:08:49 keepalive: 120  
20190223-13:08:49 clientID = Test  
20190223-13:08:49 rejectUnauthorized: true  
20190223-13:08:50 MQTT client connected  
20190223-13:08:50 Connected Topics:  
20190223-13:08:50 Broker State: CONNECTED  
20190223-13:08:50 sending queued messages

---

<div class="post-metadata">

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

</div>

Awesome!

There are two main problems:

- First, users are only allowed to publish/ subscribe/ do anything with topics beginning with the prefix `gBridge/u{userid}`. This includes the last will topic.
- The MQTT broker we are using (emqx cluster) has a bug: If a user tries to connect with a LWT he has no access to, the server will report back the observed “Unacceptable protocol version” (instead of something useful). This bug costed me hours of work to debug and discover - it has been reported to emqx developers. They’ve fixed it and its going to be in the next upstream version.

---

<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:15pm UTC](https://community.homey.app/t/guide-to-connecting-gbridge-to-homey-for-google-assistant/9234/60 "2019-02-23T13:15:43Z")

</div>

So if you can push this update to the client we might get this working without additional hardware (RPI)?

Awesome that you guys could take the time to debug 🙂

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

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