From 56bfa2624e5a7dac96d75a3f1a4eaaf980938a41 Mon Sep 17 00:00:00 2001 From: Eugene Abramov Date: Mon, 6 Jun 2022 00:26:24 +0300 Subject: [PATCH] Update README.md and config.js.orig --- README.md | 34 ++++++++++++++++++++++++++++++++++ config.orig.js | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/README.md b/README.md index e09d1bd..a6c87e8 100644 --- a/README.md +++ b/README.md @@ -281,6 +281,40 @@ devices: [ }, ], }, + { + id: 'haw-001-motion', + name: 'Движение', + room: 'Коридор', + type: 'devices.types.sensor', + allowedUsers: ['2'], + mqtt: [ + { + instance: 'motion', + state: '/yandex/sensors/HaW_001_Motion/motion', + }, + ], + valueMapping: [ + { + type: 'event', + mapping: [['not_detected', 'detected'], ['false', 'true']], // [yandex, mqtt] + }, + ], + properties: [ + { + type: 'devices.properties.event', + retrievable: true, + parameters: { + instance: 'motion', + events: [{ + value: 'detected' + }, + { + value: 'not_detected' + }] + }, + }, + ], + }, /* --- end */ ], ``` diff --git a/config.orig.js b/config.orig.js index de277f8..9c75c8a 100644 --- a/config.orig.js +++ b/config.orig.js @@ -156,6 +156,40 @@ module.exports = { }, ], }, + { + id: 'haw-001-motion', + name: 'Движение', + room: 'Коридор', + type: 'devices.types.sensor', + allowedUsers: ['2'], + mqtt: [ + { + instance: 'motion', + state: '/yandex/sensors/HaW_001_Motion/motion', + }, + ], + valueMapping: [ + { + type: 'event', + mapping: [['not_detected', 'detected'], ['false', 'true']], // [yandex, mqtt] + }, + ], + properties: [ + { + type: 'devices.properties.event', + retrievable: true, + parameters: { + instance: 'motion', + events: [{ + value: 'detected' + }, + { + value: 'not_detected' + }] + }, + }, + ], + }, /* --- end */ ], };