Well after adding and deleting the client and app a few times I finally got it 2 connect 2 my broker. I have publish working but havn't figured out how 2 get the subscriptions working yet. I have my 2 virtual switchs defined in the virtual devices but not sure what else is needed. I'm getting this connect error in log. It's updating the homie heartbeat so the app seems to be connected but this error seems to be tied to the client. thanx for any help
Just busy but I come back to you and get you working shortly - in about an hour - hang on as there’s still an issue with your install.
In the meantime delete only the MQTT client device(s) you created (delete device) but not the client driver or the app and then importantly reboot your hub. The null and Hubitat_temporary you see in the above log for the topic unsubscribes is not initialised correctly, it should be your hub name.
Any MQTT device driver should shown ‘in use’ by MQTT
Could you also just post a screenshot of the expanded (direct from device) MQTT topics for say ‘open gate’ and a screenshot of the device data for the OpenGate virtual device you created (from HE devices).
This virtual device was created within my app and not within HE directly ?
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
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 ?
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 ?
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!
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!