Author Topic: Guide for installing Foscam 8910W and 8918W as camera and motion sensor.  (Read 30102 times)

Offline n0ir

  • Sr. Member
  • ****
  • Posts: 332
  • Karma: +2/-1
I have had some real trouble with getting my two Foscam IP cameras (8910W and 8918W) to work as cameras and motion sensors in Vera (http://forum.micasaverde.com/index.php/topic,11027.msg178168.html#msg178168).

I think I finally solved it. The final piece was with the help of this post http://forum.micasaverde.com/index.php/topic,11472.msg132022.html#msg132022 .

I now present my own step-by-step guide for getting the Foscam 8910W and 8918W cameras to work as motion sensors with Vera! ;)

0. Yes, 0! Set up the Foscams to work as motion sensors using the built-in UI. You will need to set up e-mail under "Mail Service Settings" and enable motion detection under "Alarm Service Settings". Make sure this work standalone before trying to get it to work in Vera... Also make sure the cameras have the latest FW (my FW on the 8910W is 11.37.2.59 with web UI 2.4.10.10 and my FW on the 8918W is 11.37.2.48 with web UI 2.4.10.2).

1. On the Vera, go to Setup->Unit settings->Do you want to secure this Vera?->"No" (unclear if this is necessary)

2. Setup->Net & Wi-fi->Uncheck "Auto detect devices on my home network" (unclear if this is necessary, but I think it prevents plugin #3866 "VistaCam SD, PT & HD for UI5" and/or plugin #2158 "Wintop zCam IP Camera" from being automatically installed)

3. Install plugin "Foscam IP Camera" #1978. Make sure plugin #3866 "VistaCam SD, PT & HD for UI5" and/or plugin #2158 "Wintop zCam IP Camera" is NOT installed.

4. Devices->Add Devices->I want to add an IP Camera->Manually add

5. Fill in the cameras IP under "Or, if your camera is not on the list, paste the URL which returns a JPG file in the box below". Just the IP.

6. Choose "Foscam Camera" under "What type of camera is it?". Replace the double "//" before snapshot.cgi in the URL with a single "/". We will change this URL soon to take into account Foscams latest FW with changes in security protocols.

7. Fill in the user name and password. Click next.

8. You will NOT see an image. That is OK. Click Add. The camera is added and Vera refresh.

9. Click the wrench icon on the newly created camera device ("Foscam Camera"). Under Settings->URL use this URL insead of just "/snapshot.cgi"; "/snapshot.cgi?user=<USER>&pwd=<PASSWORD>". Save and refresh Vera.

10. Click the wrench icon again and change the "State" variable under "Advanced" from "-1" to "2". Save and refresh. You will get this message "Foscam Camera : Reload Luup to create motion sensor". Reload LUUP by  running this URL in a browser "http://<VERAIP>:3480/data_request?id=reload".

11. You will get a "Foscam Camera : Failed to configure camera" error.. You will also get a "Lua Startup Failure" error on the camera device. Panic (no, not really... just keep reading). The "State" variable has been changed to "1". Change it back to "2". Check that the "GatewayAddress" variable under "Advanced" is set to Veras IP. Save and reload.

12. Now for some Swedish "fulhack"! ;) Run this URL in a browser:
http://<cameraIP>:<port>/set_alarm.cgi?http=1&http_url=http://<cameraIP>/set_alarm.cgi?user=<user>&pwd=<password>&motion_armed=1&input_armed=0&motion_sensitivity=5&iolinkage=0&mail=0&upload_interval=0&schedule_enable=0&schedule_sun_0=0&schedule_sun_1=0&schedule_sun_2=0&schedule_mon_0=0&schedule_mon_1=0&schedule_mon_2=0&schedule_tue_0=0&schedule_tue_1=0&schedule_tue_2=0&schedule_wed_0=0&schedule_wed_1=0&schedule_wed_2=0&schedule_thu_0=0&schedule_thu_1=0&schedule_thu_2=0&schedule_fri_0=0&schedule_fri_1=0&schedule_fri_2=0&schedule_sat_0=0&schedule_sat_1=0&schedule_sat_2=0&http=1&http_url=http%3A%2F%2F<VeraIP>%3A3480%2Fdata_request%3Fid%3Dlr_foscam_tripped%26sensor_id%3D<motionsensorID>

