RBoy Apps
INSTALLING FOSCAM IP CAMERA
There are 2 parts to this installation so please see the instruction carefully (there is difference between how the SmartApp is installed and how the Device Handler is installed, don't mix it up or it won't work):

A. Install the Foscam Device Handler 
 
  1. Download/Copy the Foscam Device Handler code from the RBoy SmartThings server (copy EVERY line from beginning to end, Ctrl + A, Ctrl + C, don't miss ANY line or you get an error). 
  2. Login to your SmartThings IDE at https://graph.api.smartthings.com (create a login if you don't have one AND don't forget to opt-in for the developer account). To verify that you're logged into the correct location, after logging into the above link, click on "My Locations" and then click on the name of the location where you want to install the SmartApp. Note: You may be asked to log into your account again when you click on your location, if so login again.
  3. Click on "My Device Handlers" <-- NOTE THIS IS DEVICE HANDLERS (NOT SmartApps
  4. Click on "+New Device Handler" on the top right 
  5. Click "From Code
  6. Paste the code (Ctrl + V) into the editor and click "Create
  7. Click "Publish" and then "For me" on the top right 

B. Install the Foscam Camera and Motion Alarm Manager SmartApp

 
  1. Download/Copy the Foscam Camera and Motion Alarm Manager  code from the RBoy SmartThings server (copy EVERY line from beginning to end, Ctrl + A, Ctrl + C, don't miss ANY line or you get an error) 
  2. Login to your SmartThings IDE at https://graph.api.smartthings.com (create a login if you don't have one AND don't forget to opt-in for the developer account). To verify that you're logged into the correct location, after logging into the above link, click on "My Locations" and then click on the name of the location where you want to install the SmartApp. Note: You may be asked to log into your account again when you click on your location, if so login again.
  3. Click on "My SmartApps" <-- NOTE THIS IS SMARTAPPS (NOT Device Handlers
  4. Click on "+New SmartApp" on the top right 
  5. Click "From Code
  6. Paste the code (Ctrl + V) into the editor and click "Create
  7. Click "Publish" and then "For me" on the top right 
  8. After clicking Publish, click on the "App Settings" button next to the Publish button 
  9. Scroll down and click on "OAuth" to expand the section 
  10. Click on "Enable OAuth in Smart App" (it will create an ID and Secret) (do NOT forget this step) 
  11. Click on "Update" at the bottom of the page 
  12. 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) 
  13. To install the SmartApp, open your SmartThings App on your phone (iPhone or Android), click on the Star 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 "My Apps" section and click on it. (If you don't see "My Apps", please contact ST support to enable it, if you don't see the SmartApp in "My Apps", then you may have installed the code on the wrong 'Shard', please check step 2 again). 
  14. Scroll down the "My Apps" section until you see the new app you just created and click on it on install / configure it. 
  15. It will start scanning your network for Foscam cameras and once 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.
  16. Follow the instructions on the screen, enter your camera administrator username (case sensitive) and password for each of your cameras, verify the settings and configuring the motion alarm options as appropriate.
  17. Tap "Save" and you're done!! 
  18. The SmartApp will create a Foscam Camera device for every camera you asked it to and those Camera Devices will show up under Things in the SmartThings mobile app.
  19. Open you SmartThings App on your phone and under "My Home -> Things" look for your new cameras
  20. 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
  21. 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 your SmartThings IDE at https://graph.api.smartthings.com. To verify that you're logged into the correct location, after logging into the above link, click on "My Locations" and then click on the name of the location where you want to install the SmartApp. Note: You may be asked to log into your account again when you click on your location, if so login again.
    • 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"
    • IMPORTANT, DON'T SKIP THIS STEP: Open the Device on your phone, 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). If you skip this last step the updated Device Handler may not work properly.
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 your SmartThings IDE at https://graph.api.smartthings.com. To verify that you're logged into the correct location, after logging into the above link, click on "My Locations" and then click on the name of the location where you want to install the SmartApp. Note: You may be asked to log into your account again when you click on your location, if so login again.
    • 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
    • IMPORTANT, DON'T SKIP THIS STEP: Open the SmartApp by clicking on the "Automations" icon  and then click on "SmartApps" on on your phone, check/update your settings and finally tap "Save". If you don't do this last step the SmartApp may not work.