[Beta] MQTT beta 3d (released 5th July)

Unfortunately buttons are not supported by HA MQTT Auto Disovery

1 Like

Oh, interesting! Thanks!

So... any ideas on how I get them in there? I switched out my old setup when the Auto Discovery started working with your app. Do I just manually populate it... Actually, nevermind, I can work through it and figure it out I bet. Appreciate the info so I'm not spinning my wheels on the Auto Discovery.

Thanks!

HI Kevin, I just discovered this app and I want to ask you if this is possible:

I'm controlling a switchbot curtain with a esp32 board that uses Mqtt. This is working because I use mqtt explorer and I can open or close the curtain. For this I have to use as payload something like {"id":"switchcurtainone","value":"open"} in order to open the curtain for example. Is it possible in your app to define this kind of payload for publishing?

Thanks in advance!

Yes it is ..only one json key can be variable - in your case the value. The other key id will be setup as a constant within each device to match.

Receiving status if the curtain was operated remotely is more awkward as the identifier id is in the payload rather than the topic hierarchy. This means every message has to be inspected to see if it's a matching device. A poor design decision by the esp32 implementation really.

Good Morning.
Was hoping for some clarification on the Aqualink D integration.
My pool controller is an Aqualink RS. Not the iAqualink controller.

I bought a raspberry pi about a half a year ago and am finally ready to try the integration and connect my Aqualink RS to Hubitat. Read through the posts ( and looked at the link above for GitHub) and there are a few questions if someone could answer them please.

  • In the overview in the wiki on Github, there seems to be mention of several home automation of platforms (Alexa, Homekit & Siri, Home Assistant, smartthings, domoticz etc) but not specifically Hubitat. I'd seen several posts on AqualinkD on the HE forum so i wanted to confirm that this will work on Hubitat. and if HE compatible is there a specific set of files in the repository for the HE platform and specifically the raspberry pi when connecting to HE?

  • Is there an app that i need to install on Hubitat or is it just drivers needed in Hubitat to access the raspberry pi?

  • I may have inadvertently loaded some driver files from another GitHub repository but now that i look back - they may have been for iAquaLink. I'm presuming that if i leave those but not use them then there shouldn't be any issue - yes?

Lastly. as there are multiple posts i'm assuming there may be more than one user solution for this. I just wanted to confirm if everything i need is on the single GitHub repository or if i have to go to multiple places to get the files needed.

Had this thought to connect my pool for a while now and finally got someone to program the raspberry pi for me - looking forward to getting control of my pool on my HE system so greatly appreciate any guidance.

Thanks in Advance
Mac

Hi Mac. I’m afraid I don’t have an Aqualink or a pool even - too cold in the UK so I hope one of the other users who have integrated their system via MQTT can help here..

Maybe this thread is a better source of info ?

https://community.hubitat.com/t/pool-iaqualink-driver

I submitted a bug request on your git hub about this, but not 100% sure if it's a bug or not, so I figured I would come here too.

When I try and install the app (already created the virtual device with the device driver) it just stalls out. after a while I see the child device is created but nothing under app's. When I first installed I just thought my system wasn't responding and clicked it a few time (4 or 5) and it opened, I configured. But nothing was showing up in HA. i've been back and forth trying to figure out what's going on. I've re-installed both the mqtt on HA, and this on Hubitat (several times now) I've deleted the child device rebooted re-run the app several times. everytime I try and install the app I get that freeze thing occuring, and if I click it 5 time for it to show up it creates 5 copies all attached to the child. deleted the extra and the child and rebooted and tried running, still nothing in HA. Someone pointed to mqtt explorer as it seemed like everything was connecting and talking based on the logs but no device discovery. That's where I found that hubitat was publishing as homie not homeassistant, eventhough it's set that way (deleted the child rebooted re-run app) and the same result.

The only piece that I have left on why it wont update to the homeassistant prefix for discovery is something with the install process messing up the initial install in some form that I cannot get it to clear....

image

image
any idea's, tips or suggestions?

Strange - never had the homeassistant topic not populating... I know you say you've done the below but it works....

Manually delete all the MQTT child devices 'MQTT: Child device driver' from HE (not the app). Make sure only one app is installed. Leave the code for both the app and the device driver as is. Reboot the hub . A new device driver will be created. Everything should now work. Do not manually create the driver the app will do this for you.

It publishes to both. THis is corerct.

Make sure you have some devices published from HE to MQTT (it looks like you do). Do NOT use the everything capability - use the individual ones. Use a simple device like a switch or a light first.

Please post me by PM the logs for the app and the device driver from startup if this doesn't work.along with the state values in the device driver. Obscure your username and password if you wish. Double check your username and password are correct for the broker.

State Variables

  • topic0 : DoNoTmatch
  • normHubName : development
  • waiting : none
  • subs : 58
  • seqNum : 10471
  • seq2 : 41
  • count : 0
  • myHub : false
  • password : xxxxxx
  • logLevel : 2
  • continue : false
  • connectionAttempts : 0
  • MQTTBroker : tcp://192.168.1.78:1883
  • homieDeviceDiscovery : homey
  • seq : 818
  • username : kevin

Hello!

I really want to get you MQTT client to work but something is acting up for me :frowning:

