SmartThings Community

[RELEASE] Foscam Camera Device Handler Universal DTH with Discovery, Live Video Streaming, Motion Sensor/Alarm Integration - SD (FI89xx), HD Ambarella FI98xx, FI99xx, Cx, Gx, Rx, Ex, Zx, Fosbaby

In the new App, yes, I need to +Add a Thing…

I did all your step by step, but the crush continue…

Again, no, you don’t - follow the instructions and the device will show up.

1 Like

@RBoy any thoughts on the new Foscam FN3104W-B4-1T 720P WiFi Wireless Security System, 4-ch NVR? Do you think this will integrate using the current Device Handlers and your SmartApp?

Sorry, I dont know if my app, but when you create a new device via code, its not appear directly in “My Things” you need to tap in Add a Thing, if not, you never see this new device… Im trying all the ways, but the error is the same…

BTW, Im adding other devices, and I have no problem…

I have an interesting one… for some reason my cameras keep getting “turned off” which apparently stops them from reporting motion.

I turn them on, they work… then eventually they go off.

...  5:52:21 PM: trace IPAddress xx.xx.xx.xx is a public IP Address
...  5:52:21 PM: info Polled: Flip Status 0, Mirror Status 0
...  5:52:20 PM: trace Received response from camera to httpGet, headers=text/plain, status=200
...  5:52:20 PM: info Polled: Motion Alarm Callback Notification Disabled
...  5:52:20 PM: trace Using cached IPAddress=xx.xx.xx.xx
...  5:52:20 PM: trace Sending httpGet command -> http://xx.xx.xx.xx:202/get_params.cgi?user=[insert user here]&pwd=[yeah that's not happening]
...  5:52:20 PM: trace Motion: None, Armed: Off
...  5:52:20 PM: trace Using cached IPAddress=xx.xx.xx.xx
...  5:52:20 PM: trace Motion: None, Armed: Off
...  5:52:20 PM: trace Received response from camera to httpGet, headers=text/plain, status=200
...  5:52:19 PM: trace Sending httpGet command -> http://xx.xx.xx.xx:202/set_alarm.cgi?motion_armed=1&motion_sensitivity=5&motion_compensation=1&sounddetect_enabled=0&sounddetect_sensitivity=9&mail=0&upload_interval=0&user=[insert user here]&pwd=[yeah that's not happening]
...  5:52:19 PM: trace Motion Level is Low
...  5:52:19 PM: debug Enabling Alarm
...  5:52:19 PM: debug Toggling Alarm

There’s apparently nothing doing this – that I can tell – but I’m sitting at the IDE now watching events go by waiting to see if somehow there’s something turning it off.

I removed my camera from the app then followed the instructions on this page, like you recommended:

After i create the device, it shows up in my Things, and i configure it with the IP, user/password, port, etc. I save the info, go back to the camera, hit the refresh button, but still cant get the stream in the app. I touch the stream box, it says in the top right that its Active, but i get a black box that says “Camera Unavailable”.

I can stream the camera in a browser, as well as set up the camera in smarttiles. Any tips on getting it to stream through the app?

Hi all,
I installed this smartapp and got it workingbut with the following limitations:

  • I have to change the IP if I am on my internal wifi or not (internal/external IP). Is there a way to specify both IP so that the app switches to one or the other automaticaly ?
  • When I watch the stream through the smartapp, as soon as I press any button the stream stops. It is problematic as if I want to rotate the camera it shuts the stream down
  • My camera is upside down and I select flip and mirror in the settings but it’s not consistently working (sometime it does, sometime it doesn’t).
    Any help is appreciated here.
    My Foscam is a FI8918W

Hi guys, I just discovered this great app, but it looks like is down. Is the handler and the monitor smartapp listed anywhere else?
Can anyone send it to me?


Sorry about that. We’re working with the ISP to get it back online. It
should be up in a few hours.

Hello is anyone able to confirm compatibility of this with the Foscam R2?

One more thing, when I create the new device, I can see something called “Tiles Missing” in my “Things” section, but its not the name for my new device… when I click on this “Tiles Missing” thing, the apps crash.

