Binary sensors show unavailable after upgrade to 0.112

My binary sensors (door sensors, water sensors, PIR) show unavailable after upgrading to the latest version of HA. Any ideas?

Not the slightest idea. We don’t have a glass globe as a fortune teller has. Maybe start by telling what technology your door sensors, water sensors, PIR use and how they are configured.

I was hoping someone was having the same issues. I narrowed it down to my 433MHz binary sensors. They connect via a Sonoff RF/WiFi bridge using Tastmota. I tested my bridge and everything is working as expected. However, this is the problem:

If I restart HA (which I did after upgrading) all of these sensors show unavailable. If I open a door or if I trigger the PIR, then the sensor triggered connects to HA and afterwards it starts showing the correct status. I don’t want to have to activate every single binary sensor to show the correct status. If I activate any of my 10 water sensors, the entire house will go on panic mode thinking there is a water leak.
My mail arriving notification depends on a magnetic sensor as well and it has been working flawlessly for more than a year. Besides, I have not had any issues with this in the past two years. This works as my alarm system when I am not home. The logs in HA do not show any related errors or warnings :frowning:

None of my 433Mhz sensors behaved like that after the upgrade.

Do you use strategy 1 or strategy 2, or a different solution ?

It sounds like the payloads are not being published as retained messages. That means when Home Assistant restarts, connects to the broker, and subscribes to each device’s topic, it receives no payload so it reports the device’s state as unavailable. The moment the device is activated and it publishes its state, then and only then is Home Assistant informed of the device’s state.

Use an MQTT client to confirm that all state_topics are receiving retained messages.

1 Like

Strategy 1. I am checking @123 Taras comment regarding to check if the MQTT state_topics are retained or not.

If you are using Strategy 1, it’s the device’s responsibility to publish its state as a retained message. Check your device’s Tasmota settings.

Is that a command on the Tastmota console? I am running version 6.5 and I do not have an option to retain message. I am looking into upgrading the the latest version of Tasmota. Thanks for your help.

I don’t use Tasmota so I’m not the best resource for it. It may be the SwitchRetain option … or the Publish2 option. Perhaps someone who is familiar with it can help.

I am going to retain the message on my binary_sensor definitions on my config.yaml file and see if that will solve the problem. Thanks again for your help

Don’t do that; it will not resolve the issue.

That’s not the purpose of that option. That’s to make the messages the binary_sensor entity publishes, published as retained messages. It has nothing to do with the messages published by your device.

gotcha. Now, what I don’t understand is that everything has worked fine for two years. It worked on the previous version of HA 0.111

Just for completeness, what are you using to serve as the MQTT Broker?

The Tasmota Rfbridge implementation lacks the capability to send the received code as retained messages. Upgrading to the latest version won’t help, but if you do upgrade, follow the correct upgrade path ! ( Don’t go from 6.5 immediately to 8.3.1, use the intermediate versions in between)

1 Like

I am having the EXACT same issues as you describe. All I can tell you at this stage is that Tasmota 8.3.1 does not appear to be the cause as my 433 MHz sensors were working prior to upgrading to HA 0.112. I am also using Sonoff RF bridge with Tasmota FW.

What MQTT broker are you using? The inbuilt one has now been deprecated.

I’m using the one in the official add-on store - Eclipse Mosquitto V5.1

That’s not the offial addon and has been deprecated I believe. It’s a community addon no longer supported.

Dunno, shows up in the official add-on store

ok so it’s not Eclipse Mosquitto V5.1 then…