Motion Activated Pumpkin Push Notification

Hey guys! One day left to make something Sparkified for Halloween! I pulled this together to jam into a Pumpkin to let me know when the Trick or Treaters arrive.

What it does:

The Spark Core monitors a PIR motion sensor and when activated sends a customizable Title and Message to a PHP script that sits on your Web Host, this PHP script then forwards the Title and Message to Pushover.net’s API securely via HTTPS. The Title and Message is then sent from Pushover.net as a Push Notification to your phone. The system can be remotely enabled or disabled with an ON/OFF Spark function call via a simple web app like this one. By default it’s enabled though, so the ON/OFF web app is not required.

https://github.com/technobly/SparkCore-PumpkinPush

I’ll add more pictures when I get them! EDIT: Video added below! So far it’s just a Spark Core and PIR sensor on a breadboard. If you have a Pebble watch you can get extra fancy and see the Push Notification right on your watch:

http://www.imgur.com/2AIx6b9

http://www.imgur.com/GeODiSp

6 Likes

Nice!

I tried to use some tech this Halloween this year also. My daughter had Neopixel’s in her Astronaut costume which looked cool. And we added a 8 Neopixel strip to the pumpkin this year so it looks like its throwing up the rainbow of colors.

I like how it alerts you that the kids are at your door. This would be super easy to do with Ubidots also.

I changed to using pushover for my doorbell recently, it works really well with only a 2 second delay. I had been using Pushingbox but the delay made it pretty much useless as a doorbell.

Its interesting your pebble says Pushover at the top then pumpkin: Trick or treat. mine has the Pushover replaced with the title and the smaller font is just the message

1 Like

Oh that’s interesting @Hootie81 I was hoping to be able to change the pushover title with the api’s title but it didn’t work like that for me. Is the code for your doorbell similar to my pumpkin code? I wonder what could be different.

BTW: All of this will be much easier to do with webhooks and I’ll work up a conversion for this project when I finally get a chance to play with beta webhooks.

I used a php class for pushover by kryap. Have a look for his git hub page. As I couldn’t get the title or body working properly. Actually I don’t think I got it to work at all

I’m using a Webhook to call the page on my php server. It defeats the purpose of the Webhook I know, but it’s much more reliable than tcp. I think i add some security by checking my spark user ID and core ID and the event name has to match as well. The time is set from the event time too.

I have the server set up for the message torch to retrieve messages from a database using webhooks too.

Once I can get the forum page to load on my laptop I’ll post some working code… discourse is getting slower by the day for some reason… 3hrs so far

@Hootie81 I tried everything I could think of to overwrite the Pushover text with the title parameter and nothing has worked. I updated the iOS app, tried adding more parameters, inspected that php script you are using, and used Hurl.it to no avail. Even the Pushover API screenshots don’t show that it gets overwritten: https://pushover.net/api#messages

I did upload a video though in the first post… might be somewhat interesting :wink:

What have you named the ‘application’ on pushover? That might be the main title I think

just to show you how it looks on mine

I have one named PHP Proxy and another named Hurl.it

Basically if you don’t send the “title” parameter, the title will show up as the Application name. For example I’ll use the registered “Hurl.it” Application on pushover to send a push notification without the title… This is exactly how the API says things should work… so I’m super jelly of yours :slight_smile:

Very cool. I did something similar to this, only it was hacky as all get out ($20 driveway ‘wireless’ sensors triggering a prowl notification on a Beaglebone). I should revisit w/ my Spark now. Also as Prowl is iOS only I will look at Pushover.

Also it was fun to see how many visitors you had on Halloween, right? I couldn’t be home that night but it was funny getting notifications a couple times a minute sometimes…

@BDub Dude how you keep your Pebble free from scratches all over the screen? I have the pebble steel with Gorilla Glass and it didn’t take long to get a few pits in the glass somehow. The first pebble steel they sent me has a scratch in the gorilla glass but they did take that one back.

I was really tempted to get the Motorola 360 watch but couldn’t accept the fact that it would need to be recharged every day and the screen would only come on when I wanted to view the time.

Hah! yeah I’m amazed because I bump this watch into stuff all of the time and it’s fine! The band is pretty fragile too and if you snag it good on something the pin just gives way and off comes the watch. This happened to me last month at an industrial music concert… and the watch got stepped on, on top of a concrete floor with lots of nasty stuff all over it. It looked like it got scuffed pretty bad at that point, but later it wiped right off. The pictures above are after all of that! It’s funny you bring this up tonight… because I JUST scraped it on the edge of an open door as I reached up into the pantry to grab some Cheese-its … and now it’s got a tiny little scratch. -_- Luckily it’s kind of off to the side. So it took 6 months of wearing it every single day to get one tiny scratch. Not bad I guess. Check out the Drunk O’ Clock watch face… My latest fave.

Yea same here, I have 4 pits in the glass at the top of the LCD where its usually black so it doesn’t bother me too much but I know its there. I kinda feel like now that the pits are there its no longer perfect and has some wear and tear and thats just how it going to be.

But I still want to buy another watch just to see how long I can really go without the gorilla glass taking on a scratch or some sort of pitting. It seems like the gorilla glass they are using is not quite as tuff as the glass on my Motorola Droid Maxx cause it doesn’t scratch at all it seems.

The scratch on the white watch is a good reason to upgrade to the Pebble Steel with its new lowered $200 price tag. Its really a much nicer watch and the gorilla glass makes the LCD screen much clearer when looking at it for different angles than the plastic watch face on the regular Pebble.

I bought one of these silicone watch bands and really like it. http://www.richardtracybrand.com/collections/frontpage/products/shank-for-pebble-steel

The watch is awesome, something I use all day every day. I love sending messages to it from Ubidots based on data its receiving from the Spark Core.

I feel like I’m living in the 21st century when I get this message on my wrist watch telling me my MtDew is now a slushy and perfect to drink. Could easily be a ice cold beer instead. :smile:

1 Like

Hi @BDub!

We just made a project inspired in this one: http://blog.ubidots.com/a-presence-detector-and-led-matrix-with-spark-core`

Once the PIR sensor detects movement, the LED matrix displays a face in the LED matrix and sends a “1” to Ubidots.

Then you can setup an SMS alert when the variable “Presence” is = to “1”

@Hootie81 instead of an SMS alert, you could also make a URL request, allowing for more elaborate mashups with other services.

2 Likes