@mixhabier you should not add a thing but add a device from the smartthings IDE as explained in the doc (
Then fill a name, a device network id(2000, 2001+++), type “RBoy Foscam IP Camera”, version published and select your hub then click create and it will appear in your devices list.

1 Like

The website is back up now. Thanks for your patience.

Im doing this, but appears a “thing” called “Tiles Missing”, if click, then crash. If dont click this thing but I selected add a thing, then crash too. So… is not working for me, maybe I have another problem, but its only with this DH. :frowning:

In the preferences page. Sound camera alarm

@RBoy, in the Foscam Motion Alarm Monitor I had to bypass the LongURLService from line 777 as doesn’t exists anymore apparently. Looks like it’s working for me now but I am not sure if this is an acceptable fix. You should also fix that issue in your code.

1 Like

Guys, sorry… Layer 8 problem… my mistake! I configured the SmartApp in the Device Handler section :sleepy:

Sorry again!

Some folks have been having trouble on figuring out how to configure the Foscam C1 (and any similar camera using RTSP ports) in ST to get video streaming and getting it to work with SmartTiles. A big thank you to @tsatrom for helping put this step by step guide.


  1. Login to cameras by typing the cameras ip address into web browser.
  2. I statically assigned the camera under “Network” and then “Network Configuration.”
  3. Under “Network” Then “Onvif” you need to make sure it’s enabled and that “RTSP Port” is 554.


  1. Login to your router and forward port 554 to the ip address of your camera.


  1. Login to your IDE at (create a login if you don’t have one AND opt in for the developer account)
  2. Click on “My Device Handlers”
  3. Click on “+Create New Device Handler” on the top right
  4. Click “From Code”
  5. Copy paste Rboy’s code into the editor and click “Create”
  6. Click “Publish” and then “For me” on the top right
  7. Click on “My Devices”
  8. Click on “+New Device” on the top right
  9. Enter a “Name”
  10. For “Device Network Id *” enter 2000. (2001 for second camera etc.)
  11. Under "Type " select the new device type you just created (it will show up at the bottom of the list called as *RBoy Foscam IP Camera) (IMPORTANT: Do NOT select Foscam from the middle of the list)
  12. Select your “Hub” (very important step!)
  13. Select your "Location"
    15, Click “Create”


  1. Open you SmartThings App on your phone (iPhone or Android),
  2. Under “Things” (in the Location page, bottom bar second tab with the 4 squares) look for your new device.
  3. Open the device page, on the top right click on the 3 vertical dots and select “Edit Device”
  4. Enter the camera IP Address of your C1 Camera,
    For port, put 80. Enter camera username and camera password (both un and pw are case sensitive).
    IMPORTANT - The C1 uses the RTSP port. Type in “554” and and click Done.
  5. Scroll down and click on “Refresh” circular arrow icon to load the new settings.
    You’re Done! Your camera should now work in Smartthings!

###SMARTTILES (only needed if you want to use the C1 in Smarttiles.)
Important you need to forward another port (in your router) other than 554 to use with SmartTiles. (Example: Port: 8080)

  1. Make sure you have Smarttiles installed already.
  2. Open the Smartthings app on your phone and under “Automation” and then “SmartApps” open “SmartTiles (Connect)”
  3. Select your dashboard list and scroll down to “Video Streams.”
  4. Select “Stop Motion Video Streams”
  5. Enter how often you want the tile image to refresh. (I used 2 seconds so it refreshes faster.)
  6. Enter a “Title” in.
  7. Enter the Image URL in: http://CAMERAIP:PORT/cgi-bin/CGIProxy.fcgi?usr=USERNAME&pwd=PASSWORD&cmd=snapPicture2
    Replace CAMERAIP with your cameras ip address. Replace PORT with your newly forwarded port. (NOT 554)
    Replace USERNAME with your camera username and PASSWORDS with your cameras password.
  8. Lastly, Hit “Done” and you should be good to go.

I have the foscam FI9900EP to get the video stream is the only option I have for streaming is using the stop motion?

Could I possibly get some help with this, I have followed all of the above instructions, but still just get a back tile in smarttiles. What am I doing wrong?