VideoSource name error

This commit is contained in:
ma.bogatyrev
2021-01-25 16:18:18 +05:00
parent ecb45c88a2
commit d612ad0423
2 changed files with 2 additions and 2 deletions

View File

@@ -76,7 +76,7 @@ export default class Manager {
/* Event Callbacks */
onMotionDetected = debounceStateUpdate((onvifDeviceId, motionState) => {
const topicKey = 'motion';
const boolMotionState = motionState.IsMotion;
const boolMotionState = motionState.IsMotion !== undefined ? motionState.IsMotion : motionState.State;
this.publishTemplates(onvifDeviceId, topicKey, boolMotionState);
this.publisher.publish(onvifDeviceId, topicKey, convertBooleanToSensorState(boolMotionState));

View File

@@ -12,7 +12,7 @@ export const CALLBACK_TYPES = {
const EVENTS = {
'RuleEngine/CellMotionDetector/Motion': CALLBACK_TYPES.motion,
'RuleEngine/CellMotionDetector/Motion//.': CALLBACK_TYPES.motion,
'VideoSoure/MotionAlarm': CALLBACK_TYPES.motion
'VideoSource/MotionAlarm': CALLBACK_TYPES.motion
};
const DEFAULT_CALLBACKS = {