Any word on when something like this might be done?
I have this set up and working. It turns on the motion alarm but doesnât turn on, take snapshot, video record and email. I was wanting to turn on the motion detection, which it does, but then also email me pictures. Is this something that can be added? Or is it supposed to do this and mine just isnât.
I was under the impression I would be able to see the camera motion (VIDEO STREAM) (Foscam) here. But then I read some postings stating itâs only the image capture. So I am confused. How can I capture an image if I canât see whatâs happening. So I just capture random images at random times to emulate having a camera and knowing whatâs going on based on static images? Is that the idea? If not, where would I see the camera image rolling? I do have all settings correct. It used to say active but now it says inactive. So I donât understand. Regardless, I see the whole interface on the ST app for the camera.
The idea is that you set up your system to capture images based on events like motion detection, door/window opening, etc. Streaming video would be nice, but itâs not possible with current ST hardware.
Has anyone looked at modifying the code for Foscam Smart Preset? I am not to good with coding but this app works great for the Foscam 8910w using Imbrianjâs code. However when I used the Foscam Hd Device Type, which is awesome by the way,I loose this capability because presets are not the same coding. This is a feature I would really like to have with 9821w. Please let me know if there is anyone that can help. I have pasted the code below. Thanks
/**
- Foscam Smart Preset
- Copyright 2014 Jake Rorrer
- Licensed under the Apache License, Version 2.0 (the âLicenseâ); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at:
-
http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software distributed under the License is distributed
- on an âAS ISâ BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License
- for the specific language governing permissions and limitations under the License.
*/
definition(
name: âFoscam Smart Presetâ,
namespace: ââ,
author: âJake Rorrerâ,
description: âMoves Foscam cameras to a preset based on activity detected by motion or multi-sensors. That way your Foscam will be properly positioned and ready to snap a photo when a burglar comes into frame.â,
category: âSafety & Securityâ,
iconUrl: âhttps://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience.pngâ,
iconX2Url: âhttps://s3.amazonaws.com/smartapp-icons/Convenience/Cat-Convenience@2x.pngâ)
preferences {
section(âWhen thereâs movement or a door opensâŠâ) {
input âmotionâ, âcapability.motionSensorâ, title: âMotion Hereâ, required: false, multiple: true
input âcontactâ, âcapability.contactSensorâ, title: âContact Opensâ, required: false, multiple: true
input âaccelerationâ, âcapability.accelerationSensorâ, title: âAcceleration Detectedâ, required: false, multiple: true
}
section("Move to this preset...") {
input "preset", "enum", metadata:[values:[1, 2, 3]], required: false
}
section("For these Foscam cameras...") {
input "foscams", "capability.imageCapture", multiple: true, required: false
}
}
def installed()
{
subscribeToEvents()
}
def updated()
{
unsubscribe()
subscribeToEvents()
}
def subscribeToEvents() {
subscribe(contact, âcontact.openâ, motionActiveHandler)
subscribe(acceleration, âacceleration.activeâ, motionActiveHandler)
subscribe(motion, âmotion.activeâ, motionActiveHandler)
}
def motionActiveHandler(evt) {
log.trace â$evt.value: $evt, $settingsâ
log.debug "Detected movement or door opening, moving Foscam to preset $newpreset position"
if(newPreset) {
def preset = new Integer(newPreset)
log.info("Preset: ${preset}")
foscams?.preset(preset)
}
}
Detects motion and sets off motion event! Note I do not have HD foscam so only fitted for other none HD, but someone with HD should be able to take what was done and implement and test.
I have the HD Foscam 9821 V2. I believe the problem is when the camera is unchecked to not record motion, it loses all of its settings. So when I leave my house, this app will check to record motion, but none of the other settings are correct because the foscam has forgotten them. I would need to go back in there an manually tell it to send email, select the area to record motion, ect. Is this something that can be added to the app?
Yep, that is the case. I have the same one. The device type can be easily modified to do that. Here are the instructions (it was based off @jody.albrittonâs code in that thread)
You would modfy this section in @justinlhudsonâs code
def alarmOn() {
// //log.debug "Enabling Alarm"
sendEvent(name: "alarmStatus", value: "on");
if(hdcamera == "true") {
hubGet("cmd=setMotionDetectConfig&isEnable=1")
}
else {
hubGet("/set_alarm.cgi?motion_armed=1&")
}
}
Thanks! This fixed my issue.
Iâve installed this device type, but canât figure out what category it appears in in the ST app. So I canât select it when connecting a new device.
Iâve hard restarted the app to refresh and still no luck.
I donât think you can install it from the app any more. You have to add it from the devices page in the IDE and then configure it
I added it in the IDE. It does not appear in my app.
I installed this device handler. Click take photo in android app but nothing happens.
I assume the picture would show in the smartthings app, correct?
any ideias?
regards
The picture taken was broken due to ST API changes. I got them fixed last night and will post the source code later. There are other things need to be fixed for example LED light and alarm switch.
I checked other version of this DH. The V2 and V3 are in worse shape. I decided to work on the original version. Let me know if you need any particular feature from v2 or v3.
I am also thinking to integrate alarm notification into the device. There is no way to do that with Foscam CGI interface. It will not be a straightforward integration and most likely need a web server to relay the event.