The web server only runs while the app is running in either Gallery View, Matrix View, Background Audio Mode, Record Mode, Manage Cameras and App Settings.Just point a browser at the port shown in App Settings.

This server can be used for remote control of record mode, tasker integration, chromecast, cam hosting (proxy to get camera feed for all supported cameras) and more. Lots of APIs are already available (see below) and more will be added. Also, a web UI will be built for humans to use.

For example, 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.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).

---API URLs for integration with automation tools like tasker (or just do it in the browser):

Most APIs require the web server's viewer and admin username/password (see App Settings).Pass in the username/password using HTTP basic authentication or pass it in the URL with params "user" and "pass".

- List recent motion events using HTML (available in v5.5.3): "/v1/cgi/getset.cgi?action=get&key=record_playback.list_recent_motion&outputType=html"- List recent motion events using JSON (available in v5.5.3): "/v1/cgi/getset.cgi?action=get&key=record_playback.list_recent_motion"- Get recorded frame by id (available in v5.5.3): "/v1/stream/playback_frame.jpg?frameId=[frameId]"- Get prev/next frame by passing in original motion frame id (keep calling to rewind/forward, available in v5.7.3): "/v1/cgi/getset.cgi?action=get&key=record_playback.get_motion_frame&motionFrameId=[original_motion_id]&direction=[-1,1]"

Groups API(s) requiring admin access:

- recall group by name (available in v5.3.8): "/v1/cgi/getset.cgi?action=set&key=camera_db.recall_group&value=[name]"- list group names (available in v5.3.9): "/v1/cgi/getset.cgi?action=get&key=camera_db.list_groups"

Camera DB API(s) requiring viewer/admin access:

- list enabled cameras (requires viewer user, available in v5.3.9): "/v1/cgi/getset.cgi?action=get&key=camera_db.list_enabled_cameras"- list all cameras (requires admin user, available in v5.3.9): "/v1/cgi/getset.cgi?action=get&key=camera_db.list_all_cameras"- get camera info (requires viewer user for some info about enabled cameras, admin user for all cameras/info, available in v5.3.9): "/v1/cgi/getset.cgi?action=get&key=camera_db.camera_info&value=[name]"

- for example, in Manage Cameras, click on camera and select Email Camera (send to yourself) - copy the parameters 0 through 9 and paste parameters into "add_camera_params" api call. - as of v5.4.1, "add" will fail if existing camera with same name already exists. Add "overwrite=1" parameter to force update if camera name already exists.

- Single camera of Matrix view (requires viewer user, available in v5.9.8): "/v1/cgi/getset.cgi?action=get&key=matrix_view.detail_view?camId=[n]"

- relies on frame buffer from current Matrix/Record Mode activity.

- with the above apis, you can now use IP Cam Viewer as a transcoder / proxy for cameras/nvrs/dvrs that have odd custom protocols. Run IPC in Gallery/Matrix/Record Mode and use this api to fetch frames to display on a web page or upload to a server.- another IP Cam Viewer instance can view the server using the "IP Cam Viewer Server" camera type.

App Info API(s):

- Get application version code (integer, available in v5.4.2): "/v1/cgi/getset.cgi?action=get&key=app_info.version_code"- Get application version name (string, available in v5.4.2): "/v1/cgi/getset.cgi?action=get&key=app_info.version_name"- Get application name (string, available in v5.4.5): "/v1/cgi/getset.cgi?action=get&key=app_info.app_name"

App State API(s) requiring admin access:

- Get current visible screen (string, available in v5.4.5): "/v1/cgi/getset.cgi?action=get&key=app_state.current_screen"- Goto screen (string, available in v5.4.5): "/v1/cgi/getset.cgi?action=set&key=app_state.goto_screen&extra=camera_name"

Note: Whenever you see brackets and colons like "[1:0]", that means you have to choose a value. For example, "value=[1:0]" means your choices are "value=1" or "value=0".Note: If you see text between brackets like "[name]", that means replace that with a name of your choice.

Like the idea of remote control from a browser. Is there any chance you can add a turn On/Off Record Mode command as well please?

I see you have a setting for motion detection notifications but it would also be handy to be able to turn recording on/off remotely in admin mode in some circumstances to avoid filling storage media unnecessarily.

I actually do that with 2 groups. 1 group is when I'm home (different cameras and recording settings) and another group for when I'm away (note that each camera's Edit Camera->More Options screen lets you turn md on/off per camera, rather than the global md on/off in record settings).

there's an api to switch groups. I use these apis so that smartthings turns notifications on/off and switches groups when I leave and return...

trevor wrote:Like the idea of remote control from a browser. Is there any chance you can add a turn On/Off Record Mode command as well please?

I see you have a setting for motion detection notifications but it would also be handy to be able to turn recording on/off remotely in admin mode in some circumstances to avoid filling storage media unnecessarily.

Thanks for the suggestions. I thought when you turned 'Record Mode' on that it would be for all cameras ticked in the selection window ? Anyway, I was rather hoping you might build in a Record Mode on/off switch facility into your PC browser app when you get around to writing it (hopefully soon).

The scenario I was thinking about was when you are away from home but know a relative will be making an adhoc check of the house at a specific time you can connect remotely and turn off record mode for the duration of their visit to save false alarms and media storage.

trevor wrote:Thanks for the suggestions. I thought when you turned 'Record Mode' on that it would be for all cameras ticked in the selection window ? Anyway, I was rather hoping you might build in a Record Mode on/off switch facility into your PC browser app when you get around to writing it (hopefully soon).

The scenario I was thinking about was when you are away from home but know a relative will be making an adhoc check of the house at a specific time you can connect remotely and turn off record mode for the duration of their visit to save false alarms and media storage.