Automation triggered by security camera alert - how to?

After a spate of prowlers, I am looking for a way to have ST connected devices (lamps) turn on for a set period of time in response to an alert from our IP security camera.

The camera has options to send an email or post a file to FTP when movement is detected.

I suspect it’s possible to use IFTTT to trigger on receipt of an email and have ST turn on a single device.

However I want a little more.

  • I want more than one device to turn on when triggered

  • Devices should turn off after a set period

  • Automation should only run at defined times (overnight or dusk to dawn etc etc).

I have ST hub; IFTTT; iOS shortcuts; Alexa; gmail ID/s available to me.

Any and all guidance on approaching this would be much appreciated. I can code, but would need pointers / samples to get going.

The automation part in Smartthings is a set of pretty standard responses to various triggers, non of that is an issue

The issue is at present there is no way of converting anything from an IP cam to a response in ST

Add to that false detections like cats, trees, ambient lighting from passing cars triggering events, if you did find a way to get an IP cam to trigger something in ST your lights indoors will be flashing on off all night long

There are other options for security and indoor outdoor lighting but it all depends on what is feasible in your particular circumstance

Thanks (again) Mike for the comprehensive reply.

I’ve got myself interested in the problem of building the automation. Where can I start if I ignore the IP cam as a trigger? Specifically setting up the time criteria, the lamp triggers, duration counters etc.

For an alternative trigger I’m wondering about a voice activation. I already have an automation that uses Siri and iOS Shortcuts to call a Webhook which in turn unlocks a door (via ST). I could do something similar for this application.

Pointers welcome.

Programmatically I’m not your man, so am unable to advise on that route

Is it possible you could fit a movement sensor with a light attached externally?

I have done it and it is powered by a power sense plug/pocket socket

All external movement sensors have there own adjusters to activate at a set level of light and they usually have there own adjustable illumination timer, plus they are cheap as chips

So no need to program light level switch on times, light duration times as its all done by the movement sensor

The power sense plug socket will detect if voltage rises (on movement when detected) this in turn can then be used in any automation ST has available

Been using this setup for 4 years and not once have I had an issue, a movement sensor placed in the right position will be much easier to deal with and way more reliable than camera movement

So if you have other lights, and devices controled by ST You can have them switch on off change colour or whatever you like simply using ST automations within the app

It’s possible, but there may be a significant delay for an email trigger. At one point it was up to 15 minutes and I don’t know if that would work for your scenario.

But if you’re OK with any delay caused by the email trigger, then it’s easy. Make your “single device“ a virtual switch, and then have that virtual switch turning on trigger any other events within smartthings that you want to have happen, with any filters that you want to apply. :sunglasses:


I have a setup that does exactly what you are describing, but I use a 20-line Python script on a Raspberry Pi to act as a mail server and invokes a webcore piston via URL to toggle a virtual switch. Works great and avoids the lag you would get using IFTTT.

My cameras are Reolink and unfortunately they don’t actually send the email until they’ve recorded for a few seconds, so it’s not as instantaneous as I’d like…

1 Like

Lots of different ways to tackle security, my personal take, the easier and simpler it is the more reliable it is

30w led security light
External dumb movement sensor
Power sense plug
ST automations

What do you mean by ‘Power sense plug’?

One of my cameras is out at the end of my driveway; there’s an outlet there so I use a TPLink Powerline module to get the camera connected to the LAN. The distance is a bit on the long side so sometimes it looses signal, but works most of the time. I’ve thought about putting a motion sensor out there for faster response, but I don’t know any motion sensor that would have an ethernet connection. It’s too far for wireless, and besides, a wireless motion sensor would run off battery and I don’t want to have to worry about changing batteries or recharging.

You guys call them pocket sockets maybe ! the zigbee or zwave versions that sense power draw

When the movement sensor detects movement it switches on the connected light, that voltage change sensed by the plug is what turns the whole lot smart

Ah ok; cool trick! Unfortunately limited by distance of zigbee/zwave.

Yeah to me that would be a challenge to beat, would drive me nuts :grin:

What is that exactly ? Does it have WiFi capability or is it a simple power line adapter with an RJ45 connection

Sonoff make a power sense wifi switch that can go inline to a mains connected movement sensor

It allows you to run ethernet over power lines (‘mains’?). Yes, a power line adapter with RJ45 connection. Handy solution for when you need ethernet access where there is no ethernet cable, but there is a power outlet. I think the limit in the US is something like 300 meters of 120v line.

1 Like

Sounds like it’s mini digger cat5 time :smiley:

JD thanks for this, it nudged me in the right direction.

The IP camera sends an email to IFTTT.
IFTTT turns on a virtual switch.
ST SmartApp responds to the switch state change and runs a template smartapp turning on switches. All the timer controls etc are in the SmartApp.

Not perfect I’m sure… but it’s a great start for me.

Thanks to you and all others for inputs!

1 Like