Camera Management Server

From MiOS
Revision as of 22:02, 3 July 2011 by Micasaverde (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Certain cameras come with custom firmware so that they automatically connect to the MiOS camera management server (cms), creating a tunnel the cms can use to send commands to the camera and to act as a relay so users can view and control the camera when outside the home without having to change their firewall.

To get the list of all cameras and MiOS systems on your current home network, read this URL: http://sta1.mios.com/locator_json2.php which returns the list in JSON format. To add to the list all cameras that are off the home network but which can be access remotely with a given username, add a ?username=x to the URL, such as http://sta1.mios.com/locator_json2.php?username=johndoe

A camera will look like this:

     {
           "serialNumber": "554",
           "Alive": 0,
           "name": "Good camera",
           "mfr": "Mios",
           "ipAddress": "192.168.2.27",
           "category": "2",
           "subcategory": "1",
           "users": "16782,3",
           "ImageUrl_LR": "img/snapshot.cgi?size=320x240&quality=4",
           "MJpegUrl_LR": "img/video.mjpeg",
           "MP4Url_LR": "img/video.asf",
           "ImageUrl_HR": "img/snapshot.cgi?size=640x480&quality=2",
           "MJpegUrl_HR": "img/video.mjpeg",
           "MP4Url_HR": "img/video.asf",
           "CanRelay": "1",
           "Port": "80",
           "local_remote": "1",
           "relay_remote": "1",
           "active_server": "cr1.mios.com"
       }

request_video: Request video from a camera

To view the video from the camera, open this URL:

https://cr1.mios.com/request_video?cam=a&format=b&user=c&pass=d

where a is the serial number of the camera, 554 in the above example, b is "mp4" or "mjpeg", c and d are the username/password of the MiOS account the camera is paired with.

This will return another URL. If the viewer is on the same home network as the camera the URL will point directly to the camera. Otherwise it will contain relay_viewer and point to the relay server with a use-once token. In this case the URL can only be used one time, and must be used within 1 minute of making the request.

Personal tools