NOTE: Some folks who are installing/configuring this from the Android SmartThings App facing this issue can use this work around for the number input bug. While entering the port number for some users the ST app will complain that the user hasn’t entered all the fields. This is because of the bug in the latest ST phone app which expects atleast 3 digits while entering a number, so if you want to enter 88, then you need to enter 088. If you’re facing this issue, please report it to ST support and this message will be removed once ST has fixed the bug.
###We’ve created a customized version for the Foscam Device Type which allows for integration of the IP Camera’s into SmartThings. There are a few versions floating around here on the forum. This device type started by putting together the base working parts of those with tons of bugfixes, enhancements, new features, add on’s and bell’s/whistles’s and now added support for Live Streaming! We’ve even been touch with Foscam to add new features to their upcoming lineup for cameras. Features include:
- Live Video Streaming Directly from your ST Phone App
- Ability to put HD Camera’s into SmartTiles compatible mode (MJPEG mode) and get URL to watch live stream through a browser using SmartTiles
- Use the camera Motion Detection feature and report it as a Motion Sensor event to get notified or trigger an alarm. NOTE: to use this feature you MUST install the Foscam Motion Alarm Monitor smart app (now with support for HD and SD Cameras). This can be found on the RBoy server in the Smart Apps directory. The app has features such as triggering an Alarm, switching on lights, turning on the cruise function when a motion alarm is detected etc. SD Camera’s support Push Alarm notifications also which are enabled by default.
- Enabling camera built in actions when motion is detected (eMail notifications, sounds, starting video recording, taking pictures when motion is detected). You can set this up for activation on a mode change.
- Configure the sensitivity and trigger interval for the monitoring functions through the Preferences page
- The camera is setup as a Alarm, Relay, Imaging device and Switch. So this can be used with most standard apps and phrases. When using as Switch, turning it will enable the Motion Detection, turning it off will Disable the Motion Detection. Similarly when using an Alarm, turning it on will Enable the Motion Detection and turning the Alarm off will disable the Motion Detection. When the Strobe is enabled, it also takes a picture along with enabling the Motion Detection.
- Reset the camera to specific presets on modes and alarm events
- Tiles have new icons and show the names of the configured shortcuts in preferences instead of generic names
- Remote reboot functionality
- Added the ability to use public URL/hostnames for the camera instead of IP addresses
- Support for reverse proxy setups when using public URL/hostnames
- Get the current LED status (even in Auto mode)
- Integration with SHM for arming/disarming motion detection when SHM modes are changed
- Controlling the camera (mirror, flipping, pan, tilt, cruise, LED’s, taking images etc) from the device interface on the smartphone
- Control LED’s through CoRE (or other SmartApps) using the following custom commands
- Activate/stop cruise through CoRE (or other SmartApps) using the following custom commands
- Activate presets through CoRE (or other SmartApps) using the following custom commands
- Turn on/off Motion Detection through CoRE (or other SmartApps) using the following custom commands
LIVE STREAMING NOTE: You need a DIRECT connection between your Phone and the Camera for live streaming to work. If you’re using a private IP address for your camera then live streaming will work ONLY from within your private LAN. If you want to access your camera live streaming while you’re outside your network, ensure that you’re using your public IP address/URL/port and have enabled port forwarding on your router.
MOTION DETECTION FEATURES: Motion detection can be configured to take pictures, eMail, video, local alarm etc and also use the motion alarm notifications to set off actions in SmartThings (can used as a motion sensor). Motion detection eMail feature requires the camera to be initially configured through the camera’s web interface as the motion detection eMail will be sent by the camera and not the SmartApp. Similarly the duration of the video etc need to be initially configured through the camera web interface, the video capture is done by the camera on detection motion and cannot be triggered by the SmartApp.
Also added a Smart App called “Trigger based Camera Pictures” which allows you to use triggers (motion sensors, contact/door sensors, momentary switches like door bells) to activate the Camera to take pictures and turn on switches and enable Camera monitoring optionally. The pictures will show up in your SmartThings camera device page.
##Instructions for installing Device Type:
- Login to your IDE at https://graph.api.smartthings.com (create a login if you don’t have one AND opt in for the developer account)
- Click on “My Device Handlers”
- Click on “+Create New Device Handler” on the top right
- Click “From Code”
- Copy paste the code into the editor and click “Create”
- Click “Publish” and then “For me” on the top right
- Click on “My Devices”
- Click on “+New Device” on the top right
- Enter a “Name”
- For “Device Network Id *” enter 2000
- 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)
- Select your “Hub” (very important step!)
- Select your “Location”
- Click “Create”
- Open you SmartThings App on your phone (iPhone or Android), under “Things” (in the Location page, bottom bar second tab with the 4 squares) look for your new device
- Open the device page, on the top right click on the 3 vertical dots and select “Edit Device”
- Enter the details (IP Address, port, username (case sensitive), password etc) and finish the configuration and click Done.
- Scroll down and click on “Refresh” to load the new settings. You’re Done!
FOSCAM and NON-FOSCAM MODELS SUPPORT: This works with Standard Definition Foscam (SD) camera’s (8910/8916/etc), High Definition Foscam (HD) camera’s (9816//9821/9826/9831/etc), new specialty HD foscam’s (C1/C2/etc), HD dome cameras (9851/9853/8919/9828/etc) and other Foscam HD and SD cameras.
This also works with compatible camera (based on same hardware/firmware). However please verify the compatibility of the camera and see this thread for more details.
I constantly see “Foscam Motion Alarm Monitor” in the recent activities tab, how do I get rid of it?
That’s done by the ST platform when the SmartApp asks the Device Handler to check for any motion alarms. Since it’s done by the platform there is no way to get rid of it.
Will this device handler also report motion alarms from the camera?
Yes, but to use this feature you MUST install the Foscam Motion Alarm Monitor smart app.
How do I get Live Video Streaming to work with my camera?
You need a DIRECT connection between your Phone and the Camera for live streaming to work. If you’re using a private IP address for your camera then live streaming will work ONLY from within your private LAN. If you want to access your camera live streaming while you’re outside your network, ensure that you’re using your public IP address/URL/port and have enabled port forwarding on your router. If your stream is slow or dropping frames, then you connection between the camera and phone is the issue. Try rebooting your camera and router and see if it helps.
Live view can’t seem to connect or I get an error
Try a few times, this a BETA viewer and ST hasn’t made an official release, so you may need to try connecting a few times before it works. If it still doesn’t work then your camera isn’t able to connect to the phone. [Check phone capabilities and signal strength] ([RELEASE] [Universal] Foscam Camera Device Handler with Discovery, Live Video Streaming, Motion Sensor/Alarm Integration - SD (FI89xx), HD (FI98xx, 99xx), Cx, Rx, Fosbaby). Also note that the streaming depends upon the phone’s capabilities, e.g. does it support the codec, format and bitrates that the camera is sending to the phone since it’s a direct connection. Also the ST video tile is VERY sensitive to stream errors and delays. So if the first few packets are delayed or corrupted the stream may not work. Try rebooting your camera and router which helps. Also use a fast LAN instead of port forwarding over the internet to troubleshoot. If one works and not the other it’s likely the delay that’s causing the issues. These are not issues with the device handler but more with the network/setup/phone.
How do I get video streaming to with SmartTiles?
If you have a SD camera (640x480 or less resolution) then use this URL in SmartTiles
If you have a HD Camera (720p or high resolution) AND your camera supports MJPEG (check the specs), then enable the MJPEG mode in the Device Preference from your ST Phone App and then use this URL in SmartTiles
COMMON TROUBLESHOOTING STEPS (Read this before posting):
- The device handler works fine, if you’re facing an issue it’s likely a mis-configuration (case sensitive username, case sensitive password, port, ip address or camera type (enable HD for High Definition cameras 1280+ pixels). Also check your network configuration, the camera should be able to access the internet AND the hub (same subnet). Check your IDE live logging and see if the camera responds to the refresh button. If all is configured correctly you’ll see the responses from the cameras. You can also copy paste the debug URL’s from Live Logging into your browser to ensure that your parameters are defined correctly.
- If the camera is inconsistently working it indicates a communication issue. Usually rebooting the camera AND hub will solve your issue.
- If your camera functions like up/down/reboot etc are working but you cannot take picture and motion detection not working then it’s likely you have a corrupted device installation. In this case you need to change the IP Address or Port on your camera and then go to the device preferences and enter the new IP Address/Port there. This is the ONLY solution (ST platform remembers IP/Port instances and hence reinstalling has no effect on the corruption, only changing the IPAddress/Port works here). [See this for details] ([RELEASE] [Universal] Foscam Camera Device Handler with Discovery, Live Video Streaming, Motion Sensor/Alarm Integration - SD (FI89xx), HD (FI98xx, 99xx), Cx, Rx, Fosbaby)
- If your picture works sometimes, suddenly stopped working or is tearing apart, this is due to a slow platform/hub/camera. Try rebooting your camera and hub usually it works. If not, then the LAN communication is too slow and is timing out. Try using your Public IP address in the settings and make sure your router has port forwarding for your camera setup. That enables direct communication between the camera and the cloud bypassing the hub which is usually faster.
- To use public IP address/hostname make sure you’re enabled Port Forwarding for your camera in your router. Also try not to use port 80 (change it to e.g. 88) and try rebooting your camera. It’s the hub that communicates with the camera to ensure that they are on the same network.
More features to be added, if you have any suggestions or ideas please feel free to ask and we’ll try to add it.
###This device type handler and the SmartApps are available on the RBoy ST SmartApps Server, http://smartthings.rboyapps.com. Refer to our facebook page below to get access to the server.
If you like the Apps consider supporting our development efforts. Visit our Facebook page for updates on new apps and to get Access to all our Premium ST Apps Server. http://www.facebook.com/RBoySTApps
The latest version of these apps with udpates are available on the RBoy server.