Smart Home Motion Detecting Alarm
In this tutorial we will be going over how to make a security motion detector that can send you push notifications whenever you smart home motion detector is triggered.
Image of PIR in Case
- Account at Wia
You will need to be registered and /or logged in to your Wia account at https://www.wia.io/.
- Set up your Dot One
You will need to have a set up Dot One and you can find the tutorial on how to do that Here.
- Set up your code project
Now you will need to create a space and then a code project on your Wia Dashboard
Connecting the components
Insert the PIR Motion Detector module on top of the Wia Dot One. Take care to connect the module pointing in the correct direction as shown on the picture below. You will notice that the rounded corners of the boards correspond to each other when inserted correctly.
Setting up Block Project
- For this project we will be using block projects to set up our Motion Detector on the Wia Dashboard.
- To start off go to your dashboard, open a space and create a block.
- Go to the Comms tab and drag the block Connect to WiFi onto your workspace.
- In the Logic tab you will find an If/Do block. This allows us to express a condition. Drag this block and connect it underneath your WiFi block.
- Open Wia > Modules and drag the block Motion Detected onto your diagram. Connect it to the right side of the [If] word.
- Now in Wia > Cloud drag the Create Event block and connect it just right of the Do word.
- Then change the event name from "my-event" to "security-alert". Complete!
- Your block diagram should look something like Figure 4.
Setting up the Flows
- On your Wia Dashboard go to the flows tab and create a new flow.
- Go to the trigger tab and drag a node Event Created into the workspace and change the name of the event to the name you set in the code (Motion Detected) and select your Dot One from the list.
- Next go to the Action tab and under Wia select Notification and you can choose if you want all users in your space to receive the notification or specific ones as well as what you would like the notification to say.
- Then connect the two nodes, turn on the flow, and your device is set up!
Congratulations and Well Done on completing the tutorial , hope you enjoyed it.
Here's another to keep you entertained -
Get the beer of the day to display on your TFT screen
If you are more into building and making your own electronic devices and hooking them up to the cloud , why not out some of these tutorials
Coffee Counter with TFT Screen and Button
Slack Toggle Presence with Wia Button Module and Dot One
or build something from our hackster projects
Wia Hackster Projects