Making legacy mailboxes smarter with Arduino IoT Cloud platform and IFTTT.
Less than a year ago, I started to look forward 3D printing and Arduino, wondering how to create useful things with the little knowledge I had, and also, serverless, I mean only by relying on SaaS services so I can only focus on my part and deploy production ready services.Idea genesis
On a regular basis they create campaigns on specific customer centric topics : people post and score ideas, finally a community is built thanks to gamification.
This platform is a real goldmine of ideas for makers, what if we put some alchemy?
One the topic that was the best scored was the use case of what we call here the "BP" (the postal box) : these are remote boxes from your home where the Postman drops your letters. Unfortunately, for now, you are not told that you have to come grab it... so most of the time you come from nothing...or too late.
The use case was pretty simple enough for me to put that goal for me, and start to design a prototype.
Two main possibilities for me:
- Create a dedicated endpoint, as described in this gist, the drawback is that it requires specific backends to be implemented and deployed.
- Develop (and learn) something new (and cool!) where the end user is free to get notified the way he likes on any hardware, even at home, on his own hardware.
Pitch is much better than any explanations, so here we go:High-low tech
I love high-low tech, so here we go for the parts of the prototype:
- Arduino MKR1000 which has native and secured WiFi (thanks to a chip with SSL/TLS hardware support) support (everyone has WiFi around him and in enterprise), for less than 40 USD.
An ultrasound sensor so I can detect incoming objects: I used HC-SR04 (less than 10 USD).
- I took inspiration from Nintendo Labs approach and used a dummy cardboard to simulate the physical mailbox, the "BP:" the Postal Box.
- IFTT Maker Platform that embeds incoming webhooks to trigger and build complex notification workflows within a very few clicks.
- The best part: Arduino IoT Cloud, still in beta but yet very very powerful (I mean powerful and simple), powered by Amazon AWS.
The main concept is that you can hack any existing mailbox: no need to spend time and money on casing.The algorithm
It's pretty straightforward as I wanted to release my MVP as soon as possible. So, here is the actual algorithm:
- Watch if "I" see something nearer than a given distance
- If YES: increment the deliveries counter, blink the embedded led a very few seconds while waiting for the postman to finish his delivery then restart watching
- If NO: continue watching
Notice that the postman has no additional task during delivery process, this is a very important part of the improvement.
Get your letter process (the end user part):
- Open the box
- Get the items
- Close the box
- Push the button to reset the IoT (that could also be done remotely from the web through an acknowledge variable)
Finally here is the list of properties:
These screens are responsive so you can browse your data from your phone, too. To start no need to code an app': just sign in with you Google account:Pushing the data from your object to the cloud
Next, just by locally updating your variable, Arduino IoT does the job to push (just wait, no need to refesh, the event is pushed, not polled) it so you just have to literally watch it being updated from the web:Trigger action on your favorites cloud services
Therefore I'll rely on IFTTT maker that allows me to trigger actions on a webhook call... and fortunately Arduino IoT allows this, check the Webhook section:
In my case,
I want to get a text so I just even not need 4G nor smartphone to get notified.
... but you also could have sent a texto and push a Task to Evernote, todoist, Trello or any task manager. This part is your part, you can customize your own workflow according to your needs. It will be hard to make something more flexible. By the way, give a try to todoist, it's really great to achieve tasks. ;-p
Oh, and wait, all these services are for free!Demo!
Now, the best part, the demo to see how all this stuff is seamless working together:Resources