I have followed the instructions from the first post, removed everything MQTT from my HE, but I can't get beta 3 to connect to my broker even after a clean install.

This is the log every time:
MQTT> Connecting as Hubitat_temporary to MQTT broker nul

My broker a normal Mosquitto running on a raspberry pi works fine and I can see some devices via MQTT Explorer. My HE is up-to date running 2.2.6.140. The broker and HA is on the same subnet. Any idea how to solve this?

guessing it was because I built the device before starting. It did take a bit to get it working. Deleted everything (devices and app) rebooted. went and installed the app again, but it still did the freeze up, the child device showed up but the app didn't (I have about 4 tabs open watching devices, apps, logs while doing the install on the 4th because of all of the headaches). Although this time I did click it a second time and it went to the configuration page without to much of a problem. At that point I added 2 bulbs but nothing. So I deleted the child instance, rebooted and re-ran the app (just clicking done) and it showed up.

Now it's time to add the rest of the devices. Thanks for the help!

Note the temporary and null - these are wrong.

Follow the instructions exactly in the post above yours. Delete the child device(s), not the code, but leave the app installed and reboot your hub. A new child device will be created. Check your MQTT config in the app is correct and all should work.

Although beta 3e is still being worked on I might release as is with beta3f later. This is because the child device creation bug in 3d is tripping many people up and spoiling their first experience. It is already fixed in 3e.

1 Like

Thank you! It is working now. Looking forward to start using your code :slight_smile:

1 Like

I am trying to get some home assistant stuff into hubitat. Mainly been playing around with esp8266 devices and would like them into hubitat. I've installed the 3d code and app but can't seem to get it to fully work.

I've gotten it connected up it sees my homeassitant mqtt. My HomeAssistant topic I created was ha and the app sees the devices:


I select the device and click Next then Done but no virtual devices are created in the hubitat. I even rebooted, nothing, redid the process still no virtual devices.

My Next thought would be to make a virtual device and try to control it that way. I'm new to mqtt so I don't fully understand what I would need to enter into the virtual device. Here is the device from mqtt explorer:


I would like to start out simple and just try to manipulate the state. It looks like if I send a command to: couch_micro/light/couch_test/command with the payload of {"state":"ON"} or {"state":"OFF"} it will turn the device on/off. I'm not sure how to translate that into the virtual device.

Any help would be appreciated.

Maybe this is a total noob question, but I can't for the life of me get this to work.

Everything looks fine in MQTT Explorer, but I can't get anything through the app.

The setup is as follows:
I have Zigbee2MQTT running on another device broadcasting on topic zigbee2mqtt AND homeassistant. But the app doesn't register anything under Discovery into HE.
For fun I have a Homey which broadcast under a topic called homey on the homie3 protocol, and that isn't picked up either.
So what am I doing wrong?

In my experience, the app is pretty chatty in discovery. Was there anything in your hubitat logs that might help?

If your esp devices are publishing directly to MQTT using the HA discovery protocol then they should be automatically creating devices in HA. These will then get broadcast by HA using Statestream and become discoverable by HE , as it appears they are. Then selecting a device should create it in HE. You don’t need to create a virtual device.

Can you show me the statestream message for such a device from HA ? The explorer message you show is not coming from HA. Is that a message from the esp to MQTT directly ?

The app doesn’t support Zigbee2mqtt nor does it support discovery using the HA MQTT `discovery protocol into HE.

It does passingly support discovery via the homie protocol but it is not fully featured there as the homie spec is vague in its detail.

However in beta 3e I added both zwavejs2mqtt and zigbee2mqtt but then removed them. Because ? Both these can publish in HA MQTT discovery format and so I added that instead. This is partly the delay in beta3e in that I took an unnecessary detour. I can maybe use you in the beta test group ?

Here is my statestream ha:
Screenshot from 2021-04-19 23-40-07

Like I said I wasn't able to get it to create any devices automatically.

While playing around I created a virtual switch in your app just to get the thing turn on. (The virtual devices are buggy. Each time you lose focus of a text box it saves and backs you out of that screen, I also noticed the names don't match on the device either.) For my virtual switch I set it up as follows:
switch attribute MQTT status topic: ha/light/couch_test/state
switch MQTT command topic: couch_micro/light/couch_test/command
switch attribute MQTT payload map values to [on,off] for separate [status][command] or [shared]: [{"state":"ON"},{"state":"OFF"}]

I can get the little bugger to turn on and off in HE but the status is always wrong if it is turned on by Home Assistant. I see the ha/light/couch_test/state updating in MQTT Explorer correctly. I mainly changed the status topic from couch_micro/light/couch_test/state because I couldn't figure out how to get the JSON attribute state out of it. {"effect":"None","state":"OFF","brightness":255,"color":{"r":255,"g":0,"b":191}}

Is it possible to post those entries as text rather than an image and I’ll paste them in here and try it on my system.

It’s 6am here I won’t get to try it for about 8 hours.

I call it tetchy rather than buggy - but yes I know and you have to double check it’s updated the right data. There are 2 annoying bugs in beta 3d - the editor as you found and the child device install bug. I haven’t fixed the editor one - it’s a convoluted bit of code.

Download the Hubitat app