Author Topic: Foscam R2 support?  (Read 2846 times)

Offline jsnsmyth

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Foscam R2 support?
« Reply #15 on: March 24, 2017, 04:27:24 pm »
Here's my experience using the Foscam R2 camera (firmware with Vera Plus UI7.

Following the instructions given in,37954.msg289029.html#msg289029, I was able to get the camera installed and working in emulation mode.  From other research on the internet, I've come to the conclusion that the R2 does not support mjpeg streaming (see  But the emulation mode updates the image every few seconds, so it not so bad.  I think we have to wait for Vera to support H.264 streaming to get live streaming with this camera.  I do find that sometimes when remotely accessing Vera, it can take up to a few minutes for the attempt to stream video to time out before displaying an image using emulation mode.  But the ImperiHome app always returns a camera image very quickly and the Foscam app gives you live video/audio streaming.

I've decided to use the camera's ability to detect motion and send notices to the Foscam smart phone app and emails with snapshots.  I don't really have much interest in using the camera motion detect to trigger other zwave devices.  The "Motion Detection" and "Human Detection" can be enabled/disabled via the cameras html cgi interface.  I created ArmCamera and DisarmCamera scenes that execute Lua code to do this .....

Code: [Select]
-- Arm Camera  ---set position, arm motion and human detection

-- Move Camera (192) to preset position 5
luup.call_action("urn:micasaverde-com:serviceId:PanTiltZoom1", "GoToPreset", {presetNumber = "5"} , 192);

-- Arm Camera Motion Detect

-- Arm Camera Human Detect

Code: [Select]
-- Disarm Camera (192)--- set position, disarm motion and human detection

-- Move Camera to preset position 6
luup.call_action("urn:micasaverde-com:serviceId:PanTiltZoom1", "GoToPreset", {presetNumber = "6"} , 192);

-- Disarm Camera Motion Detect

-- Disarm Camera Human Detect

In the code above, my camera device number is 192 and the ip address:port is  Replace these with the values for your camera.  Also replace "xxxx" with the appropriate userID and password for your camera.

The camera also has a sound detection capability, but I have not been able to find the cgi interface for setting that.  But you could enable/disable this through the smartphone app.

Note that when enabling the motion/human detection, you have to provide all the settings, and not just "isEnable".  If you don't, everything will get set to 0 and motion detection will do nothing.  Entering the following url's in your web browser will return the camera's settings.''

Using this you can set up your camera as you wish through the web page interface, then retrieve all the settings.  Use these retrieved settings to modify the Lua code above.

For setting the camera position, the Vera presets 1 through 4 will activate the camera's preset and unchangeable TopMost, BottomMost, LeftMost and RightMost presets.  You can however define you own presets "4" through "16" using the camera's app or web page interface.  The Vera Camera device will let you select your custom presets "4" through "8".

In my opinion, if Vera would support H.264 streaming and motion detect for this camera, it would be perfect, especially considering the relatively low camera price.

Offline rayjr13

  • Newbie
  • *
  • Posts: 16
  • Karma: +0/-0
Re: Foscam R2 support?
« Reply #16 on: March 25, 2017, 06:23:39 pm »
@Horus  Did anyone get any progress with the PTZ?  I can see the images too.  I struggled for a while until I figured out that my password was >12 chars.  But at least its up.  I also did check out the rtsp link on my android device.

AuthomationHD did also have the identical behavior of Vera 2 UI5.  So that is a plus.  well thatalso means it has no contol functions ptz but still if any resolve then it will translate.

Here's to hoping.  It has been a while but who knows maybe someone will take up the cause.