Human Objective:
Since this is adoorbell - the idea is that it should feel and act like a door bell. Pushingthe button would light the LED light. When pushed or released the light changesstate to indicate the button does something. Remember we are targeting anunknown member of general public here.
Imagine you haveyour headphones on or you are in the back patio working and delivery withrequired signature is being made, a door bell is rang…do you know about it?What if you are not home?
Couple things to set expectations before we start:
- This is an concept design. This should be a great starting point to give you the model to build your own much better project from
- This project can benefit from 3D printed casing to be mounted into to resemble actual doorbell
- If you can notice the project is missing a Relay componentry necessary to activate your real doorbell, because that is more complex and much more dangerous adaptation of your existing home electrical system, we will follow up on that with more research in another post next time
- Originally I planned to add a USB camera and while the capture works the process would complicated the 101 intent of this version, so we will follow up on this concept with a more feature rich app in next project
Major Components of this project are:
- Doorbell App - running on the RaspPi 2 this is a Universal Windows Platform App.
- Doorbell Client App - Universal Windows Platform App.
- NOTE: You will need a Windows 10 device for Windows 10 IoT core development; the project also would run on Windows 10 Mobile - where it is much more useful when outside the home.
Project Services Costs - few things about Store Apps and Azure Push Notification hubs:
- While you likely need at least a Trial account of Microsoft Azure. Do understand that this trial does require a method of payment to be on file so do take note of your usage if you turn on other features that cause consumption. Basic free tier of Notification Hub usage limit is 1,000,000 transactions so knock yourself out hitting that button :)
- You will also need a Windows Store Developer Account, if you do not already have one. This is because Azure Notification hubs wants to have known end points sending and subscribing to your service. The cost ranges from $20 for an Indie developer to $100 for an organization, per year.
Learning path - Sources & References used:
- Push Button Sample Project from Microsoft
- Getting Push Notifications to work with UWP By Mike Tualtys
It is important forthe developer to follow both samples to understand the methods involved. Thewiring diagram we use is the exact one from Pushbutton Sample Project fromMicrosoft. I built the ClientApp based on the Mike Tualtys samples code.
Hardware Steps:
- Wire up the Pi and the button with LED and resistor just like the Push Button Sample from Microsoft
Software Steps
- Once you understand the Push Notification sample, you will need your Azure Notification hub access keys
- Update the sample projects with your own keys
- Run the Client App and test that the keys worked by using
- Find and Pin the App in your Start menu
- Deploy the IoT Doorbell modified Push Button App code the Pi
- Push the button
- Get Notifications
- Toast
- Tile
Here are some imagesof what your project should look like:
Enjoy and let meknow in the comments where I can improve!
NOTE: At the time of writing we are still waiting on the final Nuget package from Microsoft for Azure Push Notifications that works on UAP for Windows 10 Iot Core. That means no Bummer! Stay tuned!
Notification Client App MainPage
Push Button MainPage code
Comments