How to Use Scheduler

  1. First, you should prepare the schedule and send it to the camera using PUT/cameras​/{CAMID}​/schedule​/ request. The time is set in the camera's timezone. For example:

curl -X PUT "https://web.skyvr.videoexpertsgroup.com/api/v2/cameras/{CAMID}​/schedule/" -H "accept: application/json" -H "Authorization: LKey {CLOUD_KEY}" -H "Content-Type: application/json" -d "{ "monday": [{ "start": "00:00", "stop": "08:00", "record": "off" }, { "start": "08:00", "stop": "20:00", "record": "on" }, { "start": "20:00", "stop": "24:00", "record": "off" }], "tuesday": [{ "start": "00:00", "stop": "08:00", "record": "off" }, { "start": "08:00", "stop": "20:00", "record": "on" }, { "start": "20:00", "stop": "24:00", "record": "off" }], "wednesday": [{ "start": "00:00", "stop": "08:00", "record": "off" }, { "start": "08:00", "stop": "20:00", "record": "on" }, { "start": "20:00", "stop": "24:00", "record": "off" }], "thursday": [{ "start": "00:00", "stop": "08:00", "record": "off" }, { "start": "08:00", "stop": "20:00", "record": "on" }, { "start": "20:00", "stop": "24:00", "record": "off" }], "friday": [{ "start": "00:00", "stop": "08:00", "record": "off" }, { "start": "08:00", "stop": "20:00", "record": "on" }, { "start": "20:00", "stop": "24:00", "record": "off" }], "saturday": [{ "start": "00:00", "stop": "24:00", "record": "off" }], "sunday": [{ "start": "00:00", "stop": "24:00", "record": "off" }]}"

In this example, the camera will be streaming 24/7, but the recording will work only from 8 am to 8 pm Monday-Friday.

Please note, that in this example the schedule is covering 24 hours every day because all time periods that are not covered by the schedule will be interpreted as periods of inactivity (no events received, no live streaming, no recording).
Here's an example of possible combinations:

{"monday": [{"start": "00:00","stop": "12:00","record": "on"},{"start": "12:00","stop": "13:00","record": "off"},{"start": "14:00","stop": "24:00","record": "on"}]}

00:00 - 12:00 (live ON, recording ON);
12:00 - 13:00 (live ON, recording OFF);
13:00 - 14:00 (live OFF, recording OFF);
14:00 - 24:00 (live ON, recording ON);

 

2. Once you have set the schedule, you need to tell the camera to start using this schedule by updating the camera mode from "mode": "on" to "mode": "schedule" using PUT/cameras​/{CAMID}​/ request:

curl -X PUT "https://web.skyvr.videoexpertsgroup.com/api/v2/cameras/{CAMID}​/" -H "accept: application/json" -H "Authorization: LKey {CLOUD_KEY}" -H "Content-Type: application/json" -d "{ "mode": "schedule"}"