Foscam FI9821W - Support & How-To

Foscam FI9821W Vera Support & How-To thread

I will keep this post current. Please let me know if there is anything in error, missing, or better ways.

WORKING…

  • Camera Device: gets created, shows video, Pan&Tilt

NOT WORKING…

  • Camera Device: frame rate is very slow
  • Camera Motion Sensor: not working/supported

HOW-TO INSTALL…

  1. Download proper files (attached in ZIP)

  2. Upload these files to Vera unit (Apps \ Develop Apps \ Luup Files), check the box for ‘Reload Luup after uploading’

3)Create Camera: * this methods produced the quickest results for me, there are other ways that also work.

  • under Devices \ Add Device \ I want to add an IP Camera \ Add Manually
  • in bottom box enter: http://:/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=
  • enter & in corresponding boxes
  • you should see your camera image after choosing ‘Continue’ button
  1. Wait a minute or so the Camera device to appear (it may show as “undefined”)

  2. Change settings on Advanced tab page:
    name -
    ip - : *port needed only if not using port 80
    mac -
    manufacturer - Foscam
    model - FW9821W
    device_file - D_DigitalSecurityCamera2.xml
    device_type - urn:schemas-upnp-org:device:DigitalSecurityCamera:2
    impl_file - I_Foscam98HD.xml
    URL - /cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=
    DirectStreamingURL - /cgi-bin/CGIStream.cgi?cmd=GetMJStream&usr=&pwd=

At this point you should see the camera image and all currently working items

IF you have problems and need to delete the device, first try the normal ‘trashcan’ button under device properties. If that is not working for you, use this URL…
http://<vera_ip_address>:3480/data_request?id=device&action=delete&device=<device # you want deleted>

Thanks a lot. Got the cams now up and running.

With Vera Mobile I get the standard error message that it is going into emulation mode and no pan/tilt options.
With AuthomationHD I get and pan/tilt options and they actually work.

My next task will be to look into blue iris and motion sensoring.

Ok. Let’s tackle the fun part now. After a lot of research and going through all the various APIs and versions of those here is what I came up with.

A) Nobody knows how to read the current status of the IR of the Cam. They all come back with the command 94 and 95 to enable or disable IR and some of the guys came back with you can actually read if it is set on ON/OFF/AUTO.
B) None of the above helps because what I am after is to be able to read in real time if the IR is activated or not activated and I don’t care what the setting is in terms of on, off or auto as the default is auto and this is how it should be. I want to use the camera as a day light detector and if under setting auto the IR kicks in, I want to trigger certain actions via Vera.

Now the good news. Here is what I found out:
You CAN read the status of the IR LEDs of every Foscam who supports IR-CUT off with the following command and you can use your browser to test it.

http://IP ADDRESS:PORT/cgi-bin/CGIProxy.fcgi?cmd=getDevState&usr=XXXXXX&pwd=XXXXXX

The output will look like this:

<CGI_Result>
0
0
1
0
0
0
0k
0k
1
0
http%3A%2F%2URLXXXXXXX
1
1
YOUR WIFI NETWORK
0
</CGI_Result>

The last line of the parameters above the key. 0 = IR is offline and 1 = online

This is where I need your help guys now. How can I read this specific line as I don’t care about the other lines and trigger certain commands?

My ultimate goal is the following and I will try to explain this a logical form:

During day which equals infraLedState = 0 → disable light switch for main front door and then start listening to the camera motion sensor and use the following logic:

If motion sensor is triggered then record 2 min of video via Blue Iris

During night which equals infraLedState = 1 → enable light switch for main front door and then start listening to the camera motion sensor and use the following logic:

If motion sensor is triggered, then turns front door lights on and record 2 min of video via Blue Iris

I have 2 challenges here. One technical challenge which is the how do I read from all those parameters above the last line and only the last line to trigger my actions above.

The second challenge is a logical challenge because as soon as the front door lights go on based on the motion sensor, the logic from the top kicks in which says to disable the front door lights and record video.

If I can figure that out I could replace my motion sensor in front of the house and integrate everything into the Foscam and control everything via the Foscam which includes lights, motion detector and video recording and I could go as far as controlling the Yale door lock as well.

Let’s see if any technical help and/or logic help can be provided for this ambitious project.

Thanks in advance guys for any help.

Thanks for the great info, I’m about to purchase the same camera along with BlurIris.

I have a new Foscam FI9821W V2 camera that Vera refuses to recognize.

I downloaded and installed the files and restarted the luup, but I cannot finish the “create device” steps.

When the proper IP. port, user and pwd are entered into this string, http://:/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=, it always returns an image in a browser, but Vera never sees it when installing. “Unable to get image from camera.”

Am I missing a step somewhere?

