Homey Community Forum

Guide to Connecting gBridge to Homey for Google Assistant

#21

I’m not that familiar with the logs but from what I can tell they seem correct.

I think your MQTT Explorer looks correct, since you’ve told Homey to use gBridge as root topic there shouldn’t be anything else there.

But try to expand the view to the device you are using. Make it look like the picture I attach here:

When you turn the device on and off through Homey the value marked with blue should change between True and False.

When you turn the device on and off through Google Home the value marked green should change between 1 and 0. (If everything works correctly Homey notices this and also turns the device on/off and the blue value also changes)

Check if both these conditions are true.

0 Likes

#22

Thanks for helping out. When switching from Homey the ‘onoff’ value indeed changes from false to true and back again. When switching from Google Home, the ‘set’ value changes between 0 and 1, but the ‘onoff’ value isn’t updated with it.

So if I understand correctly, the following should happen

  • gBridge sets the ‘set’ value to 1 (on) or 0 (off)
  • Homey sees this change, and is triggered to set the ‘onoff’ value to true (1) or false (0)

The second part is not happening. For some reason Homey is only sending out MQTT-packets, but not monitoring packets to use as input.

0 Likes

#23

What happens if you publish ‘true’ or ‘false’ on the set topic using MQTT explorer?

0 Likes

#24

Nothing, ‘onoff’ stays the same. Even when I manually set ‘onoff’ to ‘false’ , the light stays on. Homey seems to just not monitor any of those values.

0 Likes

#25

Honestly I had this problem in the beginning. I had no idea what caused it. I uninstalled everything. Mosquitto, the homey apps and all and started from scratch. Then it started working.

Not a fun thing to say but…

Anyway you could try to reboot homey maybe?

0 Likes

#26

Will try that later, but first I noticed this in my MQTT Hub logs

20190221-07:40:13 sucessfully subscribed to topic: u796/$command

That doesn’t seem to be the correct topic. What does it say for you in the log? I have the protocol set to Homie Convention v3.0.1, the root topic to gBridge and the deviceID to my userid at gBridge, u796.

0 Likes

#27

The command topic is correct, used for other purposes.
Do you receive log messages in the MQTT Client when publishing to set?

0 Likes

#28

Yes

20190221-08:30:43 received ‘EXECUTE’ on ‘gBridge/u796/d0/grequest’
20190221-08:30:43 Trigger generic card for gBridge/u796/d0/grequest
20190221-08:30:43 send message to listeners via realtime api
20190221-08:30:43 gBridge/u796/d0/grequest: EXECUTE
20190221-08:30:43 OnMessage called
20190221-08:30:43 received ‘0’ on ‘gBridge/u796/office/onoff/set’
20190221-08:30:43 Trigger generic card for gBridge/u796/office/onoff/set
20190221-08:30:43 send message to listeners via realtime api
20190221-08:30:43 gBridge/u796/office/onoff/set: 0

0 Likes

#29

So messages from the client are not received in the hub. Looks like a communication/registration issue on the app2app interface.

Did you try rebooting Homey and/or restarting the client & hub apps (in this order)?

0 Likes

#30

Note to self: next time, reboot first, ask questions later :grinning: thx for all the help guys. Can someone point me in the direction of a post explaining how to install the HA-branch on my Homey so I can get proper percentage scaling for dimming?

1 Like

#31

YW: [HOW TO] CLI install method

0 Likes

#32

Thanks, got the HA-branch installed, turning on/off is still working, but dimming isn’t. Tried using both the int(0-100) and the float(0-1) settings.
Capture
The blue value is what gets updated when I adjust the brightness through Homey. The red value is what gets updated when changing brightness through Google Home.

When I dim through Homey, this is what shows up in the logs:

Hub

20190221-11:23:56 message: office/dim with value: 94
20190221-11:23:56 message: office/dim with value: 94
20190221-11:23:56 Homie set value [office.dim]: 0.94

Client

20190221-11:23:56 received ‘94’ on ‘gBridge/u796/office/dim’
20190221-11:23:56 Trigger generic card for gBridge/u796/office/dim
20190221-11:23:56 send message to listeners via realtime api
20190221-11:23:56 gBridge/u796/office/dim: 94
20190221-11:23:56 OnMessage called
20190221-11:23:56 received ‘94’ on ‘gBridge/u796/office/dim’
20190221-11:23:56 Trigger generic card for gBridge/u796/office/dim
20190221-11:23:56 send message to listeners via realtime api
20190221-11:23:56 gBridge/u796/office/dim: 94

When I dim through Google, this is what I see
Hub

20190221-11:27:57 message: office/brightness/set with value: 80
Client
20190221-11:27:57 received ‘80’ on ‘gBridge/u796/office/brightness/set’
20190221-11:27:57 Trigger generic card for gBridge/u796/office/brightness/set
20190221-11:27:57 send message to listeners via realtime api
20190221-11:27:57 gBridge/u796/office/brightness/set: 80

Already rebooted this time.

0 Likes

#33

Logs are correct. It does even display setting the dim value to .94.
The int(0…100) setting is the correct one.

@Camelen got this working already?

0 Likes

#34

You set it wrong in gBridge. You need to change the /brightness/set tag to /dim/set.

0 Likes

#35

Yeah, I just figured that out about a minute ago when looking through the logs again. Doh! gBridge defaults to ‘brightness’ where it should be ‘dim’. Thanks so much guys! This will greatly increase the Wife Acceptance Factor of the Homey setup :wink:

0 Likes

#36

Do you guys think there is any way to get this working with just HOMEY and GBRIDGE

0 Likes

#37

Not right now I don’t think. Either the MTTQ Client-app should be updated so that it can directly connect to gBridge, or the Broker-app should get support for bridge-mode.

0 Likes

#38

@scanno? :point_up:

0 Likes

#39

The MQTT client supports TLS 1.2 and has the current mqttjs library included.
It connects fine with a mosquito broker using tls and some other brokers.

Without knowing why exactly the connections is refused by gBridge, I can’t do anything.
The only thing that I can think of right now is that gBridge requires an encryption standard that is not supported by the tls library used by the mqttjs library.

0 Likes

#40

See :point_up_2:

0 Likes