Ble Door/window Alerts

About the project

Get notified if your doors or windows are left open. Using 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 sensor Shelly BLU Door/Window sensor x 1
Particle Photon 2 Particle Photon 2 x 1

Software apps and online services

Pushbullet Pushbullet

Story

This new project utilizes Shelly BLU Door/Window sensors to alert users when a door or window is left open. It is based on the BLE Door/Window Monitor project illustrated here.

How it works

There are two FSMs (Finite State Machines) that monitor the status of two sensors, in this case, a front and a back door.

When the door is left open for more than 2 minutes, the user receives a notification via Pushbullet.

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.

Configure the sensors as indicated on the previous project.

BTHome

BTHome is an open standard for broadcasting sensor data and button presses over Bluetooth LE.

BTHome is an energy efficient but flexible BLE format for devices to broadcast their sensor data and button presses. Devices can run over a year on a single battery. It allows data encryption and is supported by popular home automation platforms, like Home Assistant, out of the box.

For visiting the BTHome website, click here.

Pushbullet

Create a Particle webhook with the following shape and form:

The channel tag is provided by Pushbullet and you can read more on this project.

Alerts alternatives

Pushbullet is just one of many alternatives. Particle Webhooks allow you to connect these alerts to almost any cloud service or server you can imagine.

Here are some options on the Particle console integrations:

If what you need is not in the list, you can use a Custom Webhook to add it. For recording times, you can send this information to services like Google Sheets, Ubidots, Blynk, AirTable, or Firebase, to name a few. This can be achieved by creating two webhooks.

Notifications

Here's how the notifications look like in action:

Phone notifications

Phone notifications

Phone notifications

Browser notifications

Browser notifications

Browser notifications

Future improvements
  • low battery notification
  • sensor not seen in the last 30 minutes notification

Can you think of anything else? Leave a comment below.

Code

Github

Credits

Photo of gusgonnet

gusgonnet

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

   

Leave your feedback...