MQTT Client - Beta

No I havn't figured out how to add a virtual device from your app yet. I was thinking I needed to do that.

I don't have any MQTT client devices just the driver, so i guess this my problem. I just have the child device driver

No, you don’t need those unless you are trying to import a remote MQTT device into HE.

You can just create a virtual device directly in HE , enable it within my app for MQTT publishing and it will update state real-time on MQTT and you can control it by using that same topic with /set appended. E.g. homie/coosa-island/opengate/onoff/set. The payload should be true or false.

You’re on the right track so don’t explore creating virtual devices within my app.

If you outline for me what you’re aiming to achieve I’ll try and help you more specifically...

OK well that is what I have done. 2 test I'm just trying 2 control 2 virtual devices with MQTT. . I can flip them on in devices and I see the publish. I have not been able to turn them on via the MQTT Explorer. The big project is I have written a mqtt plugin for a elgato stream deck which i plan to use 2 control and show states of hubitat devices. I have deleted and added the app and/or client and rebooted several times trying 2 fix the connection error. I tried all combinations I could come up with

OK I got it working. The "set" was the missing piece. Still getting the connect errors though

and you are using a control topic (homie/coosa-island/opengate/onoff/set) that ends in /set - have you got rid of those null messages in the log via a restart ?

great

Let me look that over - it sometimes happens if you have two clients trying to connect to the broker with the same clientID. You did do the delete of the client driver device and then restart ?

I have but will try again

You have two MQTT client devices dev 1030 and dev 1025. You must delete dev 1025

delete the client device that app created? Only see 1.

Yes - there are two of them - delete both (any MQTT client device from my app)

and then restart the hub - my app will recreate it again correctly

If you only see 1 delete that, reboot and try again but there are two devices in your logs 1025 and 1030

Bingo! I swear i had tried that a couple times but its all well now. Thanx!

1 Like

Great - I'm always around if you need me .. you can PM too if you prefer.
Also the below topic is more recent than the one you're using.

The child device initial creation is a known issue (one of three, all minor) - but easy to work around

I thought I was using that version. it says beta 3d in the explorer. So I can only control virtual devices correct?

If you are using custom topics from your project then you will need to explore using virtual devices from my app - but if you can publish to a homie topic , like my app is doing it should work directly, maybe even being auto discovered by HE.

Yes, you are using the latest version - no problems - it's just this (your) question is posted in an older, not related topic . This topic was really an OT around the HE inbuilt MQTT driver.

ah ok thanks sorry I don't post alot. an exmple would be me posting here for the other driver i tried 2 use. you have been a major help!

1 Like

Could someone direct a dummy to a general procedure to install MQTT Interface - Hubitat Documentation
on my Hubitat? I do have a mqtt broker working on several Raspberry Pi's and would like to interface them with my Hubitat.

That is for use in apps/drivers to create an mqtt client. Not to use directly AS an mqtt client.

There are at least 3 user made mqtt clients on here though. Just search mqtt in these forums and you should find them.

If you are trying to make your own mqtt client app, the other offerings are still a really good place to start as examples.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.