[quote=“Lonestar10, post:5, topic:178812”]I have a new Foscam FI9821W V2 camera that Vera refuses to recognize.

I downloaded and installed the files and restarted the luup, but I cannot finish the “create device” steps.

When the proper IP. port, user and pwd are entered into this string, http://:/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=, it always returns an image in a browser, but Vera never sees it when installing. “Unable to get image from camera.”

Am I missing a step somewhere?[/quote]

If it works in the browser then you are doing the “Add device” steps not properly or you are facing what I faced too. When I clicked on the last page where I should see a screenshot it didn’t show up but then I clicked on cancel and immediately again on next and the picture showed up.

Don’t ask me why but I had this twice as I was playing around with all the integration options. Maybe that helps.

That trick didn’t work for me, so I tried rebooting both Vera and the camera and tried again. This time, it worked. Vera installed the camera.

However, it’s showing only two-thirds the image. The bottom third of the image is missing; blanked out. In fact, when I enter http://:/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=<password, the bottom third of the image in the browser is blanked out.

Is there a setting on the Foscam I have to adjust?

Thanks

Sounds like your camera is defect… :frowning:

Try to adjust the camera resolution in the settings and see

Changing the resolution in the Foscam software corrected the problem in Vera. I now see the full image.

Thank you!

Help please - I’m having trouble getting Vera to add my new F19821W V2 Camera. running latest firmware
Vera Lite UI5 running firmware 1.5.622
Foscam setup has a Static IP with port changed to 4 digit
Foscam System Firmware 1.4.1.8 / application firmware 1.11.1.18 / plug in 2.0.1.5

I can see the camera image in my chrome or firefox browsers as well as in myfoscam iphone app

I followed the instructions at the beginning of this thread but every time I try to add I get
"Here is an image from the camera. If this is correct, click ‘Add’ to add the camera to Vera. "

but no image just a small box. Same effect with Chrome or Firefox

I have tried the cancel next approach described above several times. I have also rebooted vera and camera no effect.

Newbie to the Vera here, but like many people who get into the smart home stuff, I am a tech professional career wise so gadget tinkering is in my wheelhouse. I’m posting for the first time here just to log some of my observations/findings here so others may benefit and possibly avoid a DenverCoder9 situation.

Instructions/Things I’ve noted while adding the Foscam F19821W V2, System Firmware Version 1.4.1.8, Application Firmware Version 1.11.1.18, Plug-In Version 2.0.1.6 to my VeraLite (UI5):

1.) To start process of detecting the camera:

[ul][li]Click Devices[/li]
[li]Click Add Devices[/li]
[li]Click Add next to I want to add an IP Camera[/li]
[li]Click Manually add[/li]
[li]Use the URL provided in the opening post: http://:/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=[list]
[li]You will need to replace the variables in the url: , , , and with the corresponding values for the camera you are setting up[/li]
[li]Also note that if you have your camera operating on port 80, you can completely omit the colon and port number as port 80 is the default HTTP port so it is unnecessary[/li]
[li]In case it is not clear, remove all angle brackets (the greater than and less than characters) in the URL. The example of the URL http://192.168.1.125:1117/cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&user=camadmin&pwd=myc@m3r@ would be the correct URL to use for a camera that has an IP of 192.168.1.125, runs on port 1117, and is accessed using the credentials with a username of camadmin and password of myc@m3r@[/li]
[/list][/li]
[li]This is where my mileage has varied from the previously mentioned steps. Do not select a camera type. Do not enter in your username and password. Click [b]Next[b] to continue. [/li]
[li]Give the Vera a second to load the high resolution image. Click Add, then go have a drink because if your situation is anything like mine, this is the most progress you’ve had in months.[/ul]

2.) Now that the camera is added, go change the settings that opening poster Aaron mentioned.

[ul][li]If you are confused because you don’t see the field “DirectStreamingURL” or other fields, make sure your impl_file and device_file fields are correct, save, give it a minute, then go back to the devices page to fill out the remaining necessary fields. After changing fields impl_file, and Device_file I found that I had to save the configuration, give the Vera a minute, and then go back to editing the device so I had all the necessary fields.[/li]
[li]Don’t neglect filling out information in the “Settings” tab of the camera as well. [list]
[li]The URL I have is cgi-bin/CGIProxy.fcgi?cmd=snapPicture2&usr=&pwd=[/li]
[li]Fill out the username and password fields that you did not provide when creating the camera.[/li]
[li]The MAC address format should have colons separating the hexadecimal values, e.g. 28:B5:6E:49:50:D2 – If you can’t find your mac address, try going to your router’s listing of connected devices and look for the MAC address that corresponds with your camera’s IP address.[/li]
[/list] [/li][/ul]

