1.0.1 • Published 4 years ago

hamedal-falcon v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
4 years ago

HamedalSDK

Example

var Hamedal = require('../src/device');

var cameras =  Hamedal.devices();
if (cameras.length == 0){
    console.log('unable');
}
console.log(cameras);

cameraInfo = cameras[0];
falcon = new Hamedal.FalconCamera(cameraInfo);

falcon.isAIModeEnabled().then(value => {
    console.log("The status of the camera mode: ", value ? "enabled" : "disabled");
}).catch(reason => {
    console.log(reason);
});

falcon.disableAIMode().then(value => {
    console.log("Disable the ai mode of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

falcon.enableAIMode().then(value => {
    console.log("Enable the ai mode of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

falcon.getBodyCount().then(value => {
    console.log("the people count of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

falcon.close();

##API ###List all Hamedal devices

var Hamedal = require('hamedal-falcon');
var cameras =  Hamedal.devices();
console.log(cameras);

###Get ai-mode status

falcon.isAIModeEnabled().then(value => {
    console.log("The status of the camera mode: ", value ? "enabled" : "disabled");
}).catch(reason => {
    console.log(reason);
});

###Set ai-mode enabled OR disabled

falcon.enableAIMode().then(value => {
    console.log("Enable the ai mode of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

falcon.disableAIMode().then(value => {
    console.log("Disable the ai mode of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

###Get people body count

falcon.getBodyCount().then(value => {
    console.log("the people count of the camera: ", value);
}).catch(reason => {
    console.log(reason);
});

###Colse the device

falcon.close();
1.0.1

4 years ago

1.0.0

4 years ago