Sure. It’s super simple. I have to do a little troubleshooting though… The Arlo(Connect) app will sometimes throw the error:
copyClipDataFromArloToSt() failed for 52M1817AA80A6; error=Failed to complete. Message was: Read timeout to vh-na01-useast1.connect.smartthings.com/34.206.102.155:8400 of 20000 ms Arlo_ClipCopy_ResponseTime=20206
When that happens, the camera doesn’t capture, but for the most part it works. Not sure if I am hitting a timeout or something I can’t control.
/**
* Arlo Camera Capture on Mode Change
*
* Captures 5 seconds of video from Arlo cameras when the mode changes. Will refresh the camera view in the app.
**/
import groovy.time.TimeCategory
definition(
name: "Arlo Camera Capture on Mode Change",
namespace: "evanbeek",
author: "evanbeek@gmail.com",
description: "Captures 5 seconds of video from Arlo cameras when the mode changes. Will refresh the camera view in the app.",
category: "My Apps",
iconUrl: "https://storage.googleapis.com/arlopilot/arlo-small.png",
iconX2Url: "https://storage.googleapis.com/arlopilot/arlo-med.png",
iconX3Url: "https://storage.googleapis.com/arlopilot/arlo-large.png"
)
preferences {
section("Setup") {
input "cameras", "capability.videoCapture", multiple: true
}
}
def installed() {
log.debug "Installed with settings: ${settings}"
initialize()
}
def updated() {
log.debug "Updated with settings: ${settings}"
unsubscribe()
initialize()
}
def initialize() {
subscribe(location, onLocation)
}
def onLocation(evt) {
log.debug "$evt.name: $evt.value"
log.debug "Refreshing cameras with 5 second capture"
Date start = new Date()
Date end = new Date()
use( TimeCategory ) {
end = start + 5.seconds
}
log.debug "Capturing..."
cameras.capture(start, start, end)
}