This article is for people that use IP Cam Viewer to record their cameras 24x7 and also have a smartthings hub.

I use IP Cam Viewer on a spare android device to record 2 groups of cameras ("record away" and "record home").When I'm at home, I record the "home" group and have motion notifications turned off globally (see Record Settings).When I leave, I change to the "away" group (which records more rooms) and turn on motion notifications globally (although each camera can override this, see each camera's More Options screen).

You probably know that IP Cam Viewer has an embedded web server that allow you to turn MD on/off and recall groups away from home with just a browser.However, the web interface is bare metal right now (I'm building it up still). Great for integration though.

If you have a smartthings hub, this article will help you automate the above steps into the Smartthings app. You get GUI buttons to turn motion notifications on/off and buttons to switch camera groups.

In addition, you can configure smartthings to automatically turn MD on and switch to an "away" camera group when you leave and then reverse when you get home.

Finally, you can add any camera supported by IP Cam Viewer into SmartThings via the app's embedded web server.

---OK. Let's Start...

1. You have IP Cam Viewer running in record mode and you can already bring up the embedded browser interface.- goto App Settings to see the IP and Port used by the embedded web browser.- App Settings is also where you set the viewer and admin name/password for the embedded web server.

2. You have smartthings hub already setup with their mobile app.- get familiar with their app, try to setup so a light goes on when away and off when home.- now, log into smartthings browser IDE (https://graph.api.smartthings.com) and check out your hub, devices, etc...

5. test the motion notifications device type- click on "My Device Types" tab- click the 'IP Cam Viewer Record Mode Motion Notifications' device type- click the "Set Location" button in the upper right corner- expand the "device" list by clicking the down arrow - under the "Physical Devices", select the "Record Mode Motion Notifications" device - click the "Install" or "Update" button- a Tools section will now be visible, which will allow you to test the device - click the "poll" button and it should retrieve the current global motion notifications value - click the "on"/"off" button to change the global motion notifications value- launch the smartthings mobile app - under "Things", you should see the new "Record Mode Motion Notifications" thing - you can turn md on/off just like the ide.

6. Configure smartthings to turn motion notifications on when in away mode- run the smartthings mobile app- in the "Dashboard" screen, click the menu button in the upper right corner- the screen now says "Hello, Home". click the settings button in lower right corner- the screen now says "Your Actions", click the "Goodbye!" action - click the "Turn on these lights or switches" option - Select the "Record Mode Motion Notifications" item - now, when you say Goodbye (or automatically via presense devices), the global motion notifications switch will be turned ON - click Done button in upper right corner (twice)- the screen now says "Your Actions", click the "I'm Back!" action - click the "Turn off these lights or switches" option - Select the "Record Mode Motion Notifications" item - now, when you say I'm Back! (or automatically via presense devices), the global motion notifications switch will be turned OFF - click Done button in upper right corner (twice)

Great. If you only have one group of cameras to record, then you're done!

---If you want to record a larger set of cameras when away, then continue below.

2. Create device that uses 'IP Cam Viewer Recall Camera Group' device type- in the smartthings IDE, click the "My Devices" tab- click the "+ New Device" button in the upper right corner- in the "Create Device" screen, enter the following: - Name: Record Camera Group - Label: Record Camera Group - Type: scroll to the bottom of the list and select "IP Cam Viewer Recall Camera Group" - Version: Published - Location: select your home location - Hub: select your hub - leave all other fields default - click "Create" button at bottom of screen- now, select the newly created device- find the row that says "Preferences (edit)" and click on the "(edit)" link- enter the connectivity information for IP Cam Viewer's embedded web server (test parameters with browser first) - Admin username/password: turning MD on/off requires admin account (see App Settings in app) - IP/Port: see App Settings inside app - Camera Group When On: name of camera group to record when motion notifications is ON - Camera Group When Off: name of camera group to record when motion notifications is OFF- click Save to save the preferences for the device

3. test the recall camera group device type- click on "My Device Types" tab- click the 'IP Cam Viewer Recall Camera Group' device type- click the "Set Location" button in the upper right corner- expand the "device" list by clicking the down arrow - under the "Physical Devices", select the "Record Camera Group" device - click the "Install" or "Update" button- a Tools section will now be visible, which will allow you to test the device - click the "on"/"off" button to recall the camera groups- launch the smartthings mobile app - under "Things", you should see the new "Record Camera Group" thing - you can turn it on/off to recall the camera groups just like the ide.

4. Configure smartthings to "on" camera group when in away mode- run the smartthings mobile app- in the "Dashboard" screen, click the menu button in the upper right corner- the screen now says "Hello, Home". click the settings button in lower right corner- the screen now says "Your Actions", click the "Goodbye!" action - click the "Turn on these lights or switches" option - Select the "Record Camera Group" item - now, when you say Goodbye (or automatically via presense devices), the "on" camera group will be recalled - click Done button in upper right corner (twice)- the screen now says "Your Actions", click the "I'm Back!" action - click the "Turn off these lights or switches" option - Select the "Record Camera Group" item - now, when you say I'm Back! (or automatically via presense devices), the "off" camera group will be recalled - click Done button in upper right corner (twice)

You are done. Switching between "away" and "home" modes in smartthings will automatically turn IP Cam Viewer's global motion notification setting on/off and recall the proper camera group for recording.

3. test the recall camera group device type- click on "My Device Types" tab- click the 'WAN IPC Server Cam' device type- click the "Set Location" button in the upper right corner- expand the "device" list by clicking the down arrow - under the "Physical Devices", select the "WAN IPC Server Cam" device - click the "Install" or "Update" button- a Tools section will now be visible, which will allow you to test the device - click the "take" button to capture frame- launch the smartthings mobile app - under "Things", you should see the new "WAN IPC Server Cam" thing - in the tile, click the settings and then click Take Photo to show current frame (just like in IDE).

---Enjoy,Rob

ps. Future article will show you know to integrate ANY camera supported by IP Cam Viewer into smartthings. You could then automate smartthings to take a snapshot when some event takes place.

I have been trying to get this working for a while and I am not sure where it goes wrong. I set up the record mode correctly and I can see the IP CAM VIEWER url in the browser. I also set up the info in the WAN IPC Server Cam and test it in the simulator of SmartThings. It gives me the following errors: