This guide walks you through how to add Foscam R2 to SmartThings using a custom device handler and SmartThings IDE. You’ll gain remote access, motion detection, and automation control for seamless smart home integration.
Key Takeaways
- SmartThings doesn’t natively support Foscam R2: You’ll need to use a custom device handler via the SmartThings IDE to enable integration.
- Foscam R2 must be on the same network: Both your camera and SmartThings hub should connect to the same Wi-Fi for reliable communication.
- Custom device handlers require technical setup: You’ll copy and paste code into the SmartThings IDE, so basic comfort with web tools is helpful.
- Motion alerts and live streaming work after setup: Once connected, you can view your camera feed and receive notifications in the SmartThings app.
- Regular firmware updates improve compatibility: Keep your Foscam R2 firmware updated to avoid connection issues and enjoy new features.
- Use a static IP for stability: Assign a fixed IP address to your camera to prevent disconnections due to IP changes.
- Troubleshooting is common but manageable: Most issues stem from incorrect credentials or network problems and can be resolved with simple checks.
How to Add Foscam R2 to SmartThings: A Complete Step-by-Step Guide
If you’ve invested in a Foscam R2 security camera and want to integrate it into your SmartThings smart home ecosystem, you’re in the right place. While SmartThings doesn’t offer native support for the Foscam R2, you can still connect it using a custom device handler. This guide will walk you through the entire process—from preparing your camera to viewing live feeds and setting up motion alerts in the SmartThings app.
By the end of this guide, you’ll have your Foscam R2 fully integrated with SmartThings, allowing you to monitor your home remotely, receive motion notifications, and even trigger automations based on camera activity. Whether you’re a smart home beginner or a seasoned DIYer, we’ll keep things simple, clear, and actionable.
Why Integrate Foscam R2 with SmartThings?
Visual guide about How to Add Foscam R2 to Smartthings
Image source: foscam.com
Before diving into the setup, let’s talk about why you’d want to connect your Foscam R2 to SmartThings in the first place.
The Foscam R2 is a popular indoor Wi-Fi security camera known for its 1080p HD video, night vision, two-way audio, and motion detection. However, it works best when paired with a broader smart home system like SmartThings. By integrating the two, you can:
– View live camera feeds directly in the SmartThings mobile app.
– Receive real-time motion alerts on your phone.
– Trigger automations—like turning on lights when motion is detected.
– Store and review clips (if using cloud or local storage).
– Control the camera alongside other smart devices (lights, locks, sensors).
Without integration, you’d need to use the Foscam app separately, which limits automation and central control. SmartThings acts as a hub, bringing all your devices together in one place.
What You’ll Need Before Starting
To successfully add your Foscam R2 to SmartThings, make sure you have the following:
- Foscam R2 camera: Fully set up and connected to your Wi-Fi network.
- SmartThings Hub: Either the original Samsung SmartThings Hub or a compatible hub like the Aeotec Hub.
- SmartThings mobile app: Installed on your iOS or Android device.
- Computer with internet access: Needed to access the SmartThings IDE (Integrated Development Environment).
- Foscam account credentials: Your camera’s username and password.
- Camera’s IP address: You’ll need to find this in your router settings or Foscam app.
- Basic comfort with web tools: No coding experience required, but you’ll copy and paste code.
Having these ready will make the process smoother and reduce frustration.
Step 1: Set Up Your Foscam R2 Camera
Before integrating with SmartThings, ensure your Foscam R2 is properly configured and online.
Connect the Camera to Wi-Fi
1. Plug in your Foscam R2 and wait for it to boot up (the LED will blink blue).
2. Download the Foscam app (available on iOS and Android).
3. Open the app and create an account if you haven’t already.
4. Tap “Add Device” and follow the on-screen instructions to connect the camera to your Wi-Fi network.
5. Once connected, test the live feed in the app to confirm everything works.
Assign a Static IP Address (Recommended)
To prevent your camera from losing connection due to IP changes, assign it a static IP address.
1. Log in to your router’s admin panel (usually by typing 192.168.1.1 or 192.168.0.1 into a browser).
2. Find the “DHCP” or “LAN” settings.
3. Look for your Foscam R2 in the list of connected devices (it may appear as “Foscam” or by its MAC address).
4. Assign a static IP (e.g., 192.168.1.150) and save the settings.
5. Note this IP address—you’ll need it later.
Enable ONVIF (Optional but Helpful)
ONVIF is a standard for IP cameras that improves compatibility.
1. Open the Foscam app and go to your camera’s settings.
2. Look for “Network” or “ONVIF” settings.
3. Enable ONVIF and set a username and password (if prompted).
4. This step isn’t always required, but it can help with future integrations.
Step 2: Access the SmartThings IDE
SmartThings uses a web-based IDE to manage custom device handlers. This is where you’ll add the code to support your Foscam R2.
Log in to SmartThings IDE
1. Open a browser and go to https://account.smartthings.com.
2. Sign in with your Samsung account (the same one linked to your SmartThings app).
3. Once logged in, click on “My SmartApps” and then “My Device Handlers.”
Create a New Device Handler
1. Click the “+ Create New Device Handler” button.
2. Select “From Code” (not “From Template”).
3. You’ll now paste in custom code that tells SmartThings how to communicate with your Foscam R2.
Find and Copy the Foscam R2 Device Handler Code
At the time of writing, a widely used and reliable device handler for Foscam cameras is available on GitHub. Here’s how to get it:
1. Go to GitHub and search for “Foscam R2 SmartThings device handler.”
2. Look for a reputable repository (e.g., by authors like “statusbits” or “tonesto7”).
3. Open the .groovy file (the code file).
4. Copy all the code (Ctrl+A, then Ctrl+C).
> Tip: Always check the repository’s README for updates or installation notes. Some handlers may require slight modifications.
Paste the Code into SmartThings IDE
1. Back in the SmartThings IDE, paste the copied code into the text box.
2. Click “Create.”
3. Then click “Publish” > “For Me” to make it available in your account.
You’ve now created a custom device handler for your Foscam R2.
Step 3: Add the Foscam R2 to SmartThings
Now that the device handler is ready, it’s time to add your camera to SmartThings.
Open the SmartThings Mobile App
1. Launch the SmartThings app on your phone.
2. Tap the “+” icon (usually in the bottom right) to add a new device.
3. Tap “Add device” or “Scan for nearby devices.”
Search for the Foscam R2
1. The app will search for devices. Since Foscam R2 isn’t natively supported, it won’t appear automatically.
2. Instead, tap “Don’t see your device?” or “Add device manually.”
3. Look for “Foscam R2” or a similar name in the list (it should appear now that you’ve added the device handler).
4. If you don’t see it, go back to the IDE and double-check that the handler was published correctly.
Enter Camera Details
Once you select the Foscam R2 device type, you’ll be prompted to enter:
– IP Address: The static IP you assigned earlier (e.g., 192.168.1.150).
– Port: Usually 88 (default for Foscam).
– Username: Your Foscam camera login username.
– Password: Your Foscam camera password.
– Camera Name: Give it a friendly name like “Living Room Camera.”
> Note: Some device handlers may ask for additional settings like “Stream URL” or “Snapshot URL.” Use the default values unless instructed otherwise.
Save and Test
1. Tap “Save” or “Done.”
2. The app will attempt to connect to your camera.
3. If successful, you’ll see a live feed preview or a confirmation message.
Step 4: Configure Camera Features in SmartThings
Once added, you can customize how your Foscam R2 behaves in SmartThings.
Enable Motion Detection
1. Open the SmartThings app and go to your camera device.
2. Look for “Motion Detection” or “Alerts” in the settings.
3. Toggle it on.
4. You can also set sensitivity levels if supported by the device handler.
Now, when motion is detected, you’ll receive a notification on your phone.
Set Up Live Streaming
1. Tap on the camera tile in the SmartThings app.
2. You should see a live video feed.
3. Tap the full-screen icon to view in larger size.
4. Use the controls to pan, tilt, or zoom (if your camera supports it).
> Note: Video quality depends on your network speed. For best results, ensure your camera and hub are on a strong Wi-Fi signal.
Create Automations
One of the biggest benefits of SmartThings is automation. Here’s an example:
- Scenario: Turn on lights when motion is detected at night.
- Steps:
- Go to “Automations” in the SmartThings app.
- Tap “+” to create a new automation.
- Set the trigger: “When motion is detected by Living Room Camera.”
- Add a condition: “Only between 8 PM and 6 AM.”
- Set the action: “Turn on Living Room Lights.”
- Save the automation.
You can also set up alerts to send you a notification, trigger a siren, or record a clip.
Troubleshooting Common Issues
Even with careful setup, you might run into problems. Here are solutions to the most common issues.
Camera Not Showing Up in SmartThings
– Cause: Device handler not published or incorrect code.
– Solution: Double-check the SmartThings IDE. Ensure the handler is published “For Me.” Re-paste the code if needed.
“Connection Failed” or “Invalid Credentials”
– Cause: Wrong IP, port, username, or password.
– Solution: Verify all details. Test the IP in a browser (e.g., http://192.168.1.150:88). If it loads the Foscam login page, the IP and port are correct.
Live Feed Not Loading
– Cause: Network issues or unsupported video format.
– Solution: Ensure your phone and camera are on the same network. Try restarting the camera and router. Some device handlers only support snapshot images, not live video.
Motion Alerts Not Working
– Cause: Motion detection not enabled in the camera or SmartThings.
– Solution: Enable motion detection in both the Foscam app and SmartThings device settings. Also, check that notifications are allowed in your phone’s settings.
Camera Goes Offline Frequently
– Cause: IP address changed or weak Wi-Fi.
– Solution: Confirm the static IP is set. Move the camera closer to the router or use a Wi-Fi extender.
Tips for a Smooth Experience
– Keep firmware updated: Check the Foscam website regularly for firmware updates. Updated firmware improves stability and security.
– Use a strong password: Protect your camera with a unique, strong password to prevent unauthorized access.
– Monitor data usage: Live streaming uses bandwidth. If you have a data cap, limit how often you view the feed.
– Test automations: After setting up rules, test them to ensure they work as expected.
– Backup your device handler: Save a copy of the .groovy code on your computer in case you need to re-upload it.
Conclusion
Adding your Foscam R2 to SmartThings opens up a world of smart home possibilities. While the process requires a few extra steps compared to native devices, the payoff is worth it. You’ll gain centralized control, real-time alerts, and powerful automation features—all from the SmartThings app.
By following this guide, you’ve learned how to use a custom device handler, configure your camera settings, and troubleshoot common issues. Remember to keep your network stable, use a static IP, and stay updated on firmware and device handler changes.
With your Foscam R2 now integrated, you’re one step closer to a truly smart, responsive home. Whether you’re checking in while on vacation or automating your lighting based on motion, your camera is now a seamless part of your smart ecosystem.
Welcome to the future of home security.