smart-dispatcher
SMART Microphone Scheduler
Synopsis
smart-dispatcher
Description
smart-dispatcher runs as a service and schedules attached microphone devices for streaming. For each scheduled microphone, smart-dispatcher spawns an instance of smart-stream-wrapper.
The smart-dispatcher scans the devices directory /var/www/html/storage/devices/ for device-specific subdirectories named with their unique serial number (six dotted hex bytes). Within each subdirectory, the dispatcher looks for a settings and schedule configuration file. If both files are present, the microphone device is scheduled in accordance with the schedule configuration file. When scheduled to record, the smart-stream-wrapper is invoked with the --duration parameter set in accordance to the scheduled end time, and other parameters are passed in accordance to the settings configuration file.
The settings configuration file is a list of arguments to be passed to smart-stream-wrapper, each argument on a line.
The schedule configuration file is a text file comprising a list of schedule blocks. Each schedule block is three lines as follows:
START { TIME | RISE {+|-} | SET {+|-} } hh:mm
DUTY { ALWAYS | CYCLE ON hh:mm OFF hh:mm }
END { TIME | RISE {+|-} | SET {+|-} } hh:mm
Exit Codes
- 0
-
Success
- 1
-
Fail
Files
- /var/www/html/storage/devices/ <serial-number> /schedule
-
Per-microphone schedule configuration
