Security Camera Recommendations

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.

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.


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.

1 Like

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?

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.

1 Like

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.

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 =
    "entrance-cam" -> (newLinkedHashMap(
		"snap_url" -> "",
		"enable_motion_url" -> "
		"disable_motion_url" -> "")
            as LinkedHashMap<String, Object>),
	"kitchen-cam" -> (newLinkedHashMap(
		"snap_url" -> "",
		"enable_motion_url" -> "
		"disable_motion_url" -> "")
	    as LinkedHashMap<String, Object>)

rule PresenceChanged
	Item Present changed
	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")) ]

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?

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.

I’m polling now:
String Foscam_Detect "Bewegungserkennung Aussenkamera [MAP(]" <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.

1 Like

@mstormi could you provide your foscam,map ?

undefined=no data
-=no data
1 Like

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.

Where should I write this line of code?

String Foscam_Detect "Bewegungserkennung Aussenkamera [MAP(]" <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?

in .items file of course

enable detection in your foscam configuration ?

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.

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.

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.


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?


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