node-foscamhd
simple node client for Foscam HD cameras providing a few basic operations
Usage
setup and configure
const FoscamHdClient = ; let client = protocol: 'http' // if not specified, defaults to 'http' host: '192.168.1.123' port: 1138 // if not specified, defaults to 80 user: 'admin' pass: 'p4$$w4rd';
get url of mjpeg stream todo: add optional guest and operator user/pass sections to config, pass in role as param
client;
moves camera to preset location 'name' todo: add method to surface list of preset names
client;
get current infrared mode ('auto' or 'manual')
client;
set infrared mode ('auto' or 'manual')
client;
set infrared led state ('on' or 'off') note: IrMode must be set to 'manual' or setting the state will have no effect
client;
Functional Testing
create a file in the ./tests/ directory called config.json as below (obviously, substitute your values)
"testcamera": "host":"192.168.1.123" "port":1138 "user":"admin" "pass":"p4$$w4rd"
run the following
npm test