This is a simple example of how to use Particle Cloud events to send push notifications to your phone with the help of Porter. The button-notifier code is a stripped down version of the "
9_ReleaseFirmware.cpp" example included in the
If you flash it to your Internet Button, the button will publish an event to the Particle Cloud when any one of the four buttons is pushed. This event is named "
push" and the data is the number of the button that was pushed.
To get a push notification, you first need to configure a Porter Action triggered by the event to send an appropriate message.
Then, make sure that the Porter 2 app is installed on your phone and you're signed in to your Porter 2 account in the app.
If so, every time someone pushed your Internet Button you'll get a notification on your phone. Remember, you can also configure the action to deliver an email (especially useful if you want to notify someone who isn't you), or even make a web request.
Did you replicate this project? Share it!I made one
Love this project? Think it could be improved? Tell us what you think!