Foscam HD Camera Device Type

I couldn’t find another post for this so here is a device type for Foscam HD cameras. I started off with the code from @imbrian’s Foscam device and then changed it to work with the HD cameras since the API calls are different and I added some new features and icons. I haven’t programmed in years and this is my first time using this language so there is probably still a lot of cleaning up to do.

I have only tested this with a FI9821W V2 and only HTTP so far.

The following features are available:

  • Take a snapshot
  • Toggle the infrared lights (Auto, On, Off)
  • Enable/Disable motion alarm
  • Go to and set preset locations
  • Enable cruise maps
  • Control PTZ
  • Reboot

-When refreshing the IR mode will only show either Auto or Manual because there’s currently no way to poll for on and off in manual mode.

  • You need to manually enter the names of the presets and cruise maps in the settings because the API for the HD cameras uses the actual names instead of numbers now.
  • You can’t change a preset if it is set as your start-up preset.

If you find this app useful, please support the developer:


Gracias. I installed one of these for a buddy and he was disappointed that he couldn’t “arm the motion when he left”. Maybe now I can get that feature to work for him! Can you enable the motion alarm when the mode is “away”?

@longhorn84 I’m a little new to this but I’ll see what I can do. I’m also testing the commands sending from the hub.

@longhorn84 here you go…

I also made one to turn on the alarm based on presence.

1 Like

awesome! I’ll have to try it out. This is for the HD version only right?

@longhorn84 It works with the non HD cameras also.

I added your device type (foscam HD) and am trying to use it with foscam 8918, and although the device shows up in smartthings app with all its buttons, (and I’ve configured ip address and user and pass…) it doesn’t seem to function…any ideas?

@smartthing Try @imbrian’s Foscam device type. My device type only works for the HD cameras which I believe are all 9xxx series. I’m having trouble finding his forum post but here is the link to the code…

Thanks for the link, I couldn’t find it either…so the camera seems to be responding…however, when you click ‘take’ , where does the snapshot go? and also, should it work if I input the local ip address? I have dynamic ip so the local would be much better…

I think @pstuart has some code for local foscam control.

And when you press “take” the snapshot is supposed to be delivered to the whitespace between the header and the buttons.

@smartthing Here is the link to @pstuart’s

I’m going to modify this one to work internally eventually also but his should work for you.

When referencing Foscam IP, is this my external internet IP for the foscam device or is it my internal ip to the camera on my home network?


@pitchdarkice This device type uses the external address. I made another one (minus the PTZ control for now) using the internal address.

I have this working for two cameras. I have not been able to get my FI8602W working however. The URL to the snapshot is /tmpfs/auto.jpg. Should this device type work with this camera?

@acastal This device type only works with HD cameras. I created a device type that works with the internal IP address for both HD and non-HD cameras you can find in the post above yours. I haven’t implemented external addresses for that yet though. If you need to use an external look for imbrian’s Foscam device type.

Hi, I just installed the Foscam as a device. Mine is a non HD version.
Should I see the live video in the upper space?

The only images I can see are of the pictures I take.

It’s hard to get the camera in the correct position if you can’t see the live feed.
Or did I do something incorrectly?


@iamccf SmartThings doesn’t support video for this yet.

For me this should be a priority for ST to become 100% pure awesomeness.

We have plan to be 100% pure awesomeness so we won’t disappoint you.

It won’t be in a blink of an eye, but video is on our roadmap.


@thegibertchan Have you compared the Foscam HD capabilities vs Dropcam? I ended up returning my Dropcam due to the constant motion alerts for window shadows and sun movement. As far as I can tell, you can’t define an alert area unless you are buying their cloud storage. Foscam allows you to record to ftp, local SD card, email pics, etc. I’ve had some issues with Foscam HD cams as well, but a lot more out of the box for 1/2 the price. Hope to hear of progress soon, and specifically which Foscam models. The FI9821W’s are popular, often on sale and good value. Thanks!