[OBSOLETE] Foscam Camera Device Handler Universal DTH with Motion Detection - SD (FI89xx), HD Ambarella FI98xx, FI99xx, Cx, Gx, Rx, Ex, Zx, Fosbaby

Your camera need to be able to communicate directly with the phone. Check
your network setup. Video goes from phone to camera directly. Also depends
upon your phones codecs and network quality (ST video player is very
sensitive to errors and delays )

Thanks! One question though…given tinycam Pro on my phone works perfectly, doesn’t that imply that my phone is able to communicate directly with the camera?

I can try on a different cell phone to see if it’s my old and slow samsung s4 that’s causing the issue.

Hi @RBoy,
I wanted to follow up on this and give you a few more insights.

  1. The reboot didn’t fix the mirror/flip issue. I’m using the “Surveillance Pro” iPhone App, perhaps using a 3rd party app together with the Smart App, makes this more complicated.

  2. I decided to reset both cameras to factory settings to restore the ability to send emails on motion.
    If I only install the devices using your Smart App code (Without the Device Handler) the emails are regularly sent on motion, and I can still view / control the cameras from the SmartThings app.
    Of course, I won’t receive push notifications because the Device Handler is not running in the background, but at least I can receive emails with pictures.

So, I assume the issue is related to the Device Handler changing some of the camera settings that I’m not able to see from the web admin interface.

Hope this helps to isolate the problem.

In the meantime I got everything working using a combination of SmartThings App, your Smart App config, IFTTT and Foscam email notifications.
In order to get push notification on motion alert, I’m using Boxcar.io

Also, on an iphone I get the error “Camera cannot be found. we are trying to connect.” whereas on my Android I get “Camera unavailable”. Seems odd to get 2 different error messages with the same settings.

For whatever reason, it works after deleting the device and device handler and re-adding both with the same settings. All good now!

###Foscam Camera Universal Device Handler - version 03.04.01

  • Added support for R2, C2 and FI9900P (Ambarella based next gen Foscams)
  • Added support for Foscam cloud uploading pictures/videos (Ambarella Foscams)
  • Added support for Human detection mode (Ambarella Foscams)
  • Added support for native Foscam app push notifications (Ambarella Foscams)
  • Added support for PIR and Motion sensor controls (for cameras which support it)

###Foscam Motion Alarm Monitor SmartApp - version 02.07.01

  • Fixed issue with SD camera motion detection not working due to third party service disruption
  • Added option to disarm cameras for SHM Stay mode

Thank you to the Foscam engineers for their help with the next gen chipsets

3 Likes

Hello All,

I am new to Smarthings and this is my 1st post. I have some basic questions regarding integrating Foscam.

I set up my hub and have purchased two Foscam C2 1080P cameras. I also purchased a life subscription to Roys website where I hope to soon download the alarm monitor and the foscam device handler. Thanks Roy for your work, happy to help support you.

I am leery of downloading the foscam app to my android phone because it has terrible reviews and lots of talk about it being a big battery drain.

I think however that I need it to set the cameras IP, port, username and password. Is this correct?

Once I do that (set up the camera) I also need to go into my router and set port forwarding for that IP is this correct?

Then I follow the instructions at the beginning of this thread to install the device handler and the alarm monitoring code from Roys site.

Then I try and make it all work and come back here for help and post my experience.

Does that seem like the logical order of things?

Thanks in advance for helping a newbie out.

Yes get your cameras up and working first, configure your router. Last step is following the instructions for ST integration.

1 Like

OK,

Got one up and running. to get to configure setting I had to download and install equipment search from the foscam website. then install IP cam client. I went through the config wizard and when it got to IP I turned off DHCP and left the IP it was at as the static ip.

I now get “the default gateway is not on the same network segment by IP address and subnet mask definition” message

subnet is 255.255.255.0
Gateway says 255.255.255.129

I’m not sure I should really publish the IP here.

I also went into the router to see what kind of damage I could do there and was able to see under “LAN IP address allocation” my device by MAC address. I set that device to “Private Fixed” where the address is the same as showing in IPcam client. I see no where where I can do port forwarding. Maybe I don’t really know what port forwarding is. The port that ipcam client is showing for my camera is 88.

How do I really set the IP address for the camera and not get that error and how do I set up port forwarding?

Thank you in advance

I did an ipconfig and got a gateway of 192.168.1.254. I changed the gateway in the foscam GUI to that. I no longer get that error message.

in the router I picked the cameras MAC and created an application profile name called security cameras, set the protocol to TCP, port range 88 to 88. under application type I let it blank no idea what to pick.

