MQTT Hub/Gateway

Very interesting…

so I tried… the problem is the HOMEY MQTT Client Protocol is not supported by gBRIDGE… Protocol must be 3.1 or 3.1.1… Ive no idea what the Homey Client is working under

Ok. That sounds a bit strange though because I have heard that people got this working with only the MQTT Client and gBridge and then using flows to make Homey act on MQTT changes.

I have not tried this myself, but doesn’t that suggest that the protocol works? I can try to translate the guide for this from the facebook-thread I read it if there’s interest. But maybe this thread is the wrong place for that.

v3.1.1

Oh… its not that then

ill try again

maybe this needs to be its own topic…???

this is the error… now I believe its to do with CA Certs

20190215-13:10:53 Broker State: RECONNECTING
20190215-13:10:53 MQTT error occured: Error: Connection refused: Unacceptable protocol version

Recommended settings =
* MQTT server: mqtt.gbridge.io
* MQTT port: 8883
* MQTT protocol: Version 3.1
* TLS: TLS V1.2 required.
Certificate is signed by Let’s Encrypt, so use the CAs of your system (for example under /etc/ssl/certs/ for Debian based systems).
Only download the CA files from here if your system does not support Let’s Encrypt CA natively.
* Username: gbridge-uXXX
* Password: (change below)

I haven’t been able to try anything out yet, only read.

But gBridge is an MQTT Broker then?
And for this to be somewhat automatic we need to be able to connect MQTT Hub to this broker?

Edit: There’s a way to use the existing Mosquitto broker as bridge to gBridge-server(broker?). I will try this at home. Should we start a new topic in the “Devices” section about connecting to Google Home through MQTT?

New topic would be better…

Mosquitto is not compatible with 2.0 homey… :confused::unamused:

Done…

Not entirely true. I’ve configured Mosquitto in a docker container on my NAS. Works like a charm.

Please continue any broker connection problems on a new thread.

1 Like

I mean the homey mosquito app is not compatible with Homey 2.0. Which is what I said…

So which bit is not entirely true… Cause I’ve missed something here

And yes… Right above your reply I demonstrated it has moved to its own thread

Sorry @KonradWalsh. You’re correct, I misread your post. Thought you couldn’t connect to a Mosquitto broker from Homey 2.0.

Just for your information:
I installed the beta MQTT Hub (your app) and beta MQTT Client (from Menno van Grinsven).
Started mosquitto app on my PC
Set DeviceID to ‘homey’

All is working fine it seems
On connecting another client to the mosquitto on my PC, I receive info from all devices.

(running Homey 2.0.2)

2 Likes

Sneak peak!

I started the implementation of the Home Assistant Discovery protocol (thanks @xAPPO) .

image

NOTE: This is work in progress, incomplete, far from finished and contains many bugs
(it’s a release candidate :wink:). For the daredevils: it’s on the ha branch.

Additional changes:

  • Introduction of a message queue to improve speed & stability
  • [BUG fix] Initial values are published on device registration
  • [BUG fix] Handling of boolean values (on set)
  • A lot more…
5 Likes

LOL! :joy:

1 Like

Yes @robertklep, you can laugh about it, but it’s serious matter! First we need to test it thoroughly before we can take it to production.

1 Like

I thought the Homey Manifesto was “Every User Is A Tester”? :stuck_out_tongue_winking_eye:

2 Likes

Hello HarriedeGroot,

I have started working on an application that runs anywhere, doesn’t rely on third party application and where you can create your logic in a flow manner, but kind of a mind map (like Visio flow chart with multiple triggers and multiple outputs).
The application is MQTT broker and client. It successfully receives MQTT messages from Homey. But how can I ask your app (with an MQTT message) to send all states (e.g. to get all devices with properties and states)?

Also, is there a way to get the available devices with states as a message (json object as payload with all info per device)?

  • Robert
1 Like

Did you take a look at Node RED?
You can receive all device info by implementing the Homie convention.
No need to ask the app for it, it will be retained on the broker at app startup.
I did not (yet) implement the commands to receive entity info (app, zone, device, capability, etc.).

Yes, I did take a look at Node-RED. However, you need too much to install (node.js, python etc etc), mosquitto… too much hassle for the ordinary user. Also, developing in Node-RED is for developers.
I want an application that is for everyone very, very easy to use.
Athom did make a good start with the flows concept, but the problem is that you need tons of flows. I would like the flow concept where you have a freem map (canvas), drop any trigger, condition and action card in and connect them.
All the stuff I have seen are more for developers rather then users (consumers).

I will have a look at https://homieiot.github.io/
thanks!
(didn’t see the command to get a list of all devices though. Will have a better look later)

Robert,

I wrote the nodeRED flow that bridges homie3 to the HA MQTT discovery protocol. There is no command to get all the information you need in one JSON payload.

What I did was to connect to the MQTT broker that MQTT-Hub is using and using a wildcard topic of homie/# retrieve the homie3 topic hierarchy and build such an object within nodeRED to reference it later. Any topic updates update the object, although I didn’t need that aspect. In your case you’ll have your own internal broker.

Please continue the discussion on your own thread.

Sorry Harrie … didn’t know there was another thread ! Off there now