# Foscam: Recommended Model

**URL:** <https://community.smartthings.com/t/foscam-recommended-model/1066>\
**Category:** Connected Things\
**Created:** [January 3, 2014, 11:44pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066 "2014-01-03T23:44:43Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![vvarlock](https://avatars.discourse-cdn.com/v4/letter/v/d78d45/32.png) [@vvarlock](https://community.smartthings.com/u/vvarlock)\
**Post date:** [January 3, 2014, 11:44pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/1 "2014-01-03T23:44:43Z")

</div>

From reading the forums it looks like full support for Foscam devices is still under development. I am curious though, will SmartThings support all foscam models or is there a subset of model types that are being tested against. If I were to get a Foscam now which would have the greatest changes of working with SmartThings once it’s fully supported?

---

<div class="post-metadata">

**Author:** ![imbrian](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/imbrian/32/82733_2.png) [@imbrian](https://community.smartthings.com/u/imbrian)\
**Post date:** [January 4, 2014, 12:27am UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/2 "2014-01-04T00:27:17Z")

</div>

@vvarlock - I made this device type inspired by the work of many (including @megapixel ):

> **[imbrianj/foscam](https://github.com/imbrianj/foscam)**
>
> Foscam device type to support dynamic input of credentials and enable / disable motion alarm to easily integrate into homemade security systems. Polls to find alarm status. Largely taken from ht...

I use it primarily for basic security - and I use this app to arm / disarm it:

> **[imbrianj/secure\_my\_foscam](https://github.com/imbrianj/secure_my_foscam)**
>
> Simply turns on the alarm for any Foscam custom device. This is intended to be used with the Foscam custom device type with a camera set up for FTP or email uploading based on motion detection. - ...

If that device controller doesn’t do what you need, let me know and I can probably add it.

---

<div class="post-metadata">

**Author:** ![imbrian](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/imbrian/32/82733_2.png) [@imbrian](https://community.smartthings.com/u/imbrian)\
**Post date:** [January 4, 2014, 2:41pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/3 "2014-01-04T14:41:51Z")

</div>

oh, and since I apparently totally ignored your pointed question: I use the foscam fi8910w

---

<div class="post-metadata">

**Author:** ![chevyman142000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chevyman142000/32/82729_2.png) [@chevyman142000](https://community.smartthings.com/u/chevyman142000)\
**Post date:** [January 4, 2014, 5:22pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/4 "2014-01-04T17:22:14Z")

</div>

Brian- Thanks for that code. I updated the stuff I had from Danny using yours. However, I’m still having issues getting connected to mine. It used to work until I update the firmware and web ui on it in I believe November. Any thoughts? My guess is because of the way the “new” web ui works now. When logging into the camera with Internet Explorer, it no longer pops up with the window asking for credentials, it now takes me to a page asking for them. I believe my model is the fi8918w. Let me know if you have any ideas on how to fix.

Thanks!

---

<div class="post-metadata">

**Author:** ![trotsky40](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/trotsky40/32/275_2.png) [@trotsky40](https://community.smartthings.com/u/trotsky40)\
**Post date:** [January 4, 2014, 5:41pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/5 "2014-01-04T17:41:08Z")

</div>

@chevyman142000

Try changing the URL to “/snapshot.cgi?user=####&pwd=####” (essentially moving the username and password to the end of the URL).

I am still running some of my Foscams through my Vera and this is what I had to do after the most recent firmware update.

---

<div class="post-metadata">

**Author:** ![chevyman142000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chevyman142000/32/82729_2.png) [@chevyman142000](https://community.smartthings.com/u/chevyman142000)\
**Post date:** [January 4, 2014, 5:59pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/6 "2014-01-04T17:59:01Z")

</div>

`httpGet("http://${settings.username}:${settings.password}@${settings.ip}:${settings.port}/snapshot.cgi")`

That’s what the original code was. I changed it to this:

`httpGet("http://${settings.ip}:${settings.port}/snapshot.cgi?${settings.username}:${settings.password}@")`

This is the errors I see in the log when trying to capture a picture.

5:56:46 PM: error null: Name or service not known  
5:56:46 PM: debug [http://null](http://null):null/get\_params.cgi?user=null&pwd=null

---

<div class="post-metadata">

**Author:** ![chevyman142000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chevyman142000/32/82729_2.png) [@chevyman142000](https://community.smartthings.com/u/chevyman142000)\
**Post date:** [January 4, 2014, 6:01pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/7 "2014-01-04T18:01:45Z")

</div>

Just kidding. I went into preferences and set the parameters. It now sort of works…I was able to arm and disarm the alarm, but I get an error when trying to capture a picture. It says unauthorized. I’ll keep digging in the code and see what I can find.

---

<div class="post-metadata">

**Author:** ![chevyman142000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chevyman142000/32/82729_2.png) [@chevyman142000](https://community.smartthings.com/u/chevyman142000)\
**Post date:** [January 4, 2014, 6:06pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/8 "2014-01-04T18:06:09Z")

</div>

If it helps, this is what I see when trying to capture a photo. All other commands seem to work so far. FYI, I did take the url and login info out. 🙂

```auto
 6:04:00 PM: error Unauthorized
  6:04:00 PM: debug Take a photo
  6:03:53 PM: debug http:///decoder_control.cgi?user=&pwd=!&command=31

```

---

<div class="post-metadata">

**Author:** ![imbrian](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/imbrian/32/82733_2.png) [@imbrian](https://community.smartthings.com/u/imbrian)\
**Post date:** [January 4, 2014, 8:48pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/9 "2014-01-04T20:48:28Z")

</div>

Hard for me to test as I only have the one camera - but if you have a pull request (assuming it doesn’t break things for me), I’d love to have it working with more devices. Sorry I couldn’t be more help.

---

<div class="post-metadata">

**Author:** ![trotsky40](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/trotsky40/32/275_2.png) [@trotsky40](https://community.smartthings.com/u/trotsky40)\
**Post date:** [January 4, 2014, 10:26pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/10 "2014-01-04T22:26:40Z")

</div>

@chevyman142000

Try this instead:

`httpGet("http://${settings.ip}:${settings.port}/snapshot.cgi?user=${settings.username}&pwd=${settings.password}")`

I am able to use this to get an image with my Foscom 8907 with the latest firmware (looks to be same version as the 8918). It’s fixed camera so I can’t test pan and tilt.

---

<div class="post-metadata">

**Author:** ![chevyman142000](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/chevyman142000/32/82729_2.png) [@chevyman142000](https://community.smartthings.com/u/chevyman142000)\
**Post date:** [January 4, 2014, 10:31pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/11 "2014-01-04T22:31:42Z")

</div>

You rock! That fixed it!! Thank you thank you!

---

<div class="post-metadata">

**Author:** ![ddarvish](https://avatars.discourse-cdn.com/v4/letter/d/bbe5ce/32.png) [@ddarvish](https://community.smartthings.com/u/ddarvish)\
**Post date:** [January 16, 2014, 1:43am UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/12 "2014-01-16T01:43:49Z")

</div>

can someone point me in the direction of basic guides which describe how one can add a custom thing like the camera to their hub?

---

<div class="post-metadata">

**Author:** ![llcanada](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@llcanada](https://community.smartthings.com/u/llcanada)\
**Post date:** [March 12, 2014, 6:36pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/13 "2014-03-12T18:36:07Z")

</div>

Do I have to create a new device for each foscam that I have? Also where is the image from the camera store? Can I download it to my hard drive?

---

<div class="post-metadata">

**Author:** ![johnpalmer](https://avatars.discourse-cdn.com/v4/letter/j/3da27b/32.png) [@johnpalmer](https://community.smartthings.com/u/johnpalmer)\
**Post date:** [March 12, 2014, 8:26pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/14 "2014-03-12T20:26:02Z")

</div>

I was wondering the same thing as Davis. Where/how do you add the code for things like the foscam camera? Read posts about adding things but I have no idea how to do it. Thanks!

---

<div class="post-metadata">

**Author:** ![joylove](https://avatars.discourse-cdn.com/v4/letter/j/a587f6/32.png) [@joylove](https://community.smartthings.com/u/joylove)\
**Post date:** [May 10, 2014, 11:28pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/15 "2014-05-10T23:28:59Z")

</div>

Subscribing for updates to the questions.

---

<div class="post-metadata">

**Author:** ![llcanada](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@llcanada](https://community.smartthings.com/u/llcanada)\
**Post date:** [July 13, 2014, 3:19pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/16 "2014-07-13T15:19:15Z")

</div>

@imbrian when i updated to your 5/2/14 code for Foscam I get the following error?? any idea what or what can I do to fix it.

Thanks

---

<div class="post-metadata">

**Author:** ![llcanada](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@llcanada](https://community.smartthings.com/u/llcanada)\
**Post date:** [July 13, 2014, 3:19pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/17 "2014-07-13T15:19:40Z")

</div>

Sorry here the error message

java.lang.RuntimeException: Metadata Error: input() can only be invoked inside a section definition @ line 21

---

<div class="post-metadata">

**Author:** ![imbrian](https://yyz2.discourse-cdn.com/smartthings/user_avatar/community.smartthings.com/imbrian/32/82733_2.png) [@imbrian](https://community.smartthings.com/u/imbrian)\
**Post date:** [July 14, 2014, 1:12am UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/18 "2014-07-14T01:12:12Z")

</div>

I’ve just updated it - can you see if this works?

> <https://github.com/imbrianj/foscam/blob/master/foscam.groovy>

---

<div class="post-metadata">

**Author:** ![llcanada](https://avatars.discourse-cdn.com/v4/letter/l/bb73d2/32.png) [@llcanada](https://community.smartthings.com/u/llcanada)\
**Post date:** [July 14, 2014, 1:19pm UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/19 "2014-07-14T13:19:23Z")

</div>

@imbrian Thanks so much works good. Thanks for all you do for us.

---

<div class="post-metadata">

**Author:** ![thinklarge](https://avatars.discourse-cdn.com/v4/letter/t/ed655f/32.png) [@thinklarge](https://community.smartthings.com/u/thinklarge)\
**Post date:** [July 18, 2014, 3:42am UTC](https://community.smartthings.com/t/foscam-recommended-model/1066/20 "2014-07-18T03:42:21Z")

</div>

@imbrian have you been able to get LAN working for your foscam? I’m really curious about this. I’ve been trying to do it for a while now and I haven’t been able to get it done. I followed your steps for configuring the foscam for a public ip.

Just curious if you’ve done anything with that recently. Thanks for all your work man!

[Next page](https://community.smartthings.com/t/foscam-recommended-model/1066.md?page=2)