You should get a reassuring "OK". Otherwise, try to remove the code bits about schedules (I had to do this on my 8910W). The URL should then look like this:

http://<cameraIP>:<port>/set_alarm.cgi?http=1&http_url=http://<cameraIP>/set_alarm.cgi?user=<user>&pwd=<password>&motion_armed=1&input_armed=0&motion_sensitivity=5&iolinkage=0&mail=0&upload_interval=0&http=1&http_url=http%3A%2F%2F<VeraIP>%3A3480%2Fdata_request%3Fid%3Dlr_foscam_tripped%26sensor_id%3D<motionsensorID>

Check the camera settings with URL "http://<cameraIP>/get_params.cgi". Check that "alarm_http" is "1" (not "0") and that "alarm_http" reads "var alarm_http_url='http://<VeraIP>:3480/data_request?id=lr_foscam_tripped&sensor_id=<motionsensorID>"

13. Reload Vera. The motion sensor should now work! It can be tripped and will reset to a secure status according to the "OnTime" variable under "Advanced" in the settings for the motion sensor device. The variable is in seconds, so the default 1200 is 20 min. I have set it to 300 (5 min.). It seems to work (another user had problems with values other than the default).

I use my Foscams as baby monitors. Now, after I have put the kids to bed, I can arm the motion sensor device using a Duwi wall switch and get voice notifications (using TTS) from my wall mounted tablet if something is up and about. When their naps are over I can bypass the motion sensor using the same wall switch and not get flooded by notifications when we are in the room playing!

I do not know why or how this works and the only thing I have done is using scraps of information found in these forums and trial and error. However, it seems to be working and I hope it could help someone else trying to get this to work!
« Last Edit: May 29, 2014, 02:56:48 pm by n0ir »

Offline neurolizer

  • Newbie
  • *
  • Posts: 4
  • Karma: +0/-0
Just want to confirm that this worked for me, which I am quite excited about ;D
My camera is a Wansview NCB541W with Firmware: 21.37.2.43 and Web UI: 0.7.4.5
Edit: Updated to Firmware: 21.37.2.52 and Web UI: 0.7.4.7 and it still works.

Some comments:

I did not do step 1 and my Vera is set as secure.

I did not do step 2, but did make sure to uninstall the plugin #3866 "VistaCam SD, PT & HD for UI5" so that I only have plugin #1978 "Foscam IP Camera" (I had been playing around with installing and uninstalling both of them throughout the day)

I received the OK response with the full URL your provided in step 12.

For step 13, I confirmed I was able to use a custom value of OnTime=60 and the sensor set back to untripped as expected.

Currently under Setup > Net & Wi-fi, my Vera is set to "Automatically configure" for "How does Vera connect to the Internet?" (aka Dynamic IP), so I'm pretty sure I need to set this to a Static IP (Manually configure). Otherwise, next time the router or Vera is restarted, Vera will get a new IP address and the Foscam Motion Sensor will stop working.

Thank you so so much for posting this! I never would have had the patience to get anywhere near figuring that out.
« Last Edit: May 30, 2014, 02:50:20 pm by neurolizer »

Offline that_kid

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
 I didn't do steps 1 or 2 and everything still worked fine, I already had my camera setup in vera but never could get motion detection working.  Thanks for the writeup

Offline pentium

  • Full Member
  • ***
  • Posts: 185
  • Karma: +9/-0
Thank you so much for doing this writeup.  I am about to start right now.  I have 5 cameras using three different apps and I am going to consolidate all into the foscam app.  I assume it is important to uninstall those other apps for some reason.

I would like to add step -1.  Take a backup.

I will let you all know how it goes.  Very scary deleting all of my cameras

Offline pentium

  • Full Member
  • ***
  • Posts: 185
  • Karma: +9/-0
What an experience.  I feel great that I have consolidated all of my cameras into one app, and it is working with the new firmware on the cameras and using the new password system well.

One problem.  I have two easyn cameras and one foscam 8910w, all three use the same firmware and UI.  Only one of the EasyN cameras has pzt capabilities  working, the foscam and the other easyn camera show pictures, but do not allow pzt commands nor go to presets.  In the foscam ui, they all have pzt capabilities.      Any ideas for how I can fix the pzt on the other two cameras?

