[Alpha] MQTT application

I think I understand. My use case, I think, is far easier - I hope. I'm looking to replace the MQTT Bridge solutions that are currently out there and in various states of support. I have added a number of IoT devices to HE via ZigBee and ZWave, but I wish to control them via HA. MQTT seems to be a good common protocol for this but, until recently, was a bit complex to setup. Until a deeper integration between HA and HE (Maker API maybe?) comes around - I'd prefer HE to just publish events on MQTT-enabled devices (user selected) for consumption in HA. In this scenario, discovery is of little value to me. I'm joining the devices to a "device hub" (HE) and leveraging MQTT as common protocol between the "device hub" (HE) and the "control pane" (HA).

Still interested in your application to see if it meets my needs.

Got quite a bit done over last weekend and decided to get a bit more into the next alpha which should be out in a day or so . It should suit your needs Jeff , although bear in mind it's switches/dimmers only at this stage.

Stay tuned.. I'll contact all the people who have PM'd me directly

1 Like

@chuck.schwer @andrew.rowbottom are there any plans to create MQTT broker within HE?
It is a crucial part of the whole system and performance improvement to be able to have an MQTT broker internally and connect it to Rules Engine with everything else across the system.
It'll remove additional hop from HE Client to external broker.

@podarok When you get your hub and are ready for some MQTT playtime let me know and I'll join you in the MQTT alpha application group. I have about 50 testers now across platforms and it's working really well. Just adding LWT and I need to do some code refactoring before I post it here as an open beta but will do that in due course.

Re. an internal MQTT broker on Hubitat. I'm a little undecided on that. It's certainly not a necessity and I feel that the more advanced user requiring MQTT likely already has an existing/external MQTT broker. I wouldn't want to impact the responsiveness of the HE hub by adding this although I understand that HE is more likely I/O restricted than CPU, but this an I/O intensive feature. When (and if) MQTT become more plug and play and useful to an average HE user I can see that having it onboard is tidy and advantageous.

Also a comment on Home Assistant's experience. They added an internal broker based on Mosquitto and a lot of support questions arose related to that broker rather than external. They now recommend an external broker but that maybe to do with Docker issues, or it maybe that new users of MQTT start with the included broker, or it may be a resource issue based on a lot of people running HA on Raspberry Pi's.

Give me a shout when you're ready (as can anyone else here BTW using MQTT) and ...

Ласкаво просимо - welcome - maybe the first Ukraine user ?

1 Like

Sounds great.
Broker itself is not a performance bottleneck. I have it on my rpi3b+ more than a year now and cpu load is less than 1% ( mosquitto )
Yes, it depends from number of clients connected, but still .
I'm going to have ~25 mqtt devices connected to broker, just fyi. And I'll share use case, for sure.

Дякую за гостинність @kevin

1 Like

Hi - the MQTT app will connect to HA one of two ways. Either using the HA statetream capability via MQTT with a handful of small automation scripts on HA to make it two way, or using HA's MQTT auto discovery.

It also supports publishing HE devices to MQTT and bringing 'adhoc' MQTT devices into HE. Lastly it supports the homie3 MQTT discovery protocol both for advertising it's own devices so things like OpenHAB can discover them and for HE's own discovery of devices.

If you are using this just for Home Assistant a component might be tidier but the MQTT app is aimed for generalised but feature rich support of MQTT in HE.

There's probably just one more alpha release hopefully just after this weekend supporting Hubitat's latest release of the beta driver and last will and testament, and then there will be a public beta after a bit of code refactoring.

K

PS. Sent you an invite

2 Likes

BTW anyone can just PM me to get at the alpha code for the MQTT app. However you should be familiar and already using MQTT. The thread isn't there to familiarise users or get MQTT setup and working, it's purpose is to find any bugs and make sure the features offered match peoples needs.

If you're wanting to get into MQTT it's probably better to await the beta release which I'll post on here, where more people can help ease you into MQTT.

