hamedal-sdk

2.2.3 • Public • Published

HamedalSDK

Example

var Hamedal = require('hamedal-sdk')

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

cameraInfo = cameras[0];
falcon = new Hamedal.falcon.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-sdk');
var cameras =  Hamedal.falcon.devices();
if (cameras.length == 0){
    console.log('unable');
}
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();

Package Sidebar

Install

npm i hamedal-sdk

Weekly Downloads

0

Version

2.2.3

License

MIT

Unpacked Size

29.7 kB

Total Files

14

Last publish

Collaborators

  • auditoryworks