Trigger if sensor stops responding?

New here. So I picked up a few Xiaomi Aqara temp/humidity sensors and I plan on using at least one of them to run my dehumidifier in the basement. As these are known to be finicky and sometimes drop off the network I wanted to create a fallback rule that if the Xiaomi sensor stops working, it will just operate the dehumidifier at timed intervals. Is there a trigger for a device dropping off or rejoining the network?

I create a Deadman switch that restarts a timer every time a temp sensor reports. If I timeout i turn off the Deadman switch. I then use that switch as the no report trigger.

Welcome to the Hubitat Community!

I assume you are in Toronto with a user name like that. I am too. Head to IKEA and pickup some Trådfri Outlets. They will keep the Xiaomi Mijia and Aqara devices stable and you won't have to worry about them dropping. My house is about 1200 sq/ft and I have two outlets and one of their dedicated repeaters in the basement. Since adding them in November of last year, I have had zero drops from the network.

You can even use the outlet to cycle the humidifier. They can handle it. Then you'll solve two problems at once.

I actually have some Tradfri outlets as I'm already using them to trigger air conditioners. For some reason I wasn't able to get the Xaomi sensors to pair when holding them close to the Tradfri outlets. I tried for like 15 minutes with no result. The second I brought the sensor near the HE it picked right up so I'm assuming it's running off the HE. So far 2 days and no drops so far.

edit: And, no I'm not from Toronto. That's actually my last name lol. Just edited it.

1 Like

It's very difficult to determine without an Xbee to map your network. I have one, and can see my devices routing through them. They most likely are now routing through them. Zigbee is dynamic and will constantly adjust its routes to find the best path back to the hub. It does take time. In fact, the average time is 2 days before it stabilizes :grin:

I create a Deadman switch that restarts a timer every time a temp sensor reports. If I timeout i turn off the Deadman switch. I then use that switch as the no report trigger.

That's an interesting idea but it seems the Xaomi sensor doesn't report unless there's a significant change in environmental conditions.

What is the max amount of time you want it to run unsupervised for? That is what I set mine to.

I guess an hour to be safe. Actually this may be a better idea. Could I set up a rule that if there's no change for at least 2 hours it runs for 30 mins?

do you still want humidity control?

Well yeah that's what I'm attempting here. Before I had it running off a heavy duty lamp timer set to run it for 30 minutes ever 2 hours but I found that it was running needlessly. As far why I'm not using it's built in humidity controls they're really inaccurate, since it's only seeing the air directly around it causing it to shut off early, and then kick back shortly thereafter due to the moisture on the evaporator.


Remove the nighttime heater control and replace the operating state with humidity sensor> target humidity.