Hi,
I have created a garage opener using a a PICO-W, that sends its status to HA on a change of state or every 5 minutes.
I display the status in my HA dashboard alongside buttons to open & close the door.
I want to put up a status of unknown if HA hasn’t received a message from the PICO-W either on startup or after a period of more than the 5 minutes when it should send an update.
How would I set a ‘unknown’ message, and also how would I change the message if I don’t receive an MQTT message for a period of time. ie the PICOW goes offline?
Thanks, I was not aware of mqtt last will and testament, I set that in the library on the PICOW and now I get the unavailable message when I disconnect the PICOW from power or wifi.
Is there a need for keepalive at all?
I also had not seen the ‘cover’ type, I’ll look into that, it looks perfect!
What do I send on what channel to tell HA it’s available, ie to set the state? I assumed it was to send ‘online’ to the topic under availability, but that seems not to work
Also, I have seen I can show the controller with a mushroom card, but my door opens sideways, si it possible to change the arrows to be open & close or left & right?
The docs are confusing. The availability payloads are listed in the main options and under the availability option but the examples show both being used together. Try it like this:
Thanks for all the help, but I’m still struggling to get availability through.
I am publishing ‘online’ to the availability topic on app startup, and see it being sent, but HA still thinks the device is unavailable.
availability_topic: “garage_door/availability”
I also see the offline message being sent on device removal using the last will and testament message, so that’s great.
Any clues, I do find the docs a struggle to interpret!
Does anyone know of an example app for the garage door device, that send the MQTT messages to HA, so I can look and see what it does differently? Might help me identify what I’m doing wrong.
Thanks
Paul
I have noticed something, the state changes to unavailable a while after I unplug it, so the last will and testament must be doing something, but when it’s actually online & communicating it shows unknown.
Here’s the configuration.yaml, shouldn’t the state be offline, not unavailable?
Once I cleared out the state manually, and it doesn’t get set to unknown, but also nothing gets set on power down of the Picow.
So I put the availability topic back after manually clearing the state, and it does go back to Unknown as before. I’m guessing state should show the open or closed message, or offline
Also, can I ask something else. If the last payload from the HA is CLOSE, and I power cycle the PICOW, is it normal for the HA to send another CLOSE request on startup (& visa versa)?