MQTT documentation?

I have been able to configure my Bond Bridge to connect to my own MQTT broker using the v2 API, but I don’t know where to go from there. Is there any documentation that describes how to interact with the Bond Bridge via MQTT?

To be honest, redirecting the MQTT endpoint is untested. We’ve got lots the redirect implemented but not used for anything yet, so there’s likely to be bugs. That said, the API is just the HTTP api tunneled over MQTT messages!

Also, consider that if you redirect MQTT, you will be unable to use any Bond cloud integration (Alexa etc) nor the Bond Home app when away from home.

I’d strongly suggest the HTTP API. (Or, like to hear why MQTT still makes sense.)

1 Like

That said, the API is just the HTTP api tunneled over MQTT messages!

Could you elaborate? To my understanding of how the MQTT protocol works, there’s no equivalent to a GET request. So what would be the MQTT equivalent of GET /v2/devices? How does token authentication work?

I’d strongly suggest the HTTP API. (Or, like to hear why MQTT still makes sense.)

Many smart home / IoT solutions already support MQTT, so instead of having to build a custom handler for the BondHome API it would be nice to reuse the existing MQTT functionality.

There has been discussion of this over on the OpenHAB forums.

For tunneling we simply wrap the HTTP body in another layer of JSON containing the HTTP method/status etc. — Yes we’d need to get you docs on that.

MQTT and HTTP (as we use it) are layer 5 protocols (Session), but the Bond API is layer 7 (Application).

So, you would still need to write a custom handler for Bond API, to handle such things as discovering devices on the bridge, figuring out their names, and calling the actions appropriately.

To handle the problem of push feedback on the local API we implemented BPUP (another layer 5 protocol) which can work well in conjunction with HTTP.

Buuuut, if you really want to use the MQTT transport and are ok with losing the Bond Home official cloud connection, then you can (once we get tests in place and documentation to you). But it’s hard to see how very different layer 7 protocols can coexist on the same MQTT broker? Perhaps you also need to be able to specify a relative sub topic?

After I manage to add a few more hours to each day, I definitely plan to start on a binding for Bond.

:joy: I have a list of things sitting in that pile for me too - please share when you find the way to accomplish!!

I’ve starting something here: https://github.com/SRGDamia1/openhab2-addons/tree/bondhome/bundles/org.openhab.binding.bondhome

All it can do right now is discover the fans.

1 Like

Is this using HTTP or MQTT?

I’m using HTTP and BPUP.

I’ve pushed the local utility that I have been using to connect the Bond Home API + BPUP to MQTT at https://github.com/ssmall/bondhome-mqtt

I would love to see this functionality in the Bond Home Bridge itself; if I connect my bridge to an MQTT broker, it could set up these same topics.