K

3 Likes

Kevin,
I am very interested in beta testing your client. I have a working MQTT Broker (Mosquito) working with OpenHAB and Smartthings. I have the other code listed above working on Hubitat, but is only one-way.
I have written groovy devices/apps for ST, am familar with HE's custom apps and logs. So I should be able to provide some useful feedback.

Apparently, I am too new to be able to PM. Any other means to contact you?

Contact made.. I’ll send you a link to the download shortly. Unfortunately I have reached the community max number of users in a private topic and @chuck.schwer has not been able to raise it so I can’t include any new people in that thread, but the app will be beta and public fairly soon.

Re OpenHAB - they have found a significant issue with their core MQTT libraries and this is not going to be fixed even in OH2.5M2 so I don’t hold out much hope for my app working well with OH via homie discovery. But HomeAssistant discovery, which OH also supports should work fine.

Can I just link it to a Mosquito MQTT Broker? My link from OH to MQTT has been stable.

Of course..

OH promote their own auto discovery protocol for MQTT - but it's broken in OH 2.4 currently.

I want automagic.

Any word on when this will proceed to public beta? I just set my HA to get my ring devices and drop them out to MQTT. Would like to bring them into HE. Currently using a dozen routines in Alexa to update HE but it is ugly. Thanks!
Blake

Hi Blake, alpha4 will be the last alpha. A few people are pre-testing this currently and then it (alpha4) will be available to all the alpha group which is about 40 strong.

The next release is then intended to be the beta available to all. If you're keen to test then PM me and join the alpha group.

Beta getting closer? :slight_smile:

1 Like

I guess that's always going to be true :wink:

We're just starting alpha4 which hopefully will be the last one before the public beta. A lot of changes between alpha3c and alpha4 so expecting a few things to hotfix. It's working pretty well for everyone though, based on very few reported bugs, and the number of users.

You're not on my alpha list though ? I guess based on your recent posts you're at least waiting for beta.

1 Like

I thought the group was full (40 user max on discussion board), so was waiting for the beta.

If not I would poke around on the alpha if available. I have a Node-RED "Hubitat custom node" library in various stages of completion which I may/may not release at some point.

But the more I thought about it, the more I think it is largely unnecessary depending on how well MQTT integration works. So I've been treading water working on that in lieu of waiting for the Hubitat MQTT client.

The Hubitat forum has a private topic limit of 40 - actually it might be 30. In order to jettison some members I created a new topic for alpha4 and it is not yet quite full. But I do have about 75 testers so it will be - that's partly why I want to get to public beta quickly so there is no such limit.

Did you ask me to join you because, if so I apologise, I've missed it. But I have always pointed these enquiries directly to my GitHub for alpha3. I'll check back

Kevin

No, I didn't ask previously - so no apology needed at all.

I'm looking forward to jumping in to alpha 4.

I'm relatively new to MQTT, but in my quest to move all logic out of Hubitat and into Node-RED and Home Assistant, I've been pretty active in it lately. In my typical approach when I get into something new, I've spent a lot of time reading the MQTT release and underlying protocol docs and trying out various brokers. :wink:

We created our own protocol called xAP about 15 years ago to provide agnostic cross device communication using broadcast messages. My large (750 node) multi controller system uses it extensively.

Now I am transitioning all that to MQTT which is similar to xAP but with a data store. Actually I've just bridged xAP to MQTT so that was relatively easy and I am very happy with the results.

It means I can utilise the scheduling / logic engine from any controller on any device and use any device supported by any controller from all the other controllers.

It can be a difficult working out just what did what sometimes as MQTT doesn't provide information on which client initiated a message. Keeps you on your toes but can be a frustration sometimes.

HA has specific support in the MQTT app . HE publishes device information so that HA autodiscovers your HE devices. Conversly HE can listen to the HA statestream messages and create devices within HE.

(same with Athom's Homey and also OpenHAB 'perhaps')

2 Likes