Software apps and online services
In summer I many times forget to close the garage door. Sometimes my neighbours call me, sometimes the garage is opened all night. To solve this issue I've added battery operated wireless sensor to the garage. On my computer with Node-RED I configured Blynk notification to my phone at 8pm in case, the doors are still opened. The door sensor is using magnetic reed contact.
I use also button with Button Module, this is optional, but with that you can receive also events when you press the button or even long-press the button.
Some magnetic contacts needs to have magnet rotated correctly. Make sure the contact works right before you connect it to the Sensor Module.
Connect all 3 modules together. You can also use Cover Module and download and print enclosure for your kit from Github. Don't put the batteries inside yet.
The magnetic contact connects to the Sensor Module. Use screw terminals and put one wire to contact A and the other to GND. It does not matter which wire connects to which terminal, you can swap them.
On the pictures I use older 4 pin Sensor Module and also 3 pin pin header because I run out of 4 pin connectors. So don't be confused by that.Step 2: Flash Firmware
- Connect Core Module to your PC and wait until the FTDI driver is installed
- Run the HARDWARIO Playground
- Go to the Firmware tab and choose bcf-radio-door-sensor firmware
- Choose the correct serial COM port and press "FLASH FIRMWARE" button
- After flashing, the Core Module will turn on red LED for 2 seconds
The Radio Dongle comes pre-flashed and is not necessary to flash it. If you like to flash it, disconnect the Core Module, connect Radio Dongle and flash it with bcf-gateway-usb-dongle firmwareStep 3: Pair Node
You have to pair the wireless Core Module with Radio Dongle in your computer.
- Connect Radio Dongle to your computer
- In HARDWARIO Playground go to Devices tab
- Choose the connected Radio Dongle from the list and click Connect
- Click Start pairing button
- Make sure Core Module is disconnected from USB, now insert the batteries
- The device will appear in the table
- Don't forget to stop pairing by clicking Stop pairing
First we start with Blynk. Install it to your Android or iPhone and create an account. Then follow the steps in the comments of the pictures below. Just rename the project from "Postman" to "Garage" so it makes sense for this project.
Do not forget to press PLAY button at the end.
Open Node-RED in the Playground or Raspberry Pi and import the flow from this link In the Menu > Import > Clipboard.
Then double-click on the green "notify" Blynk node and configure the key by clicking the pencil icon in the Connection settings
Set the URL and secret Blynk token from your email
Do not forget to hit "Deploy" in the top right corner to apply the changes.
The door sensor sends its state when the contact changes its value, or every hour. Make sure you receive at least one message in the Playground to the Node-RED, so the flow knows the current state of the door.
The flow is set to notify you at 20:00 (8pm) every day if the doors are opened. But to verify its function now, you can open/close your door and force the inject node "flow.door_closed" to trigger now by clicking on the square button on the left side of that node. If the doors are opened you should receive a notification on your phone.