Ble Door/window Monitor

About the project

Monitor your doors and windows with a Shelly low-power BLE sensor, combined with a Particle Photon 2.

Project info

Difficulty: Moderate

Platforms: Particle

Estimated time: 2 hours

License: MIT license (MIT)

Items used in this project

Hardware components

Shelly BLU Door/Window Shelly BLU Door/Window x 1
Particle Photon 2 Particle Photon 2 x 1

Story

This project reads the Bluetooth advertisements from the Shelly BLU Door/Window sensor using a Particle Photon 2.

These sensors can be used with a Particle Argon, Boron, or Monitor One. In fact, any Particle device with BLE will work.


Shelly BLU Door/Window sensor

This sensor detects and reports the opening or closing of doors and windows, measures tilt angle, and monitors luminosity. It advertises this data in the BTHome format.

For this project the Shelly sensors were configured with the Beacon mode on. In this mode the device broadcasts the current open/closed state, illuminance, and battery status every 30 seconds.

It is suggested to update the Shelly devices to the latest firmware with the Shelly app.

In case of trouble one can use the Shelly debug app.

More technical information here.

Particle Photon 2

This powerful Wi-Fi microcontroller from Particle continuously scans for nearby Shelly sensors.

For the longest range, add an external BLE antenna (and enable it in the code).

Code

The Particle beacon-scanner library was updated as part of this project to detect BTHome devices.

The minimal code to scan and get information from these devices is on GitHub.

Here's the output of a couple of sensors detected by the Photon 2:

0000387525 [app] INFO: Scanning...
0000388560 [app] INFO: Scanning...
0000389600 [app] INFO: BTHome Address: B0:C7:DE:2C:44:45, Battery: 100, Button: 0, Window: 0, Rotation: 0
0000389625 [app] INFO: BTHome Address: B0:C7:DE:61:51:52, Battery: 100, Button: 0, Window: 0, Rotation: 0
0000389651 [app] INFO: Scanning...
0000390689 [app] INFO: Scanning...

Usage Examples

You can use this setup to monitor various points of entry in your home, e.g., front doors, windows, and garage doors.

Code

Github

Credits

Photo of gusgonnet

gusgonnet

If you need professional help with a project, contact me at gusgonnet@gmail.com

   

Leave your feedback...