Adding a Foscam FI9900P to Vera Plus

Hi all, I have just purchased a Vera Plus and a Foscam FI9900P IP camera but am having no luck in getting the Vera to see the camera.

It does not automatically detect it, and when manually adding it no combination of settings work.

The snapshot URL works fine, if I enter: http://192.168.1.99/cgi-bin/CGIProxy.fcgi?cmd=snapPicture&usr=admin&pwd=admin into a browser I get a snapshot image.

I have tried changing the port from the default 88 to 80, dropping the http:// prefix, shortening the URL to http://192.168.1.99/cgi-bin/CGIProxy.fcgi?cmd=snapPicture, leaving the username/password fields blank, but all return the same camera not found result.

Any suggestions gratefully received!

Thanks

Step 1 - Make sure you have the FoscamHD plugin installed
Step 2 - Go to Apps->Develop Apps->Create Device
Step 3 - set upnp device name = D_DigitalSecurityCamera2.xml and Upnp Implementation Filename = I_FoscamHD.xml
Step 4 - Click Create Device Button
Step 5 - Reload Luup
Step 6 - Refresh browser and check Cameras, new camera called “IP Camera Ext” should be created and displaying “Invalid Camera URL”
Step 7 - Go into advanced settings of device, and set ip address and port (eg. 192.168.0.38:88). Set username and password. Click Done.
Step 8 - Go back into advanced settings and click Extra Parameters
Step 9 - Go to New Service.

New Service = urn:micasaverde-com:serviceId:Camera1
New Variable = URL
New Value = cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd= Replace the <> with your details.

Step 9 - Click “Add” then Click “Reload Engine”.
Step 10 - Refresh browser and go to your Camera, it should now be working.

This works for C1, C2 and R2 cameras. Should work for any HD Foscams with current firmware.

Works for me,greetings

Thanks for the advice - followed that and it worked for me.

;D

Hello,

Can I also control the R2’s Pan/Tilt/Zoom features from within Vera (UI7) ?
And what about the Two-Way Audio?

Thanks

Hello,

Can I also control the R2’s Pan/Tilt/Zoom features from within Vera (UI7) ?
And what about the Two-Way Audio?

Thanks[/quote]

PTZ yes.
Audio no.

My VeraLite was dropping devices and acting funny so I installed a VeraPlus. I included all of my devices, created standard scenes, and LUUP scenes to integrate Global Cache devices. It works great.

I picked up a couple of Foscam POE FI9853EP’s and Foscam POE FI9900EP’s I’d like to integrate into my system. I started with a FI9853EP following thxultra’s posts instructions verbatem and I get “Not Connected”.

I changed the Username to 12 Characters and the Password to 12 Characters including a <-> character. Could this be the problem?

I am running:
System Firmware 1.7.2414
Camera Firmware 2.22.2.27

Thanks.

Well I got the VeraPlus to recognize the camera, however, I get the following message:

I changed the username and password and git it working. ;D

Has anyone here successfully connected a FI9900P w/ the instructions from thxultra? I’ve tried multiple times but I get no image from the camera. I’ve confirmed that the camera is working w/ the IP address/username/password that I’m using. I’ve got a vera edge w/ ui7. In addition to no picture the FoscamHD plugin never seems to completely startup. Any help would be appreciated. Thanks,
JB

jdbowenvt,

I ran across this thread while searching for how to get a Foscam R2 mapped into my new Vera Plus. I have gone round-and-round, first following the directions above and then using the app for Foscams that is available from within the Dashboard. No dice. I was therefore VERY disappointed to see that on a user forum you had made a post six weeks ago and had zero replies.

It is my hope that by posting a follow up it will refresh this and someone will follow up and help us out. From a newbie - Can anybody help us out here? :o ;D

Thanks!

Phil

[quote=“Skyking, post:10, topic:193294”]jdbowenvt,

I ran across this thread while searching for how to get a Foscam R2 mapped into my new Vera Plus. I have gone round-and-round, first following the directions above and then using the app for Foscams that is available from within the Dashboard. No dice. I was therefore VERY disappointed to see that on a user forum you had made a post six weeks ago and had zero replies.

It is my hope that by posting a follow up it will refresh this and someone will follow up and help us out. From a newbie - Can anybody help us out here? :o ;D[/quote]