I now see under firewall allowed applications list my cameras MAC address, with protocol TCP, port 88 and a public IP address.

I created the device as per Roys website and see the camera in my smart things app. I select it and go to settings, Username and password are good, case on them is fine. I set port to 88, I set the public IP the router gave me. I turn off wifi on my phone. I try to connect to the camera from outside my LAN with no luck. I change to the cameras direct IP no luck. I try both IPs, public and static from inside my LAN with wireless on still no luck.

I notice that on my foscam GUI under network I don’t have the option ONVIF or a way to enable that. Is that because I am using a C2

Under network tab>port I have:HTTP 88, HTTPs 443, ONVIF 888.

I have read 390 posts LOL and still can’t figure this out.

Any help or suggestions or other resources to read would be appreciated.

Thank you

Try using the default ONVIF port 554 (set it in the camera GUI and then in the ST app preferences). Start with getting it work on your LAN through WiFi before attempting to get it to work from outside which can be troublesome if you router doesn’t port forward correctly. Make sure the basics are working first before trying video.

1 Like

thanks for the quick response.

tried that and used both the static IP assigned to the camera and the public IP to no avail. still getting “camera unavailable” with the word Active in the upper right corner.

Then you phone codecs aren’t compatible with the camera.

1 Like

1st phone was a Samsung Galaxy Note 4. I just tried it on my apple 6S and it doesn’t work on it either.

Both phones connect to and stream video via the foscam app. Wouldn’t that imply that the phone codecs are compatible with both phones?

There has to be something screwy with the way I have the gateway and subnet set up.

subnet mask is 255.255.255.0
Gateway is 192.168.1.245
dns server is the same as gateway
secondary dns server is also the same.

hum,

I deleted everything and started from scratch. Now in LAN or outside of LAN I can turn led on/off, turn off/on detect and take snapshots, could not do that before.

Still no streaming from either my Galaxy Note 4 or my iPhone 6S

Same thing on my wife’s Galaxy S4. Everything but streaming works.

Device network ID keeps reverting to c0a80157:0058 after configuring settings in the ST app. It wont stay at 2000. is this supposed to happen?

Make sure your username has Administrative rights on your camera otherwise most features like motion detection, presets, cruises, LED’s etc will not work.

Custom motion detection area settings

If you camera supports custom motion detection area settings, you can configure them directly on your camera using the native Foscam mobile app or using the camera portal. The device handler will automatically read and use those settings. Tap the refresh tile to have the device handler read them again after making any changes. If you’re looking to manually configure the detection area on your camera see this post.

Troubleshooting tips:

  1. Please DO NOT change the Network Id. The device handler will set the appropriate Network Id. This field is used by ST to identify and communicate with the device, if you change this, ST has no idea how to communicate with the camera and all communication will stop. You should ONLY change settings available through the Device Preferences page on ST phone app after installation and not directly from the IDE.
  2. You should use the LAN IP of your camera first to test the basic camera controls from your ST app. Make sure your username (case sensitive), password (case sensitives) and ports (HTTP) match what’s configured on the camera. Also make sure that the camera username has admin rights on the camera otherwise it will not work. ST does NOT support HTTPS currently for LAN IP’s. Once the LAN IP is working, if you want to use a public IP address, then make sure you’re configured your router to forward the necessary ports to your camera and enter your router’s public IP address into the ST camera configuration.
  3. Make sure P2P is disabled on your camera as this can mess up the IP address and even Classic app video streaming.
  4. Make sure your hub can communicate with the camera, they need to be on the same IP subnet and no firewall/rules should block the communication between them. This is number one reason why controls don’t work. You can verify this by opening the IDE Live Logging and looking at the commands sent by the hub to the camera, if you don’t see a BLUE INFO response from the camera that indicates that the hub and camera are not on the same network (assuming the IP address and ports are incorrect). If the username or password are incorrect you’ll see a RED response from the camera indicating the same. No response from the camera (BLUE INFO messages) indicates a communication issue between the hub and camera network setup.
  5. Reboot hub + camera + wifi router, this helps a LOT in reducing delays and improves communications (it’s like windows, it should be rebooted every one in a while to keep it running smooth and fast)
  6. Make sure your phone can contact the camera directly (most common issue, i.e. needs a way to reach, check subnets, network configuration, wifi setup, if you’re using an external IP then port forwarding, firewall etc). If you’re using a LAN IP address in your ST device settings then you phone should be on the SAME LAN subnet as the camera for streaming to work. If you’re using a public IP address than you can access it from outside the LAN but make sure port forwarding is enabled on your router for the appropriate ports. Also see the point above about network latency for cellular networks. If you’re trying to access your public IP address from within your LAN make sure your router supports/enabled NAT loopback otherwise it won’t work
  7. Double check device handler settings
  8. Make sure you used the Foscam Camera Manager SmartApp to add your Camera to SmartThings (don’t directly create a manual device)

