Security Camera Recommendations


(Jigen) #1

Anyone have any good recommendations for security cameras that work with openHAB?

Looking for a camera that can live stream video and two way audio, motion sensing, recording, and storage.


(John Cocula) #2

I recently added support for the Nest Cam to the Nest binding, but it requires a subscription in order to receive notice of motion/sound events in openHAB and retain history. The binding can tell you the web URL for the camera, and last event images, but since openHAB 1.x does not support sitemaps with “Image item=CamMotionItem” to retrieve the image at the item’s URL value, integration is not yet ideal.

Since I’m “frugal” (polite term for “cheap”), I prefer the older Foscam cameras (like the FI8910W) because you can tell it to call a URL when it detects motion, which I point to a URL like http://localopenhabip:8080/CMD?CamMotionItem=ON.

There are many higher end cameras that use the ONVIF protocol and I’d love to see generic support in openHAB for that, but it looks very hard to work with so I’ve avoided it. A thorough survey of available security cameras and ways to integrate them into openHAB would be fantastic.


(AG) #3

Absolutely. I could not agree more. ONVIF would be fantastic or other methods of native integration for cameras is needed to help expand this platform. I’ve been patiently looking for developments along the way and have been a little surprised how little this seems to be discussed. I know part of the problem is the various manufacturers and specs etc. but a standard like ONVIF would seem like a good starting point. Also possibly integrating with a camera server package like Exacqvision or BlueIris would be great too as they can combine all the different cameras within the server and then make events available from one server.


(Jigen) #4

With the Foscam cameras, what protocol binding would I use?
Would I have full control over the camera through openhab? Watching, pan/tilt, two-way audio, etc?


(John Cocula) #5

The Foscam cameras have an HTTP API that you can use for pan/tilt, grabbing a snapshot, telling the cameras to call back to openHAB when there is motion, etc. There are online PDF manuals. The newer wi-fi cameras have a different API than the older ones, and I couldn’t find a motion callback interface in the newer models, but I didn’t run down the subject thoroughly, either, so there might be a solution. Things like two-way audio can possibly be addressed but I haven’t tried.


Examples of HABPanel Solutions
(marcel) #6

ah, that’s what I looking for. Could I using this http api trigger the camera to start recording?
I have my alarm hooked to OH, would be good if I can trigger the recording when the alarm is triggered.
Also, I would like to ‘arm’ it when my regular alarm is ‘armed’ while so that when I’m in the room the thing does not records on movements.


(John Cocula) #7

Here is some sample code adapted from one of my rule files that demonstrates instructing two different Foscam model cameras to enable or disable motion detection, based on the switch state of the Present item. When the switch changes to OFF, it sends HTTP commands to each camera (IP addresses ending in .14 and .15) to enable motion detection, and in the case of the model that supports callbacks on motion, tells it to callback to the openHAB server (IP address ending in .10) to flip a Switch item. When the Present switch is set to ON, it disables motion detection on all cameras.

import org.openhab.core.library.types.*
import java.util.HashMap
import java.util.LinkedHashMap

val HashMap<String, LinkedHashMap<String, Object>> cameras =
    newLinkedHashMap(
    "entrance-cam" -> (newLinkedHashMap(
		"snap_url" -> "http://192.168.1.14/snapshot.cgi?user=admin&pwd=password",
		"enable_motion_url" -> "http://192.168.1.14/set_alarm.cgi?motion_armed=1&motion_sensitivity=5&motion_compensation=1&mail=1&upload_i
nterval=34463&http=1&http_url=http%3A%2F%2F192.168.1.10%3A8080%2FCMD%3FEntranceMotion%3DON&schedule_enable=0&user=admin&pwd=password",
		"disable_motion_url" -> "http://192.168.1.14/set_alarm.cgi?motion_armed=0&user=admin&pwd=password")
            as LinkedHashMap<String, Object>),
	"kitchen-cam" -> (newLinkedHashMap(
		"snap_url" -> "http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=admin&pwd=password",
		"enable_motion_url" -> "http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=1&linkage=7&snapInterval=2&
sensitivity=1&triggerInterval=5&schedule0=1023&schedule1=1023&schedule2=1023&schedule3=1023&schedule4=1023&schedule5=1023&schedule6=1023&area0=1023&ar
ea1=1023&area2=1023&area3=1023&area4=1023&area5=1023&area6=1023&area7=1023&area8=1023&area9=1023&usr=admin&pwd=password",
		"disable_motion_url" -> "http://192.168.1.15:88/cgi-bin/CGIProxy.fcgi?cmd=setMotionDetectConfig&isEnable=0&usr=admin&pwd=password")
	    as LinkedHashMap<String, Object>)
    )

