Presence detection with iClod and start/stop camera?

I am beginner here and trying to figure out if my use case if valid or not…

I would like to be able to turn off/on my Foscam R2 camera (or point it in another direction via ptz) based on presence detection via iCloud (at home or not at home). Is this possible at all?
It seems like other people in the community have managed similar things…

Have installed openHAB2 v2.2.0.008 on my Synology via the package center (Java 8). Works. I’ve managed to install the iCloud binding and have added my iPhone as a thing in openHAB2. I have also added the “simple camera” binding and managed to add my Foscam R2 camera as a thing.

I am aware that I need to do some scripting via the configuration files on my Synology, but can anyone point me in the right direction? I’ve yet to configure both sitemaps, rules etc…


I don’t know either of the two bindings you mentioned. But I can give a general direction:

You need are two items in a .items file

Switch Present "am I home" { channel="here you put the correct channel from the icloud thing from the paperui" }
Switch CameraActive "is my camera active" { channel="here you put the correct channel from the simple camera thing" }

Now all you need is a rule in an .rules file

rule "CameraOffWhenPresent"
	Item Present changed from OFF to ON
	sendCommand(CameraActive , OFF)

And I guess you need a rule the other way around. To turn the camera back of when you leave.
A sitemap is optional, only if you want to see the current status of the items.

Thanks for the reply!

I will look into the “rules” and see what I can come up with. I can see the logic in what you’re describing. I anyone else has something to contribute with, then please do!