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

OK I have looked into MQTT virtual buttons and it's really messy. If each button was a separate device it might be viable, but they're not.

This is because people are going to expect different topics and payloads for different buttons 1,2,3,4,5,6 etc and there are values for held, released, pushed, doubleTapped with each needing a _Topic, _Cmd and _Map (in and out) for each button state, and so way too many permutations.

I think the best way forward for the moment would to be remove virtual buttons as an inward/outward option for my virtual MQTT devices. You can usually use a virtual switch instead.

It will still continue to work, as now, for publishing direct HE created virtual button devices to MQTT. Whether that is useful or compatible with anything I'm not sure. It doesn't work for auto discovery into HA currently for example, but an HA automation script could be written.

Hi Roy, Just looking at getting these exposed correctly on MQTT and also advertised to HA - which driver are you using ?

If it's a custom one can you point me to it's code...

Did you lights work?

... otherwise just the button issues or more ? Ignoring thermostat - which does partially work now.

update: I've got the basic capability supported now to MQTT (just the HA 'covers' side to look into)

image

1 Like

Hi Kevin,

Sadly they never became "available" in HA. Since then, I've managed to get my troublesome Xiaomi devices on their own hub and feeding that into NodeRed. A bit of a convoluted setup, but works, its local, and very fast for me.

That said, more than happy to do some testing on it through. I'll set MQTT back up today, and try the shades again. They are using the stock Z-wave Shade driver.

Cheers
Roy

I would be fine with Yes. The amount of work you put into this is ridiculous.

I'd vote in your poll, but it says I need to be an "owner" to vote.

When I talked with the guys over at HA who manage the MQTT side of things this was one of the exact reasons they said there is no MQTT autodiscovery for buttons.

IIRC, when i was looking to work with buttons originally (waaaaay back in one of the early alphas) the closest that I came up with for a working solution was to pass to the MQTT topic a multi-value being "{button}:{state}" and then on the HA side, parsed that to determine which button and what (pushed, held, etc)

Regardless, it wasn't worth it in the end at least for what I was trying to do.

1 Like

This is the shades or lights ?

Dont rush - you need beta 3d anyway for shades and I haven't posted that yet !
HA Integration working for Garage Door and Shades

image

image

1 Like

The lights.

Very cool!!! :slight_smile:

AFAIK This works fine for all varieties of lights into HA so we can troubleshoot that should you wish. Just let me know...

I think its more likely my setup TBH, lets just say I found HA to be a little problematic lol.

Thank you @kevin for your amazing app. This has been very helpful in integrating my Aqualinkd pool pump system into HE.

I was hoping someone could help me figure out why my MQTT HE devices stop updating after about 3 days or so. I have mosquitto mqtt running on my Raspberry Pi and after opening the MQTT app in HE and hitting okay it works just fine for about 3 days then stops updating. I have to go back into the app and hit done again to get it working again. I've used MQTT Explorer to confirm that the topics are still updating on the server side.

Any ideas?

Are you saying that the messages FROM the pool pump are getting to the broker but HE is not receiving them? Or is it the other way around?

Yes, the messages are getting to the broker from the pool consistently, but after around 3 days after clicking the done button in the MQTT app HE stops receiving updates from the broker, even though the pool is still sending updates to the broker.

@kevin will have to address why his app might stop receiving the messages but if you're familiar with Wireshark you might sniff the traffic between HE and your Rpi and maybe find out how the traffic stops, assuming it does stop.

Okay thanks for the help. I’ll give that a try.

@tsviper... Hi Tim, what version number are you running, at least a beta 3 ?

Never seen this issue except for the 'other' problem some users of HE have with slowdowns. Does everything else continue working OK on that hub and the app recover for the next 3 days once run again without a hub restart ? Does the log show anything of interest ?

It is possible that the app has disconnected from the broker - perhaps due to a network issue. This would show in the logs however when you ran it again it would always show in the logs reconnecting. It will automatically reconnect itself if disconnected but after a while it starts to back off the frequency of it's reconnect attempts and will eventually give up.

The MQTT Client driver also has a presence sensor that shows whether it is connected or not - (you can include in a dashboard if you wish)
image
and a sequence heartbeat number that will increase every 20 secs - does that stop ?

One other thing... when you say not updating is this on the dashboard display or on the device itself ? Can you look at the device attribute directly via 'Devices' in HE. Some people have reported dashboard tiles not updating after a while but the underlying devices are updating fine (not related to this app)

Thank you Kevin...I'll have to wait and see in a few days when it stops working and look through the logs again. Yes, I'm running your latest beta 3c and haven't had the hub slowdowns that I have seen others having. Everything else seems to work just fine. Not using really using dashboards just Hubigraphs to graph pool temperature and that is how I started noticing it. I have able to verify under the virtual MQTT temperature device that it does stop updating changes.

The strange thing is that it still says present as I took a screenshot of the MQTT device this morning before opening the MQTT app and clicking done.

Thanks for all the help. I'll do a little more digging when it stops reporting again.

It shows a sequence of 0 though... that is not right, it has just connected

Please check you have no other MQTT driver devices and also do a reboot, did you upgrade from beta 2 ?

Oops, maybe I took the screenshot right after hitting done in the app, sorry. I'll be sure to document everything I can next time it happens.

I was never on beta 2 and I didn't install until you released Beta 3.

Thanks again for all the help. I really appreciate it.

Heya fella's, I want to make sure I'm in the right thread and not cluttering things up.

I'm trying to get HE to talk with HA via MQTT and I'm clearly making a mess of things. I'll be happy to show my configs and whatnot to help troubleshoot, and point out where I went full on stupid. I'm pretty sure that I have the HA end of things set up correctly. I'm having issues following the readme instructions for the HE App/Driver. So, I'm pretty sure I'm doing something dumb.

Add that, to the fact that MQTT is brand new to me, and you have a recipe for disaster.

If I should create a thread some place else, or continue here is good with me, either way. I just don't know how this is usually done.