Window Open / Closed Contact Sensors

One thing I sometimes wish I’d hard-wired for before plastering the House is contact sensors to report the open / closed state of the (openable) windows – mostly so that the automations which close the roller blinds can be ‘blocked’ if a window is open. The sensors could also provide a useful confirmation that the building is secure when nobody is home. (There are already sensors as part of the intruder alarm system, but those respond to ‘shock’ impact from any attempt to force open windows or doors and do not report open / closed status.)

The workaround is to fall back to battery-powered radio-connected sensors. While I’m not generally a fan of battery-powered devices, they’re OK for non-critical uses like this – especially when they provide accurate reporting of battery status so battery failure can be predicted (or at least reported).

From a brief trial of one IKEA MYGGBETT door / windows sensor I’m happy those will work well enough to invest in a few more of them:

  • They are powered by a single AAA battery and specifically recommend rechargeable batteries (such as the IKEA LADDA)
  • They use Matter over Thread for communications and management and so integrate very nicely with Home Assistant – especially since I’ve got a working Matter over Thread ecosystem in both the Outbuildings and the House
  • They’re fairly compact – given they have to accommodate a AAA battery
  • They’re competitively priced; £7 each in 2026 (although that seems slightly expensive compared to £5 for a TIMMERFLOTTE temperature & humidity sensor) – whereas similar devices from other brands tend to be £20 or more
    • That price does not include the battery, which is another £1 (actually £4 for a pack of 4)
  • They report battery status both as a voltage and as “percent charged” figure (to the nearest 1%)

On the tilt-and-turn windows it’s best to mount the sensors at the top, so they report ‘open’ no matter whether the window is tilted back or hinged open (like a door).

IKEA MYGGBETT door and window sensor mounted at the top of a tilt-and-turn window

These MYGGBETT sensors have a unique Matter ID printed along one side and I elected to mount them so that remains visible. There’s also a printed QR code used for commissioning but that’s only visible when the sensor is unclipped from its backplate.

If I was doing this again, I would at least install the wiring for hard-wired sensors – which would mean checking which windows have opening sections (about half of them) and whereabouts on the opening windows the sensor would be located. I would wire them with 4-core ‘alarm’ cable back to a central point, with the plan to connect them to a KNX binary input module – something like the MDT BE-16000.02 Binary Input Module for Potential-Free Contacts. Note that costs £200 for 16 channels, i.e. £12.50 per input. In addition, there would be the cost of the cable (roughly £1 for a 5m run) and the magnetic / reed-switch sensor itself (about £2 each for a basic ‘Grade 1’ sensor) which works out at about £16 per window (assuming a 7.5m cable run) so actually the battery-powered sensors are roughly half the price – but need ongoing attention to their batteries. (Arguably a proportion of the cost of the Thread Border Router required to receive the Matter over Thread signals should be included in the cost of the battery-powered sensors, but that was only £35 and covers all other Matter over Thread devices too.)

Timelapse Video showing the Construction of the Outbuildings

10 years ago I created a couple of time-lapse videos showing the construction of the House, from different vantage points, and it seemed like a good idea to do the same for the Outbuildings – especially because the House provided a convenient place to mount a camera (which would also play a role long-term delivering security footage of the courtyard). I briefly considered doing something more advanced with a camera drone flying a pre-defined circuit on a regular basis, which could have provided a more complete 360-degree view, but that seemed more complex than I wanted to get into for a fairly conventional building.

One challenge was that the vantage point on the second floor of the House was too close to the Outbuildings for the focal length of camera I was using, so its field of view only captured the southern half of the Outbuildings – but that was still enough to give a good indication of the build progress. (There are some parts of the time-lapse when nothing seems to be changing – but that’s because work was happening out-of-shot.) I did a better job of choosing the angle of the camera on its mounting bracket than for the House, just fitting in all of the roof.

The video creation procedure was the same as I used for the House: hourly snapshots grabbed from a UniFi video camera and saved as JPEG files (by a cron job running on a Raspberry Pi) with some extra logic to exclude the night-time images (small files, because they’re nearly all black and compress to a small size) and then filtered to remove the weekends when no building work was happening. The separate JPEG files were then used to generate an MPEG video using the ffmpeg utility. There’s more information about this procedure in the UniFi Video Camera Time-Lapse Video page.

I’ve had the JPEG files sitting on a computer for ages and finally got around to deciding what range of dates to include – given that the last few weeks of the build were all happening either inside or to the north of the site, out of shot – and uploading the video to YouTube.

Time-lapse video showing the construction of the Outbuildings