rule PresenceChanged
when
	Item Present changed
then
	switch Present.state {
		case OFF : cameras.values.forEach [ camera | sendHttpGetRequest(camera.get("enable_motion_url")) ]
		case ON : cameras.values.forEach [ camera | sendHttpGetRequest(camera.get("disable_motion_url")) ]
	}
end

Idea for FOSCAM camera binding
Issue using HTTP Binding for Security Cam Feed in HABpanel/BasicUI Sitemap
(Markus Storm) #8

I’d like to get one of the new-firmware Foscam models, but I don’t know yet how to make OH know when they trigger on motion. I just want to get a Contact item or variable get set automatically.
As callback URLs are unavailable, can we at least pull the alarm status via HTTP binding ?
Do I have to use SMTP/FTP alarming and build some SMTP/FTP-to-OH script mimic or is there a more clever way?


(John Cocula) #9

I would like to know as well! It’s a shame the later Foscam cameras no longer document a motion callback URL.

But @PolishBen has been working on a CCTV “snapshot” binding that processes images that could be deposited via FTP onto the openHAB server:

Ultimately this would be the cleanest solution for cameras that can’t signal motion more directly.


(Markus Storm) #10

I’m polling now:
String Foscam_Detect "Bewegungserkennung Aussenkamera [MAP(foscam.map):%s]" <camera> (Status,Test) { http="<[http://foscam:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=USER&pwd=PASSWORD:4000:REGEX(.*?<motionDetectAlarm>(.*?)</motionDetectAlarm>.*)]" }

Not the most elegant solution, and specific to Foscam, but it works and it’s fast to react, almost as good as a PIR sensor.
Thanks to @d0t for the hint. For API, see here.


Idea for FOSCAM camera binding
Recommendation for Camera to implement in Openhab
(Bogumil J.) #11

@mstormi could you provide your foscam,map ?


(Markus Storm) #12
0=deactivated
1=quiet
2=movement
undefined=no data
-=no data

(Leads Rating) #13

I’m considering getting either Blink XT or Arlo Pro. Any insights if these two integrate with OpenHAB? I currently own the Canary All-in-One but it doesn’t seem to function as promised.


(Jesús) #14

Where should I write this line of code?

String Foscam_Detect "Bewegungserkennung Aussenkamera [MAP(foscam.map):%s]" <camera> (Status,Test) { http="<[http://foscam:88/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=USER&pwd=PASSWORD:4000:REGEX(.*?<motionDetectAlarm>(.*?)</motionDetectAlarm>.*)]" }

Is it necessary to do something else to polling the motion detection?


(Markus Storm) #15

in .items file of course

enable detection in your foscam configuration ?


(Jesús) #16

I have the code in .items and the ip is correct. I can see a xml that return from navigator when copy and paste for check the address but it not receive update when motion sensor register movement. I am looking for in events.log and I dont’ see reference about Foscam_Detect.


(Skinah) #17

I may have added this ability to my binding here, if it works (i dont have a foscam) it should be simple if the camera has it turned on, if it does not it will tell you in the logs that it is turned off.


(Selter) #18

Could you let me know what make of Foscam do you have?
I’m thinking about buying FI9803P but want to make sure that I can access livestream in my OH2 sitemap.


(Matthias Marx) #19

Hi,

I am still searching for a compatible cam solution for OH. Is there a solution meanwhile for integrating Blink cameras? I am interested in this battery powered cams or have you an advise for a similar one?

Thanks


(Skinah) #20

There are very few battery powered cameras and the ones I know of will try to force you to pay an ongoing monthly fee for their cloud. This video mentions two cameras, but I would prefer a camera that is POE powered wired and does not force a monthly fee. See my binding which is linked a few posts above for cameras which I would recommend but if battery is a requirement then this video may be worth a watch even thou it is for hass