The dash buttons are incredibly powerful -- a $5 button that after a bit of hacking can be used as a trigger for anything on the internet. We saw this power and set to work on Notifi. Lets use tech for good.
Want to make a panic button for when your elderly parents fall over? No problem, get a text and notification whenever the button is pressed.
Want 3 different buttons to ask for help from various devs at work? Cool, register them, enter custom messages and anyone can listen to you.
How I built it
Inside an AWS VPC, with an API gateway to access two Lambda cloud functions:
- notification producer registration - Python
- dash button press router - Python
State is stored on a Redis server running on EC2.
notifi.click is built on EC2 using Caddy for managed TLS (LetsEncrypt) and Websocket proxying (exposing API.notify.click as a secure Websocket endpoint)
Notification producer side
Our dash ARP request interceptions are built using pcap, we intercept the requests and; using socket.io and Express, communicate with a local web app.
The local web app then sends requests to our AWS API gateway which routes them to the previous mentioned Lambdas.
Notification consumer side
This is what you see on notifi.click, using socket.io we communicate between the front and back end, sending notifications when a message is sent.
Challenges I ran into
Dash buttons require you to be on the same subnet to intercept requests, we had to make an impromptu wifi network using a variety of terrible, terrible hacks.
Accomplishments that I'm proud of
It actually works! We've made an abstract product that can use any number of dash buttons to send custom messages, any number of people can listen to these messages, either through our SSL secured web app or through text notifications thanks to Twilio.
What's next for notifi.click
Rewrite the core code to be more maintainable and more readable, package it in a nice node module and send it out to the world.