Results:

I’m able to see my thumbnail and view the camera in emulation mode through the Vera phone application. AutHomation HD app does have pan-tilt-zoom (PTZ) capability, but the picture refresh is pretty slow, so there’s a good 7 second lag to update the picture, even though I can hear and see the camera physically move instantly when I use the PTZ controls.

Some other lessons learned and thoughts:

Give your camera a meaningful name and make sure you’re editing the correct camera! At one point I had edited a bunch of fields on another IP camera that I have (a non-hd Foscame FI8910W). I had to delete that camera and go back to re-add it.

Double check all fields for spelling errors and making sure that you properly removed the username and password variables if you used copy-and-paste. At one point, I had not realized that I had the and still in the streaming URL from copying and pasting it. A

Whenever you edit the name of any of the XML files, save the configuration, let the Vera work and reload, then go back to editing the device. Those XML files determine what variables/fields are in the configuration options for the device.

I’ve also been playing around with adjusting the video settings for the camera to see if there’s any optimum setting for the camera to be less choppy when viewing it. If you change resolution bit rate, frame rate, etc., it will effect the video stream that the Vera is hard coded to view. I’ll report back if I find something that works better.

I haven’t tried any audio or recording features yet. At this point, I’m pretty happy that I finally can see the picture on my phone while I’m at work. I’ll post an update if I can get any of those to work.

I purchased this Foscam FI9821W V2 off of groupon in late October and it has pretty much been sitting around ever since I couldn’t figure it out. A huge thanks to Aaron here who provided the luup files and the baseline instructions I used to get this thing working. I hope this helps someone out!

Aaron, thank you for gathering all the clear instructions out of the FI8910W thread and into a dedicated place.

Could you please edit your post to correct a couple of grammatical errors? It would make this post easier to find using the forum search feature.

  1. The camera model is listed incorrectly in the thread title and throughout the post as FI8921W. It should be changed to the correct model of FI9821W.

  2. The zip file attached to the first post is also named incorrectly.

Hello,

I’ve just had a new 9821W and it appears that with the latest firmware (System Firmware Version 1.4.1.8 / Application Firmware Version 2.11.1.6), there is no more the alert url on motion detection.

I’ve tried to figure how to do it…

email: this would start an alarm mode but would never finish it
logs: same problem
download: would download end be enough ?

Have anyone an opinion on it, or should this camera just be aa dumb recorder and I have to install a motion detector linked to the vera ?

Thanks,

Emmanuel

P.S. the url triggering is such an easy feature, why have they removed it ?

Thanks for your summary here.
FYI, for me and my two FI9821W units, the AARON instructions worked with one exception… I did the same thing FLAM5 did in that I did not select a camera type and I did not enter in username/password early on (although it appeared with the URL).

After device was recognized, I later added it to the settings tab

I also played with the FOSCAM settings — not the VERA settings here-- and I like the feature of emailing me snapshots upon detection of MOTION. That is a cool feature.

I wish there was a way to detect motion triggers here in VERA though

-John

I can’t get this working - always prompts me for a camera type and won’t take no for an answer.

Camera motion is HIGHLY inaccurate… it simply looks for pixel changes… so, lighting changes are no difference than a person walking. I suggest using a real PIR, I’ve had success with the Schlage version. Use the PIR to detect motion, and trigger the cam to start recording.

My cameras have a really good way to filter down to what you want to detect (as do a lot of them out there, I am sure). I get great results when I narrow it down to the strategic areas in the screen where a person (or my neighbor’s dog pooping on my lawn) may make motion. I can cover a pretty wide range of area with a camera that I cannot do with a PIR. So I can see the comings and goings of the pool guy, UPS guy and that damn dog.

To me, detecting and reporting Exterior motion on a home is tricky even with a PIR device. Having another set of eyes on things (so to speak) in my mind adds to the security aspect of home automation.

My update is that I am having trouble getting two FI9821W cameras to work.

At first, two units work and show up in Devices no problem but after a few hours the second unit that was installed gives me a ‘camera not responding error’.

This has happened twice – I deleted the second unit and re-installed it, and got the same result.

Also, on the second unit’s install there is a “/” in front of the SETTINGS/URL and ADVANCED/URL field that is not there on the first unit settings. It worked for a while though. After it stopped responding, I tried deleting the slash but still got the ‘camera not responding’.

I am not seeking a solution as it is not that important to me to have both but I wanted to report it so others are aware of it in case they are running into this.

I’m following the instructions but I always get a blank image when it asks to verify the camera’s feed. I tested the URL itself and I can see the image from it. Any idea why it isn’t showing up? I’ve tried in Internet Explorer and Chrome… could it be because I’m using a 64 bit program?