Guide to Connecting gBridge to Homey for Google Assistant

sigh

After a reboot (had to shut off the power while installing a dimmer) I’m now facing the exact same problem as Fire69. When I give a command to Google Home, I can see through MQTT Explorer that it shows up on the gBridge MQTT-server. That part of the connection works fine. It however doesn’t show up in the logs of the MQTT Client and consequently, nothing happens.

When I switch a device through Homey, the only thing that shows up in the Hub logs is:

20190302-21:07:18 Homie set value [Office.onoff]: true
20190302-21:07:14 Homie set value [Office.onoff]: false

That’s it, no mention of a MQTT-command being sent. And nothing shows up in the MQTT Client logs either. I’ve already tried reinstalling the client, to no avail.

I did that this afternoon, didn’t change anything. :disappointed_relieved:

Excuse me for saying this, but I’m actually glad you’re having the same problems as me! :smile:
I thought I was going crazy!

I restarted homey to see if I also got this problem and the same thing happened. So it does not work for me either.

There has to be a bug in MQTT Hub 2.1 since it has worked to reboot before.

OK… I am NOT rebooting…:joy::rofl::rofl::rofl:

2 Likes

I made some changes on the BETA branch…Is someone willing to try?

Runs fine, but doesn’t seem to help with the problem I’m facing. Nothing I do on Homey comes through in MQTT Explorer. This is what I see when I switch one of my dimmers

Hub

20190302-21:43:07 Homie set value [wc.measure_power]: 1.8
20190302-21:43:02 Homie set value [wc.measure_power]: 0.4
20190302-21:43:01 Homie set value [wc.dim]: 0.3
20190302-21:43:01 Homie set value [wc.onoff]: true

Client

20190302-21:43:01 SendMessageToTopic: {“qos”:0,“retain”:“1”,“mqttTopic”:“gbridge/u796/wc/onoff”,“mqttMessage”:“true”}
20190302-21:43:01 publish_options: {“qos”:0,“retain”:true}
20190302-21:43:01 send true on topic gbridge/u796/wc/onoff
20190302-21:43:01 SendMessageToTopic called
20190302-21:43:01 SendMessageToTopic: {“qos”:0,“retain”:“1”,“mqttTopic”:“gbridge/u796/wc/dim”,“mqttMessage”:30}
20190302-21:43:01 publish_options: {“qos”:0,“retain”:true}
20190302-21:43:01 send 30 on topic gbridge/u796/wc/dim
20190302-21:43:02 SendMessageToTopic called
20190302-21:43:02 SendMessageToTopic: {“qos”:0,“retain”:“1”,“mqttTopic”:“gbridge/u796/wc/measure-power”,“mqttMessage”:0.4}
20190302-21:43:02 publish_options: {“qos”:0,“retain”:true}
20190302-21:43:02 send 0.4 on topic gbridge/u796/wc/measure-power
20190302-21:43:07 SendMessageToTopic called
20190302-21:43:07 SendMessageToTopic: {“qos”:0,“retain”:“1”,“mqttTopic”:“gbridge/u796/wc/measure-power”,“mqttMessage”:1.8}
20190302-21:43:07 publish_options: {“qos”:0,“retain”:true}
20190302-21:43:07 send 1.8 on topic gbridge/u796/wc/measure-power

Can you guys spot anything weird? When looking in MQTT Explorer gBridge is written with a capital B, it the protocol case sensitive?

You seem to have the same problem that I have. The topic defaults to lower case but the topic is case sensitive. ie gbridge/u123 instead of gBridge/u123. I also wrote this in the MQTT Hub thread.

edit: oh you wrote that in the end of your post.

Yeah, I just turned off normalizing and added the capital B. And voila! Stuff is showing up in MQTT Explorer :slight_smile:

The only thing now is that I setup my gBridge-account when I was using the ha-branch of the Hub, through a broker, so I could have normalized names, and subscribe to gBridge instead of gbridge. Renaming the topics in gBridge to match my non-normalized device names doesn’t work, because they have spaces in them. That means I’d have to replace all spaces for underscores in my Homey devices. That’s doable, but doesn’t look very nice within the gui of the app.

Ideally, we’d be able to use capitals in the root topic and still have the device names normalized. Or would that be too ‘hacky’ @HarriedeGroot?

Maybe stuppid question. If I send a command with the homey APP I see that Gbrige Mqtt get the True/False message, but If i send a command thru the Google Home App I see getting a 1/0. What did I do wrong?

This is not wrong, it’s just a difference in how they send a boolean command.
I think that 1/0, true/false, on/off are all allowed and works.

Google Home integration should work even if they send 1/0 instead of true/false.

But nothing is happening if I switch the light on with Google Home

What are your settings in MQTT hub? Do you have “Homie convention” or “Custom”? Homie convention does not work with gBridge anymore.

Have Custom

You say that you see gBridge MQTT get true/false while Google Home sends 1 / 0.
These two commands should not be on the same topic.
Google Home should send 1/0 to
gBridge/u123/LAMPNAME/onoff/set

while homey should change the state of
gBridge/u123/LAMPNAME/onoff

Did you put the /set on the correct topic in gBridge settings? ACTION topic.

1 Like

Thanks @Camelen that was it, i set it the wrong way…

The default of gBridge is the wrong way so it’s a very easy mistake to make.

Do I need a payed account to add all my devices in Google Home?

Yes. The free account only gives you four devices.

Soo… small problem. When you turn off the normalize, gBridge gets filled up with the wrong device names => Woonkamer Klein instead of woonkamer-klein… :neutral_face:

So can you change the names now in gBridge to match