I was in the same situation as you and invested many hours only to conclude and confirm that the Foscam R2 (version 3) won’t work with Vera, at least with the current firmware. The processes used to get a photo snapshot or streaming video out of the R2 and described in this forum aren’t applicable to this camera. The Foscam R2 only uses Real Time Streaming Protocol (RTSP) which Vera doesn’t support for this particular camera. The Foscam is a nice camera but since I bought it assuming it would work out of the box with the various plug-ins in the App Store (and found out otherwise) so I’m sending it back. Will try a camera with an HTTP stream and give it another try.

Hope this helps. I regret how much time I wasted on his but I suppose I’m a little smarter now.

Hi,
it seems a little “bit” of time has passed… but…

I Have bought a Foscam C1 (v2) and I cannot connect to the Vera Plus… I followed the instructions, but… no success, and also it seems that the “Foscam HD” plugin is always “starting up…” because I continue to see this message on the blue bar on top of the web dashboard, once logged in into VeraPlus.

It seems I have succeeded in making it work, but still all I can see is the image and no particular option is given: I can only see the image in a sort of “emulation mode”, and take snapshot, but none of the camera’s advanced functions is available…

So the iSpy camera software people have compiled a very helpful inventory of the appropriate URLs for almost any type of camera, for both still images (which Vera can always use) and streaming (which it mostly cannot). Using that I got my FDT camera to at least work with Vera in still frame mode. Here is the link -

This might be obvious, but I thought I should mention that many of these use web server Basic Authentication, where you put the username and password in the appropriate boxes in the Vera camera device setup rather than on the URL. It is always one or the other.

After I restarted the router to take the port forwarding, it started to work using thxultra’s method. Now I just need a list of commands to use LUUP to enable / disable motion sense etc.

Found the list of CGI Commands:

[quote=“thxultra, post:2, topic:193294”]Step 1 - Make sure you have the FoscamHD plugin installed
Step 2 - Go to Apps->Develop Apps->Create Device
Step 3 - set upnp device name = D_DigitalSecurityCamera2.xml and Upnp Implementation Filename = I_FoscamHD.xml
Step 4 - Click Create Device Button
Step 5 - Reload Luup
Step 6 - Refresh browser and check Cameras, new camera called “IP Camera Ext” should be created and displaying “Invalid Camera URL”
Step 7 - Go into advanced settings of device, and set ip address and port (eg. 192.168.0.38:88). Set username and password. Click Done.
Step 8 - Go back into advanced settings and click Extra Parameters
Step 9 - Go to New Service.

New Service = urn:micasaverde-com:serviceId:Camera1
New Variable = URL
New Value = cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd= Replace the <> with your details.

Step 9 - Click “Add” then Click “Reload Engine”.
Step 10 - Refresh browser and go to your Camera, it should now be working.

This works for C1, C2 and R2 cameras. Should work for any HD Foscams with current firmware.

Works for me,greetings[/quote]

This worked with R2C as well. Thanks a bunch

This also worked for FI9816P (?49 off Amazon) camera

[quote=“RoyR, post:14, topic:193294”]After I restarted the router to take the port forwarding, it started to work using thxultra’s method. Now I just need a list of commands to use LUUP to enable / disable motion sense etc.

Found the list of CGI Commands:

This is the code (below) I use on my UI5 from a few years ago. Essentially I made a sloppy way to collect the JSON from the webcam, break it up and then re-compile it back again to enable/disable the motion.

The problem I found was that the CGI/JSON has to be downloaded in full only because you have to send the whole lot back again. Even though you only want to change one thing, being the motion trigger!

I’m sure that someone with some proper JSON coding could clear all of this up. It’s worked flawlessly on my Foscam cameras (FI9826W) for years :o ;D

This is run in my Scene to Enable motion detection!

[code]local VContainerDeviceNo
local VC_SID
local func_return

function split(str, delim)
local result,pat,lastPos = {},“(.-)” … delim … “()”,1
for part, pos in string.gfind(str, pat) do
table.insert(result, part); lastPos = pos
end
table.insert(result, string.sub(str, lastPos))
return result
end

function set_foscam_alarm(ip_address, alarm_set)
– local ip_address, alarm_set
– ip_address=“192.168.66.241:881”
– alarm_set=1

local serverurl=("http://" .. ip_address .. "/cgi-bin/CGIProxy.fcgi?") 
local switchaddress=("cmd=getMotionDetectConfig&usr=<username>&pwd=<password>")
local fullcommand=(serverurl .. switchaddress)
local new_url
local armed

