Winner Zigbee minor config update
This commit is contained in:
@@ -3,28 +3,18 @@
|
|||||||
Поместите файл в папку `/data`. В файле `configuration.yaml` в той же папке добавьте следущее:
|
Поместите файл в папку `/data`. В файле `configuration.yaml` в той же папке добавьте следущее:
|
||||||
```
|
```
|
||||||
external_converters:
|
external_converters:
|
||||||
- Winner_ZigBee_Basic.js
|
- win.basic.js
|
||||||
```
|
```
|
||||||
|
|
||||||
## Winner_ZigBee_Basic.js
|
## `win.basic.js`
|
||||||
Базовая поддержка для Winner'а. Доступные данные:
|
Базовая поддержка для Winner'а. Доступные данные:
|
||||||
- Положение крана: открыт/закрыт
|
- Положение крана: открыт/закрыт
|
||||||
- Статус тревоги
|
- Статус тревоги
|
||||||
- Из-за особенностей прошивки, тревогу можно только выключить.
|
- Из-за особенностей прошивки, тревогу можно только выключить.
|
||||||
|
- Статус сценарного датчика (позволяет включить тревогу)
|
||||||
- Статус режима уборки
|
- Статус режима уборки
|
||||||
- Уровень заряда баттареи
|
- Уровень заряда баттареи
|
||||||
- Код ошибки
|
- Код ошибки
|
||||||
|
|
||||||
## Winner_ZigBee_dev.js
|
## `win.dev.js`
|
||||||
Добавлено частичное отображение сенсоров.
|
Версия с полным списком всех DP устройства. Должен отображать информацию со всех датчиков, но все еще может требовать отладки.
|
||||||
|
|
||||||
Версия с полным списком всех DP устройства. Эти DP не будут работать с Z2MQTT из коробки из-за их нестандартного использования.
|
|
||||||
|
|
||||||
Например, любой DP `sensor_*` — это 4-байтовое целое число:
|
|
||||||
```
|
|
||||||
0xAA_BB_CC_DD , где:
|
|
||||||
[AA] - битовые флаги команд
|
|
||||||
[BB] - битовые флаги статусов
|
|
||||||
[CC] - уровень сигнала
|
|
||||||
[DD] - уровень заряда баттареи
|
|
||||||
```
|
|
||||||
@@ -82,111 +82,113 @@ const definition = {
|
|||||||
toZigbee: [tzDatapoints],
|
toZigbee: [tzDatapoints],
|
||||||
onEvent: tuya.onEventSetTime,
|
onEvent: tuya.onEventSetTime,
|
||||||
exposes: [
|
exposes: [
|
||||||
exposes.presets.enum('fault', ea.STATE, ['low_battery', 'fault', 'lack_water', 'sensor_fault', 'motor_fault', 'low_temp']).withCategory('diagnostic'),
|
exposes.presets.enum('fault', ea.STATE, ['low_battery', 'fault', 'lack_water', 'sensor_fault', 'motor_fault', 'low_temp']).withCategory('diagnostic').withDescription("Tuya build-in fault codes."),
|
||||||
exposes.presets.binary('switch', ea.STATE_SET, true, false ).withLabel('Valve status'),
|
exposes.presets.binary('switch', ea.STATE_SET, true, false ).withLabel('Valve status'),
|
||||||
exposes.presets.binary('cleaning', ea.STATE_SET, true, false).withLabel('Cleaning Mode:'),
|
exposes.presets.binary('cleaning', ea.STATE_SET, true, false).withLabel('Cleaning Mode status'),
|
||||||
exposes.presets.binary('alarm', ea.STATE_SET, true, false).withDescription('Can not turn the alarm on. Use External vendor sensor for that.'),
|
exposes.presets.binary('alarm', ea.STATE_SET, true, false).withDescription('Can turn the alarm off, but not on. Use External vendor sensor for that.'),
|
||||||
exposes.presets.enum('battery', ea.STATE, ['10', '20', '30', '40', '50', '60', '70', '80', '90', '100', 'Plugged In']),
|
exposes.presets.enum('battery', ea.STATE, ['10', '20', '30', '40', '50', '60', '70', '80', '90', '100', 'Plugged In']),
|
||||||
|
|
||||||
exposes.presets.binary('channel_2', 0b010, true, false).withLabel("External vendor sensor").withDescription("A DP for an extra wired sensor. Triggers alarm on true."),
|
exposes.presets.binary('channel_2', 0b010, true, false).withLabel("External vendor sensor").withDescription("A DP to trigger alarm via Smart Life scenes. Triggers alarm on true, but does not turn the alarm off."),
|
||||||
|
|
||||||
|
|
||||||
|
/** Sensor Fields **/
|
||||||
|
|
||||||
//#region Sensors fields
|
|
||||||
exposes.presets.text('sensor_name_1', ea.STATE_SET),
|
exposes.presets.text('sensor_name_1', ea.STATE_SET),
|
||||||
exposes.presets.composite('sensor_1', 'sensor_1', ea.ALL).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_1', 'sensor_1', ea.ALL).withFeature(new Binary('leakDetected', ea.STATE_GET, true, false)).withFeature(new Binary('securityMode', ea.STATE_SET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_2', ea.ALL),
|
exposes.presets.text('sensor_name_2', ea.ALL),
|
||||||
exposes.presets.composite('sensor_2', 'sensor_2', ea.ALL).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_2', 'sensor_2', ea.ALL).withFeature(new Binary('leakDetected', ea.STATE_GET, true, false)).withFeature(new Binary('securityMode', ea.STATE_SET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_3', ea.ALL),
|
exposes.presets.text('sensor_name_3', ea.ALL),
|
||||||
exposes.presets.composite('sensor_3', 'sensor_3', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_3', 'sensor_3', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_4', ea.ALL),
|
exposes.presets.text('sensor_name_4', ea.ALL),
|
||||||
exposes.presets.composite('sensor_4', 'sensor_4', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_4', 'sensor_4', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_5', ea.ALL),
|
exposes.presets.text('sensor_name_5', ea.ALL),
|
||||||
exposes.presets.composite('sensor_5', 'sensor_5', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_5', 'sensor_5', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_6', ea.ALL),
|
exposes.presets.text('sensor_name_6', ea.ALL),
|
||||||
exposes.presets.composite('sensor_6', 'sensor_6', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_6', 'sensor_6', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_7', ea.ALL),
|
exposes.presets.text('sensor_name_7', ea.ALL),
|
||||||
exposes.presets.composite('sensor_7', 'sensor_7', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_7', 'sensor_7', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_8', ea.ALL),
|
exposes.presets.text('sensor_name_8', ea.ALL),
|
||||||
exposes.presets.composite('sensor_8', 'sensor_8', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_8', 'sensor_8', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_9', ea.ALL),
|
exposes.presets.text('sensor_name_9', ea.ALL),
|
||||||
exposes.presets.composite('sensor_9', 'sensor_9', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_9', 'sensor_9', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_10', ea.ALL),
|
exposes.presets.text('sensor_name_10', ea.ALL),
|
||||||
exposes.presets.composite('sensor_10', 'sensor_10', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_10', 'sensor_10', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_11', ea.ALL),
|
exposes.presets.text('sensor_name_11', ea.ALL),
|
||||||
exposes.presets.composite('sensor_11', 'sensor_11', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_11', 'sensor_11', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_12', ea.ALL),
|
exposes.presets.text('sensor_name_12', ea.ALL),
|
||||||
exposes.presets.composite('sensor_12', 'sensor_12', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_12', 'sensor_12', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_13', ea.ALL),
|
exposes.presets.text('sensor_name_13', ea.ALL),
|
||||||
exposes.presets.composite('sensor_13', 'sensor_13', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_13', 'sensor_13', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_14', ea.ALL),
|
exposes.presets.text('sensor_name_14', ea.ALL),
|
||||||
exposes.presets.composite('sensor_14', 'sensor_14', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_14', 'sensor_14', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_15', ea.ALL),
|
exposes.presets.text('sensor_name_15', ea.ALL),
|
||||||
exposes.presets.composite('sensor_15', 'sensor_15', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_15', 'sensor_15', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_16', ea.ALL),
|
exposes.presets.text('sensor_name_16', ea.ALL),
|
||||||
exposes.presets.composite('sensor_16', 'sensor_16', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_16', 'sensor_16', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_17', ea.ALL),
|
exposes.presets.text('sensor_name_17', ea.ALL),
|
||||||
exposes.presets.composite('sensor_17', 'sensor_17', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_17', 'sensor_17', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_18', ea.ALL),
|
exposes.presets.text('sensor_name_18', ea.ALL),
|
||||||
exposes.presets.composite('sensor_18', 'sensor_18', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_18', 'sensor_18', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_19', ea.ALL),
|
exposes.presets.text('sensor_name_19', ea.ALL),
|
||||||
exposes.presets.composite('sensor_19', 'sensor_19', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_19', 'sensor_19', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_20', ea.ALL),
|
exposes.presets.text('sensor_name_20', ea.ALL),
|
||||||
exposes.presets.composite('sensor_20', 'sensor_20', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_20', 'sensor_20', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_21', ea.ALL),
|
exposes.presets.text('sensor_name_21', ea.ALL),
|
||||||
exposes.presets.composite('sensor_21', 'sensor_21', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_21', 'sensor_21', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_22', ea.ALL),
|
exposes.presets.text('sensor_name_22', ea.ALL),
|
||||||
exposes.presets.composite('sensor_22', 'sensor_22', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_22', 'sensor_22', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_23', ea.ALL),
|
exposes.presets.text('sensor_name_23', ea.ALL),
|
||||||
exposes.presets.composite('sensor_23', 'sensor_23', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_23', 'sensor_23', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_24', ea.ALL),
|
exposes.presets.text('sensor_name_24', ea.ALL),
|
||||||
exposes.presets.composite('sensor_24', 'sensor_24', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_24', 'sensor_24', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_25', ea.ALL),
|
exposes.presets.text('sensor_name_25', ea.ALL),
|
||||||
exposes.presets.composite('sensor_25', 'sensor_25', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_25', 'sensor_25', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_26', ea.ALL),
|
exposes.presets.text('sensor_name_26', ea.ALL),
|
||||||
exposes.presets.composite('sensor_26', 'sensor_26', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_26', 'sensor_26', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_27', ea.ALL),
|
exposes.presets.text('sensor_name_27', ea.ALL),
|
||||||
exposes.presets.composite('sensor_27', 'sensor_27', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_27', 'sensor_27', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_28', ea.ALL),
|
exposes.presets.text('sensor_name_28', ea.ALL),
|
||||||
exposes.presets.composite('sensor_28', 'sensor_28', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_28', 'sensor_28', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_29', ea.ALL),
|
exposes.presets.text('sensor_name_29', ea.ALL),
|
||||||
exposes.presets.composite('sensor_29', 'sensor_29', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_29', 'sensor_29', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_30', ea.ALL),
|
exposes.presets.text('sensor_name_30', ea.ALL),
|
||||||
exposes.presets.composite('sensor_30', 'sensor_30', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_30', 'sensor_30', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_31', ea.ALL),
|
exposes.presets.text('sensor_name_31', ea.ALL),
|
||||||
exposes.presets.composite('sensor_31', 'sensor_31', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_31', 'sensor_31', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
|
|
||||||
exposes.presets.text('sensor_name_32', ea.ALL),
|
exposes.presets.text('sensor_name_32', ea.ALL),
|
||||||
exposes.presets.composite('sensor_32', 'sensor_32', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
exposes.presets.composite('sensor_32', 'sensor_32', ea.ALL).withFeature(new Numeric('signal', ea.STATE_GET)).withFeature(new Numeric('battery', ea.STATE_GET)).withFeature(new Binary('isOnline', ea.STATE_GET, true, false)).withFeature(new Binary('leakDetected', ea.GET, true, false)).withFeature(new Binary('securityMode', ea.SET, true, false)).withFeature(new Binary('statusBatterySignal', ea.GET, true, false)).withFeature(new Binary('ignoreLeaks', ea.STATE_SET, true, false)),
|
||||||
//#endregion
|
|
||||||
],
|
],
|
||||||
meta: {
|
meta: {
|
||||||
tuyaDatapoints: [
|
tuyaDatapoints: [
|
||||||
@@ -214,17 +216,29 @@ const definition = {
|
|||||||
'Plugged in': tuya.enum(10)})],
|
'Plugged in': tuya.enum(10)})],
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
* Device_CMD: Used by Smart Life app for Winner
|
* Device_CMD: a numeric DP used to issue commands to Winner.
|
||||||
* to issue commands.
|
* Useless as is, but you can try to use it to issue commands via MQTT
|
||||||
* TODO: list all hexcodes for commands
|
*
|
||||||
*
|
*
|
||||||
*/
|
*
|
||||||
//[103, 'device_cmd', tuya.valueConverter.raw],
|
* Gidrolock Sensors Only;
|
||||||
|
* Last byte is used for the sensor number (1-32), e.g: 0x01_00_00_0F - replace sensor 15
|
||||||
|
*
|
||||||
|
* 0x01_00_00_00 - добавление/замена датчика (замкнуть контакты WSR) | adding/replacing sensor (close the circuit on WSR)
|
||||||
|
* 0x02_00_00_00 - удаление датчика | remove sensor
|
||||||
|
* 0x03_00_00_00 - включить игнор аварии датчика | enable ignore alarm on specific sensor
|
||||||
|
* 0x04_00_00_00 - отключить игнор аварии датчика | disable ignore alarm on specific sensor
|
||||||
|
* 0x05_00_00_00 - включить режим повышенной безопасности для датчика | enable enhanced security mode on specific sensor
|
||||||
|
* 0x06_00_00_00 - выключить режим повышенной безопасности для датчика | disable enhanced security mode on specific sensor
|
||||||
|
*
|
||||||
|
* 0x12_00_00_01 - открыть кран при аварии | open the valve during an alarm
|
||||||
|
*/
|
||||||
|
[103, 'device_cmd', tuya.valueConverter.raw],
|
||||||
|
|
||||||
[104, 'cleaning', tuya.valueConverter.raw],
|
[104, 'cleaning', tuya.valueConverter.raw],
|
||||||
|
|
||||||
/* Journal DP: the device will post a string in this DP in format "x; sensor name" where x is a special character:
|
/* Journal DP: the device will post a string in this DP in format "sensor name; x" where x is a special character:
|
||||||
* A - regular leak event
|
* A - regular leak event
|
||||||
* L - sensor battery charge low
|
* L - sensor battery charge low
|
||||||
* T - sensor signal lost
|
* T - sensor signal lost
|
||||||
Reference in New Issue
Block a user