Video streaming for the Classic App

FOSCAM C1 VIDEO CONFIGURATION (and cameras using Onvif RTSP)

FAQ: Folks using the Foscam C1 camera need to do the following steps to enable video through the ST app:

  1. Login to the Foscam Web GUI (also make a note of your camera’s HTTP port on your web page address)
  2. Click on Network -> Onvif
  3. Enable Onvif and set the RTSP port to 554
  4. Open the ST Camera settings page and enter 554 under the RTSP port
  5. Click Done AND CLICK REFRESH (if you don’t click on Refresh, the tile with the circular arrow, the settings won’t take effect. Anytime you change the camera settings you need to click Refresh thereafter).
  6. If you’re using an external IP make sure you enable port forwarding to port 554 to the camera (avoid UPnP)

FOSCAM C2/R2/FI9900P VIDEO CONFIGURATION (and other SD/HD/Ambarella cameras)

FAQ: These cameras do NOT use Onvif and instead use the HTTP port (get it from your Camera Web GUI login page URL)

  1. Open the ST Camera settings page and enter the HTTP port in the Camera port setting
  2. Leave the RTSP port blank/empty
  3. Click Done AND CLICK REFRESH (if you don’t click on Refresh, the tile with the circular arrow, the settings won’t take effect. Anytime you change the camera settings you need to click Refresh thereafter).
  4. If you’re using an external IP make sure you enable port forwarding to the HTTP port to the camera (avoid UPnP)

Troubleshooting Video Streaming in the Classic App

If it helps we’ve been playing with a variety if phones and connection types (Anrdoid phones, iPhones, tablets etc), 3G, 4g LTE, wifi public wifi private, different cameras blink, foscam etc. we’ve realized a couple of things, basic checklist for getting video streaming to work:

  1. It can take multiple tries to get video streaming to work, this is due to the nature of the camera and ST video tile. It depends upon the quality of your connection from the phone to the camera (direct connection) and phone codecs.
  2. It also helps if, the first time you’re connecting, you first login to the Camera Web GUI and have the video streaming page open while trying to connect to the camera video stream from the ST Classic app.
  3. The Classic app video streaming ability depends upon the phone capabilities. It needs to support the codec and stream type parameters. Just because the native foscam app works doens’t mean the ST app will work because they work differently.
  4. The Classic app video tile is very sensitive to errors in the stream. The slightest delay or dropped packets can cause streaming issues. It isn’t very hardy yet hopefully ST could do something about it in future. Eg one camera works and another one only gives audio because it further away and has a low signal. Similarly connection of the Internet quality plays a role. When we have strong stable fast connection it works great but when the connection quality deteriorates (on either end) we start seeing streaming connection issues or only audio or stuff like that. Again very sensitive to streaming errors and delays.
  5. For the 9821 V2 and most SD/HD cameras there is no need for RTSP, it should work fine using the standard port, you can try toggling the MJPEG option on/off to see best compatibility with your phone
  6. If your camera uses RTSP ports make sure you use the default port 554 as Foscam doesn’t like using other ports (and enable port forwarding on your router for the same if you’re using a public IP address in your ST settings)
  7. If you want to use a Public IP/Hostname for streaming video in the Classic app, enter it in the Router IP address/Public hostname input of the camera preferences. This way you can use your LAN ip address for configuring/controlling the camera (via the Camera IP Address input) and a separate Public ip for Classic app video streaming.
  8. If you are seeing green video in the Classic app, this is an artifact of the ST Mobile app and phone codec combination (i.e. it’s phone dependent). It affects many ST cameras. Typical solutions to the problem are:
    • Reboot hub, camera and phone (all three)
    • Toggle IR Led On/Off
    • Vary light intensity (dark / light) around the camera
    • Try adjusting the video bitrate
    • Try a different phone (it tends to affect some Android phone more than others)
3 Likes

I’m noticing HTTP ports being common across all different apps I’ve used with my Foscam R2, and now this one as well. Using HTTPS never allows me to use pan/tilt and I’m assuming this is one of the reasons why your apps use HTTP?

I know I’m not the only one around here that would prefer HTTPS. Can you comment on this?

ST doesn’t support HTTPs communication with local devices it’s a request we’ve put in to ST for over a year now. Please feel free to email support requesting them to “allow HTTPS communication with HubAction” as a feature enhancement.

Here is the latest request to ST:

1 Like