Android - Take photo if alarm activated


(Matt) #1

Hello all,

I am attempting to create a setup similar to the Home Automation Dashboard with a wall mounted android phone. I have it setup to activate the screen when motion is detected to access the Action Dashboard but I would like it to take photos when motion is detected but only when the system is armed/away. I assume this is possible using some system of apps including tasker & IFTTT but I can’t put my finger on it.

Here’s what I have:

  • Wall mounted Android phone (running 4.4.2) with no phone service, only WIFI.
  • ST App
  • Tasker
  • Motion Detector
  • IFTTT

TL:DR - I’m trying to make a homemade dropcam from an old android phone.


(Alex) #2

Here’s how I would do it:

  • When motion is detected, take a picture.
  • Trigger a Tasker action to ping a SmartApp with endpoint to tell you whether you are armed/away.
  • If the endpoint tells you that you are not armed/away then discard the picture.
  • Else do something with the picture.

I would take the picture before anything else in order to avoid latency. If your WiFi or ST is down or it’s taking too long, you could lose the chance to take that picture.


(Matt) #3

Good points, especially regarding the latency. IFTTT is pretty slow to respond in general. I’ll look in to how to go about having tasker check a smart apps endpoint, I haven’t dove that deep yet. Thanks.


(Matt) #4

So I came up if with a solution using a very different method. I call this my poor man’s dropcam.

  1. From the ST (smart alarm) app, when the alarm is activated it texts the phones’ Google voice number.

  2. Google voice automatically forwards all texts as emails. This is a Google voice setting.

  3. The phone uses K9 email app to receive the email.

  4. Tasker monitors incoming mail for the word “alarm” in the subject from the K9 plugin.

  5. When the keyword is detected it loads my video recording app. The app records a 2 minute date stamped video.

  6. It stores the video in a folder which is instantly uploaded to my Google drive folder.

That’s it! The best part is the phone does this all without making any sound, while the screen is still off. And if the phone is interrupted during recording it immediately saves what it’s already recorded.

It also does this surprisingly fast for relying on email. I set the K9 app to poll every minute top speed it up as much as possible.

Apps:
Google voice
K9 email
Video Reg (paid)
Tasker

If someone could write a smart app that would notify tasker that would open up a world of possibilities. I’m not skilled enough to dive into endpoints.


(Alex) #5

You can also replace steps 1-3 with ST pushing a notification to phone via Pushbillet, then Tasker plugin for Pushbillet intercepts the trigger and starts recording. It should be faster than polling every minute.


(Matt) #6

How do you get ST to push a notification via push bullet?


(Alex) #7

Here’s what I used to do. You can build your smart app based on this, it should be very similar:

Still, my original suggestion would have been the easiest to implement.