I wanted to make it easy for me to go home when I forget my keys somewhere. So I created this simple solution. I just choose my key code in Node-Red and I can get home even when I don't have the keys, Everything is wireless and runs on batteries thanks to the HARDWARIO IoT Kit low power integration.
1. Get all hardware togetherYou will need two core modules, one for the terminal and the second one for controlling electric lock. Optionally you can do it with only one Core Module, but that would lower the security part a lot.
Prepare everything you will need on your table, plug you Radio Dongle into your Raspberry Pi or into any computer that you have.
Connect Core Module with your Battery Module. In my project, I used 4x4 Matrix keyboard, but you can use bigger or smaller if you want, the only thing that matters is where you connect the pins of the keyboard to pins on Core Module. I used P1-P9 where the First pin of keyboard is on P9 and last is on P2.
For more information about all the modules, you can visit Documentation.
Your second device with the relay module is basically the same. Just put your relay module on top of Core Module and don't include the keyboard.
2. Flash firmware- Download HARDWARIO Playground.
- You can see documentation page on how to flash the firmware with HARDWARIO Playground.
- You will need the bcf-radio-key-code firmware for this project.
You need to pair the Core module with the Radio dongle that you are using, follow the instructions below to see how it is done.
The same thing will go if you are using a Raspberry Pi as a server, just access the Raspberry through the IP address instead of the Playground
- Connect your USB Radio Dongle to your computer.
- Open HARDWARIO Playground
- Click Start Pairing the LED on the dongle should start blinking
- Connect the device that you want to pair into your computer or insert the batteries.
- Wait for the device to appear in the table
- It should add the device with the Alias: code-terminal:0
- Click Stop Pairing
After you did all this you can unplug the device from the computer and insert the batteries, it will run on them without a problem. Next steps will be done on the computer, so you can leave the device and focus on the Playground.
4. Import functionOpen Node-RED in Playground(Functions tab) or on your Raspberry Pi and import this simple function. Just copy everything, go to Menu -> Import -> Clipboard and paste it there.
After Import hit Deploy in the top right corner to upload the change.
5. CustomizeTo change your code just open Code Check block and on the first line you will see "\"123\"", just change the numbers to whatever you can Input on your keyboard.
Every other code will be rejected.
Next thing you can customize is the duration for how long will the relay be turned on. In the same block change 1000 in "duration":1000 to any value you want (in milliseconds).
SummaryThis is just one possible use case for this solution. You can add camera photo of anyone who tries to get to your house, or give a delivery guy your code and let him put your delivery behind the first door so it is safe inside and nobody can steal it.
Or you can have this system for opening completely different things.
Why not make some escape game for your friends with ciphers and codes all over the place.
I will be happy to answer questions and I am looking forward to some suggestions for improvement, or ideas on how to use this solution.
- Visit HARDWARIO page on hackster.io for more interesting projects or go directly to their website
- Go to HARDWARIO documentation to learn more about their modules and other possibilities of the platform.
- Try more firmware from HARDWARIO Playground or write your own, it is easy to start.
- Because everything is Open source you can get all firmware on GitHub, get some inspiration and try to make your own applications.
- Get your own HARDWARIO Hub to replace your computer in this project so you have always access to your applications.
- Check out more applications that can be used with HARDWARIO IoT Kit in Integrations section.harardwahard
Comments
Please log in or sign up to comment.