Gateway app IP Camera snapshots

Wouldn’t it be cool to take a snapshot of your driveway when the garage is opening, or a snapshot of the mailbox when someone opens it, or a front door image when someone rings your door bell?

If you have an IP Camera on your home network, it most likely has an HTTP endpoint which can serve a static snapshot on demand.

There is now support for a variety of such events in the Gateway app. I’ve added some examples for the doorbell when it RINGs, mailbox and motion motes when they report MOTION, and garage mote when it OPENs. The snapshots get attached to an email that is sent to yourself, so you instantly get an image of the event. Here is a sample email received when my mailbox¬†(essentially a MotionMote) reports motion:

It’s the mail delivery so no issues:

In my case this camera mainly monitors the driveway, so I can have my GarageMote also send me an email when the garage is opened, here’s a sample:

This changeset includes a new setting called ipcam_snapURL¬†that is overriden in the nodes which have such snapshot events. That way different nodes can request snapshots from different IP cameras. Otherwise the value is inherited from the general settings. If you merge this changeset locally, don’t forget to change the IP camera URL in the general settings, which should correspond to your IP camera’s snapshot URL – this should return an image, not a webpage or text/html page, or the attachment will be corrupted. Then, all nodes that override (ie inherit) this setting will display it in the node settings, where you can customize it for that node.

Here is a look at a sample mailbox node which includes the new event and URL setting:

And here’s the event and setting for the garage node:

You can mix and match to create other events based on the given samples. If you create your own variants, I recommend using the userMetrics folder to add new custom code, so the main app files remain unchanged and thus upgrading to new releases is easier in the future. Enjoy!