I am using ui5, on veralite, the camera firmware for all three is 11.37.2.59. 

In case it helps someone, I also have a foscam 8907w camera which does not even have pzt capabilities.  I executed all of the instructions stated here for this camera and it is also working.  This camera uses a different firmware than the other three. 

One other problem.  The first camera took me over an hour to do.  I think I did the other three in thirty minutes.  The problem was that Chrome would not allow me to save the new password url.  I had reloaded, rebooted, everything a few times, but just changing to internet explorer took care of it.  Once I could save that url, it worked.

and repeating, any help with my pzt issues would be greatly appreciated.

Also, I have a d-link camera that was previously using the vistacam app (I think).  I want to add it back and don't know whether to reinstall the vistacam app or try using the foscam app.  Any experience out there?

Offline pentium

  • Full Member
  • ***
  • Posts: 185
  • Karma: +9/-0
Well, I believe that I am completely and successfully installed and upgraded.  I was just about to downgrade the firmware to one that I knew worked when I noticed that the UI version level that is mentioned above (2.4.10.10) was not the one that came packaged with the 11.37.2.59 software upgrade.  So, I reinstalled UI version level 2.0.10.12 and now everything is working. 

And just to prove karma or murphy's law.  I have a motion detector on my carport to detect people messing with my car at night.  Part of the action is to move my camera into position and email me some pictures.  The one night that someone set off the motion was the night that I did all of this work on the cameras and I had failed to update the veraalerts with the new camera id's.  So, no pictures from last night.  All better now.

I'm sorry for bogging up this thread but I always enjoy when someone comes back and says what worked.  Biggest change I would make to the given instructions:  Do a backup.  Do Two!

Offline JPCV

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
Hey pentium,
Thanks for an amazing guide, everything was working fine with me, however I cannot see any video on the Foscam Camera (FI8910W). the camara works since i can see it if I access it directly. Do you have any idea of what may be causing this problem?
Regards

Offline pentium

  • Full Member
  • ***
  • Posts: 185
  • Karma: +9/-0
Well in this case, you have something wrong in the userid and password.  With the updated firmware, you much include them in the url line.  I can't take any credit, the original, amazing, information came from nOir.

Offline TheUberOverLord

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Please note this is very easy to do using GUI vs. a command line.

Since 2012 I have had a version that when using it with an Admin Level User Id will allow you do this with nothing special such as a command line.

You won't see these options if you use the Interface with a Visitor or Operator User Id and you won't see the option to enable Email or FTP for alarms if your camera has no User credentials defined for them.

More here:

http://foscam.us/forum/free-generic-browser-interface-for-foscam-ip-mjpeg-cameras-t2522.html#p10970

Don

Offline sixsixsix

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
You're a damn genius n0ir. Thanks for taking the time to make this topic.

Offline therealabdo

  • Sr. Member
  • ****
  • Posts: 338
  • Karma: +1/-0
Thanx for the EFFORT!

Offline Welchap

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
+1 - just got my first Foscam and following these instructions had me up and running faultlessly in minutes.

Awesome work.

thanks

Offline Dvbit

  • Jr. Member
  • **
  • Posts: 67
  • Karma: +0/-0
Great work!
thanks for the guide.
I finally managed to reconfigure my camera after reformatting the vera
Vera2, Many Fibaro switches, OpenSprinkler, Foscam, Kodi, Harmony Remote, Fritzbox, DreamBox...

Offline djmklm

  • Newbie
  • *
  • Posts: 10
  • Karma: +0/-0
I am trying to follow the guide and originally had the FosCam plugin installed along with the VistaCam and Panasonic Camera plugins. I uninstalled all but the Foscam plugin and when I goto add a camera it does not list "Foscam Camera" in the drop down for Camera type. I have tried various uninstalls and reboots of the Vera since, then reinstalling the Foscam plugin and still no luck. The list still shows the Panasonic and VistaCam types, but no Foscam. I even verified that there were no other camera files in the /etc/cmh* directories, at least as far as I could tell.

Any thoughts to help?

EarlyMorningHours

  • Guest
Deleted
« Last Edit: February 09, 2016, 01:38:40 pm by EarlyMorningHours »