Tuya Zigbee Window Sensors

A photo of a Zigbee window sensor

I recently picked up a pair of these Tuya Zigbee Window Sensors from AliExpress. At £7.50 for two (plus VAT and shipping), they’re an absolute bargain; on Amazon (sponsored link), expect to pay more than double that for just one. The sensors detect when a window or door is opened or closed, and can both report the current status of the window or door, and be used to trigger actions when the window or door is opened or closed.

Wait, didn’t you rant about Tuya in February?

Why yes, I did rant about Tuya Wi-Fi devices, and I stand by what I wrote. However, you can get many Tuya-compatible Zigbee devices, which can be used with Zigbee2MQTT without having all your data go to servers operated by a Chinese company. So yes, I wouldn’t be keen to buy any new Tuya Wi-Fi devices in future, but I see little issue with Tuya Zigbee devices.

Installing the window sensors

The sensors come in two parts. One holds the batteries (two AAA batteries, not included) along with the circuitry, and the other, smaller part is what detects whether the door or window has opened. Each part comes with an appropriately sized piece of sticky foam, so you can just stick the small part to your window, and the larger part to the frame. You need to ensure that, when closed, the two parts touch.

To test whether they work, open and close the window or door – if you see a little red light flashing when this happens, then you’re good.

Zigbee devices need to be paired to your Zigbee mesh network. Once you’ve enabled pairing on your Zigbee controller (in my case, Zigbee2MQTT), you need to press and hold the reset button on the window sensor for five seconds. It comes with a little metal pointy thing to help with this – a bit like the pointy things for ejecting SIM cards on a iPhone. Once it has joined your network, you should be good to go.

Using the window sensors with Home Assistant

Any new devices in Zigbee2MQTT automagically appear as new MQTT devices in Home Assistant. Right now, I just have dashboard badges for the two window sensors, so I can see at a glance whether those windows are open. I’m planning to add an automation which switches the heating off when one or both of the windows are open, and potentially a notification at bedtime to remind me if I’ve left a window open as it’s getting dark.

You could add them to a door, so that when you open it, a light comes on, and then turns off when the door is closed, or after a certain time delay.

For now, I’ve only bought two of these. As mentioned, each one requires a pair of AAA batteries, and whilst I could fit them to every opening window, that’s potentially a lot of batteries to replace. At least they take standard AAA batteries which can be easily recharged. I’ve only had them a couple of weeks, and so I can’t yet give an estimate of how long the batteries will last, but they’re both still showing 100%.