Security Camera Recommendations

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 =
    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
5 Likes

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(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.

1 Like

@mstormi could you provide your foscam,map ?

0=deactivated
1=quiet
2=movement
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(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?

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.

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

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

I recently aquired two F18910W Foscam cameras (bargain at $20 for both). I am fairly new to OH. I have read through most of the community articles on this topic and dont see a definitive solution. I have added the newest IPCam binding, and tried adding my cams into Items with no luck. The paperUI states the destination is unreachable. I have updated the firmware and UI to the last release.

I have tried lots of ports and URL combos with no luck.

Has anyone been successful without adding Motion? If so, what does the configuration look like?

TIA

Does the F18910W fall into the newer HD range or the older pre HD models? The older cameras do not implement the Foscam HD API that the IpCamera binding uses. You will need to implement the cameras the old way with REST calls. Any further questions you are best to open your own thread.

@Wjones23