local VContainerDeviceNo
local VC_SID

local result, status
local http
local test1
local test2, loop1
local arr1, arr2



http = require("socket.http")
http.timeout = 5
result, status = http.request(fullcommand)

test1=result

test1 = string.gsub (result, "  ", " ")
test1 = string.gsub (test1, "  ", " ")
test1 = string.gsub (test1, "  ", " ")
test1 = string.gsub (test1, "  ", " ")
test1 = string.gsub (test1, " ", "")

test1 = string.gsub (test1, "<", "/")
test1 = string.gsub (test1, ">", "/")

test1 = string.gsub (test1, "//", "/")
test1 = string.gsub (test1, "//", "/")

test1 = string.gsub (test1, "\r\n", "!")
test1 = string.gsub (test1, "\n", "!")
test1 = string.gsub (test1, "\r", "!")

test1 = string.gsub (test1, "!!", "")


new_url=serverurl .. "cmd=setMotionDetectConfig"
armed=0


arr1=split(test1, "!")

for a,b in pairs(arr1)
do
   -- luup.log("Arr1:" .. a .. ":" .. b)
   if ((a>2) and (a<25)) then
	  luup.log("Arr1:" .. a .. ":" .. b)
	  arr2=split(b,"/")
	  luup.log(" - Arr2:" .. arr2[2] .. ":" .. arr2[3])
	  new_url = new_url .. "&" .. arr2[2] .. "=" .. arr2[3]
	  
	  -- collect current state
	  if (a==3) then
	      armed=arr2[3]
	  end
   end
end



luup.log("armed vs. alarm set: !" .. armed.. "/" .. alarm_set.."!")



-- Note "~=" should be NOT?
if (tonumber(armed)==tonumber(alarm_set)) then
	-- Do nothing as we want to use NOT (or ELSE)
else
	new_url=new_url .. "&usr=<username>&pwd=<password>"

	if (tonumber(alarm_set)==1) then
		new_url = string.gsub (new_url, "isEnable=0", "isEnable=1")
	end

	if (tonumber(alarm_set)==0) then
		new_url = string.gsub (new_url, "isEnable=1", "isEnable=0")
	end

	luup.log("New_URL:" .. new_url)

	http = require("socket.http")
	result, status = http.request(new_url)

	luup.log("http request result/status: " .. result .. "/" .. status)
end

if (tonumber(armed)==tonumber(alarm_set)) then
	return -10
else
	return status
end

end

func_return = set_foscam_alarm(“192.168.66.241:881”, 1)
func_return = set_foscam_alarm(“192.168.66.242:882”, 1)

VContainerDeviceNo = 66
VC_SID = “urn:upnp-org:serviceId:VContainer1”

luup.variable_set(VC_SID,“VariableName1”,“Enable Date”,VContainerDeviceNo)
luup.variable_set(VC_SID,“Variable1”,“”,VContainerDeviceNo)
luup.variable_set(VC_SID,“Variable1”,os.date(‘%H:%M:%S %Y-%m-%d’),VContainerDeviceNo)

luup.variable_set(VC_SID,“VariableName2”,“HTTP Status Code”,VContainerDeviceNo)
luup.variable_set(VC_SID,“Variable2”,“”,VContainerDeviceNo)

if (tonumber(func_return) == -10) then
luup.variable_set(VC_SID,“Variable2”,“No change required”,VContainerDeviceNo)
else
if (tonumber(func_return) == 200) then
luup.variable_set(VC_SID,“Variable2”,“Change OK”,VContainerDeviceNo)
else
luup.variable_set(VC_SID,“Variable2”,func_return…“-Check!”,VContainerDeviceNo)
end
end

luup.variable_set(VC_SID,“VariableName5”,“Current State”,VContainerDeviceNo)
luup.variable_set(VC_SID,“Variable5”,“”,VContainerDeviceNo)
luup.variable_set(VC_SID,“Variable5”,“Enabled”,VContainerDeviceNo)
[/code]

I’m trying to get a Foscam FI9928P V2 added to my VeraPlus following the instructions above. After step 10, I get the following message:

You are seeing the video in emulation mode. The camera doesn’t support or has trouble loading up the continuous streaming. You can try to load it again by clicking Retry or you can click Close and continue watching it as it is.

Any insight? Also, on the last part of Step 9, I’m assuming replace <> with your details means add the userID and password after each of the “=”, correct?