RBoy Apps
INSTALLING FOSCAM IP CAMERA
There are 2 parts to this installation so please see the instruction carefully (separate for how the SmartApp is installed and how the Device Handler is installed):

NOTE: You need to use the SmartThings Classic mobile app for installation

A. Install the Foscam Device Handler 
 
  1. Click on the Foscam Device Handler link, it will open a new window with the code, select the entire page (Ctrl+A) and copy (Ctrl+C)
  2. Login to the IDE at https://account.smartthings.com (create a Samsung Account one if you don't have one)
  3. Click on "My Locations" and then click on the name of the location where you want to install the camera
  4. Click on "My Device Handlers" <-- NOTE THIS IS DEVICE HANDLERS (NOT SmartApps
  5. Click on "+New Device Handler" on the top right 
  6. Click "From Code
  7. Paste the code (Ctrl+V) into the editor and click "Create
  8. Click "Publish" and then "For me" on the top right 

B. Install the Foscam Camera and Motion Alarm Manager SmartApp

 
  1. Click on the Foscam Camera and Motion Alarm Manager  link, it will open a new window with the code, select the entire page (Ctrl+A) and copy (Ctrl+C)
  2. Login to the IDE at https://account.smartthings.com
  3. Click on "My Locations" and then click on the name of the location where you want to install the camera
  4. Click on "My SmartApps" <-- NOTE THIS IS SMARTAPPS (NOT Device Handlers
  5. Click on "+New SmartApp" on the top right 
  6. Click "From Code
  7. Paste the code (Ctrl+V) into the editor and click "Create
  8. Click "Publish" and then "For me" on the top right 
  9. After clicking Publish, click on the "App Settings" button next to the Publish button 
  10. Scroll down and click on "OAuth" to expand the section 
  11. Click on "Enable OAuth in Smart App" (it will create an ID and Secret) (do NOT forget this step) 
  12. Click on "Update" at the bottom of the page 
  13. Scroll down back to OAuth, click on it and verify that the Client ID and Client Secret have been created/saved. If not repeat the process until it is saved (sometimes it takes a few tries) 
  14. To install the SmartApp, open your SmartThings Classic App on your phone, click on the Automation icon at the bottom bar right corner of the main screen. Now click on the "SmartApps" tab on the top right of the screen. Scroll down to the bottom and click on "+Add a SmartApp". Then scroll down to the bottom and click on "My Apps". (NOTE: if you don't see "My Apps" you need to use the SmartThings Classic app, if you don't see Foscam Camera and Motion Alarm Manager in "My Apps", then you may have installed the code in the wrong location, check step 3 again)
  15. Scroll down the "My Apps" section until you see the new app you just created and click on it on install / configure it. 
  16. It will start scanning your network for Foscam cameras and if discovered it will display them on the screen. For the discovery to work your cameras and smartthings hub need to be on the same network with no firewalls. (discovery may not work due to a issue with the SmartThings platform)
  17. If your cameras can't be discovered, click "Next" and manually enter each cameras IP address/port. You can use the Foscam Equipment Search Tool to find your camera IP address/port if you don't know it.
  18. Follow the instructions on the screen, enter each cameras administrator username (case sensitive) and password, verify the settings and Tap "Next" to configuring the motion alarm options as appropriate. NOTE: Select the camera model based on the EXACT names. e.g. R2E and R2C are different models. The R2C is a regular HD camera so select _Other Foscam_ for R2C in the camera type, where as R2E is based on the new chipset and is selected by name in the list of models
  19. Tap "Save" and you're done!! 
  20. The SmartApp will create a Foscam Camera device for every camera configured and those Camera Devices will show up under "My Home -> Things" in the SmartThings mobile app.
  21. Open you SmartThings Classic App on your phone and under "My Home -> Things" look for your new cameras
  22. Open each camera page on the phone and on the top right click on the gear icon to open the preferences/settings page for the camera
  23. Verify additional settings (like mirror, flip, sensitivity etc) if required, then tap "Done". Enjoy!!

C. Updating to a Newer Version (do not skip any steps) 
  
    UPDATING THE FOSCAM CAMERA DEVICE HANDLER:
    • Click on the Foscam Device Handler, it will open a new window with the code, select all (Ctrl+A) and copy the code (Ctrl+C)
    • Login to the IDE at https://account.smartthings.com
    • Click on "My Locations" and then click on the name of the location where you had installed the device handler previously
    • Click on "My Device Handlers"
    • Click on the "RBoy Foscam IP Camera" in the SmartThings IDE
    • Select all (Ctrl+A) and delete the old code, Paste (Ctrl+V) the new code
    • Click on "Save"
    • Click  on "Publish" and then click "For me"
    • Open the camera device page on your phone in the Classic ST app under "My Home -> Things", check/update your preferences (little gear icon on the top right) and tap "Done" or "Save". Now tap the "Refresh" tile (with the circular arrow).
UPDATING THE FOSCAM CAMERA AND MOTION ALARM MANAGER SMARTAPP:
    • Click on the Foscam Camera and Motion Alarm Manager it will open a new window with the code, click on the browser refresh button (to flush the cache), select all (Ctrl+A) and copy the code (Ctrl+C)
    • Login to the IDE at https://account.smartthings.com
    • Click on "My Locations" and then click on the name of the location where you had installed the SmartApp previously
    • Click on "My SmartApps"
    • Click on the "Foscam Camera and Motion Alarm Manager" in the SmartThings IDE
    • Select all (Ctrl+A) and delete the old code, Paste (Ctrl+V) the new code
    • Click on "Save"
    • Click  on "Publish" and then "For Me", if you don't so this the update won't work
    • Open the SmartApp on your phone by clicking on the "Automations" icon  and then click on "SmartApps" on on your phone, Open the Foscam Camera Manager SmartApp, click "Next", "Next", check/update your settings and finally tap "Save"