Guide to Connecting gBridge to Homey for Google Assistant

And ‘brightness’ needs to be ‘dim’

1 Like

Good spot - also make sure you’re using int(0…100) for percentage format

first thing ive noticed is the gBridge sets ONOFF using 0 or 1… MQTT uses true or false

Looks like gBridge may accept different values - but MQTT-Hub might not - will test in a few mins

gBridge
You may publish these values on the status topic:

  • One of 0 , off , false means the device is off.
  • One of 1 , on , true means the device is turned on.
    These values are case-insensitive.

Homey (MQTT Hub I guess) reacts to both 1 0 and True False.

Correct

hmm… i wonder why… even though MQTT see this

20190225-16:05:16 message: porch-light/onoff with value: 0

the light doesnt turn or off in Homey

For simplicity - I have only two devices set up

Try rebooting Homey.

will do and will report back

I am seeing a similar issue - it is with gBridge recognising the status I think… Looking… No it’s OK - it’s working for me - just a bit of a delay (although I am not directly connecting from MQTT-Hub to gBridge)

Unfortunately reboot didn’t work

Do you have a MQTT ‘monitoring’ utility? If so connect to the gBridge broker.

  • MQTT-Explorer latest version 0.2.0 will allow you to specify a root topic which must be
    gBridge/uxxx/#

(uxxx = your userID)

Yes I am monitoring…

When I activate the switch on either end
I can see it in the explorer…

Using Explorer … does altering the ‘set’ topic value from true to false cause the light to physically turn on/off?

gBridge/uxxx/porch-light/onoff/set

You can name the device whatever you want in gBridge but you must use the device names that MQTT-Hub creates within the topics.

EDIT: This is probably OK - does MQTT-Hub create that porch-light device and topic hierarchy on the gBridge broker ? Similar to this…
image

The new MQTT Client has just been published so I’ll update and try myself shortly.

Also here… MQTT client with gBridge fix is published.

2 Likes

OK - I have now setup to use the gBridge broker directly from MQTT-Hub - worked well thank you scanno.

All the gBridge branch is created correctly (as a renamed homie format). I have setup a couple of devices in gBridge that control Hue lights via Homey. Here’s an example topic as configured in gBridge and an expansion of the gBridge topic. It’s a Kitchen Table light named kitchen-table in MQTT.

It all works OK and is synchronised bidirectionally.

image

image

@KonradWalsh Could it be that you have the action and status topics reversed in gBridge by any chance ? They are a bit confusing with regard to the /set subtopic.

OK… thanks for the help so far…

Yes everything you have said is how it is on my side…

so I am starting over… deleting the MQTT apps and reinstall…

Can anyone confirm the exact versions of MQTT HUB, Client and Broker I should have installed before I do it over

It’s a good diagnostic to use MQTT Explorer and it’s publish capability to pinpoint which part is not working as expected. Inparticular it is worth being sure that a command issued on the set topic of MQTT-Explorer is working as expected.

Anyway - let’s hope your re-install works.

I am using the gitHub HA branch of MQTT-Hub v2.0.6 (because I use Home Assistant) and the just released version of MQTT Client v2.2.2 - which I had to re-enter the config for because it went from beta to release. The broker is gBridges cloud version.

2 Likes

I noticed that you wrote “window-light” in one post and “window-lights” in another. Check which is correct.

I could bypass my mosquitto broker by changing the ip and user/pass in the client without any other changes.

It works for me now!

So I reinstalled just using the appstore versions of MQTT Client and MQTT Hub Beta
this is the screen from MQTT Explorer

this shows it leaving homey as i toggle on and off the light from homey

this shows it coming back if toggle on off from Google Home