Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
callback();
});
config.audio = Boolean(config.audio);
if (config.doorbell) {
this.debug('add doorbell service');
const doorbellService = acc.addService(hap.Service.Doorbell, this.name);
this.on('input', msg => {
console.log(msg);
this.debug('update ProgrammableSwitchEvent SINGLE_PRESS');
doorbellService.getCharacteristic(hap.Characteristic.ProgrammableSwitchEvent).updateValue(0);
});
}
const cameraSource = new FFMPEG(hap, {name: this.name, videoConfig: config}, logger, config.videoProcessor || 'ffmpeg');
this.debug('add cameraSource');
acc.configureCameraSource(cameraSource);
this.log('publishing camera ' + this.name + ' ' + config.username);
const testPort = net.createServer()
.once('error', err => {
this.error(err);
this.status({fill: 'red', shape: 'dot', text: err.message});
})
.once('listening', () => {
testPort.once('close', () => {
acc.publish({
username: config.username,
port: config.port,
pincode: config.pincode,