zigbee-herdsman-converters 14.0.346 → 14.0.350
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/converters/fromZigbee.js +13 -2
- package/converters/toZigbee.js +0 -6
- package/devices/dawon_dns.js +34 -0
- package/devices/ecosmart.js +1 -1
- package/devices/heiman.js +2 -17
- package/devices/ksentry.js +1 -2
- package/devices/ledvance.js +8 -0
- package/devices/lellki.js +60 -0
- package/devices/moes.js +3 -4
- package/devices/osram.js +56 -2
- package/devices/robb.js +14 -0
- package/devices/siglis.js +42 -0
- package/devices/sinope.js +14 -3
- package/devices/sprut.js +96 -0
- package/devices/tuya.js +22 -71
- package/index.js +1 -3
- package/lib/exposes.js +3 -0
- package/lib/tuya.js +19 -0
- package/npm-shrinkwrap.json +369 -397
- package/package.json +2 -2
package/converters/fromZigbee.js
CHANGED
|
@@ -7312,9 +7312,9 @@ const converters = {
|
|
|
7312
7312
|
const value = tuya.getDataValue(msg.data.datatype, msg.data.data);
|
|
7313
7313
|
switch (dp) {
|
|
7314
7314
|
case tuya.dataPoints.trsPresenceState:
|
|
7315
|
-
return {presence: {0:
|
|
7315
|
+
return {presence: {0: false, 1: true}[value]};
|
|
7316
7316
|
case tuya.dataPoints.trsMotionState:
|
|
7317
|
-
return {motion: {1:
|
|
7317
|
+
return {motion: {1: false, 2: true}[value]};
|
|
7318
7318
|
case tuya.dataPoints.trsMotionSpeed:
|
|
7319
7319
|
return {motion_speed: value};
|
|
7320
7320
|
case tuya.dataPoints.trsMotionDirection:
|
|
@@ -7590,6 +7590,17 @@ const converters = {
|
|
|
7590
7590
|
}
|
|
7591
7591
|
},
|
|
7592
7592
|
},
|
|
7593
|
+
dawon_card_holder: {
|
|
7594
|
+
cluster: 'ssIasZone',
|
|
7595
|
+
type: 'commandStatusChangeNotification',
|
|
7596
|
+
convert: (model, msg, publish, options, meta) => {
|
|
7597
|
+
const zoneStatus = msg.data.zonestatus;
|
|
7598
|
+
return {
|
|
7599
|
+
card: (zoneStatus & 1) > 0,
|
|
7600
|
+
battery_low: (zoneStatus & 1<<3) > 0,
|
|
7601
|
+
};
|
|
7602
|
+
},
|
|
7603
|
+
},
|
|
7593
7604
|
// #endregion
|
|
7594
7605
|
|
|
7595
7606
|
// #region Ignore converters (these message dont need parsing).
|
package/converters/toZigbee.js
CHANGED
|
@@ -2739,12 +2739,6 @@ const converters = {
|
|
|
2739
2739
|
await tuya.sendDataPointBool(entity, tuya.dataPoints.moesSboostHeating, value === 'ON');
|
|
2740
2740
|
},
|
|
2741
2741
|
},
|
|
2742
|
-
moesS_thermostat_boost_heating_countdown: {
|
|
2743
|
-
key: ['boost_heating_countdown'],
|
|
2744
|
-
convertSet: async (entity, key, value, meta) => {
|
|
2745
|
-
await tuya.sendDataPointValue(entity, tuya.dataPoints.moesSboostHeatingCountdown, value);
|
|
2746
|
-
},
|
|
2747
|
-
},
|
|
2748
2742
|
moesS_thermostat_window_detection: {
|
|
2749
2743
|
key: ['window_detection'],
|
|
2750
2744
|
convertSet: async (entity, key, value, meta) => {
|
package/devices/dawon_dns.js
CHANGED
|
@@ -4,6 +4,7 @@ const tz = require('../converters/toZigbee');
|
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
6
|
const e = exposes.presets;
|
|
7
|
+
const ea = exposes.access;
|
|
7
8
|
|
|
8
9
|
module.exports = [
|
|
9
10
|
{
|
|
@@ -272,4 +273,37 @@ module.exports = [
|
|
|
272
273
|
},
|
|
273
274
|
exposes: [e.battery(), e.switch()],
|
|
274
275
|
},
|
|
276
|
+
{
|
|
277
|
+
zigbeeModel: ['KB-HD100-ZB'],
|
|
278
|
+
model: 'KB-HD100-ZB',
|
|
279
|
+
vendor: 'Dawon DNS',
|
|
280
|
+
description: 'IOT Card holder',
|
|
281
|
+
fromZigbee: [fz.dawon_card_holder],
|
|
282
|
+
toZigbee: [],
|
|
283
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
284
|
+
const endpoint = device.getEndpoint(1);
|
|
285
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['ssIasZone']);
|
|
286
|
+
const payload = [{
|
|
287
|
+
attribute: 'zoneState', minimumReportInterval: 0, maximumReportInterval: 3600, reportableChange: 0}];
|
|
288
|
+
await endpoint.configureReporting('ssIasZone', payload);
|
|
289
|
+
},
|
|
290
|
+
exposes: [exposes.binary('card', ea.STATE, true, false)
|
|
291
|
+
.withDescription('Indicates if the card is inserted (= true) or not (= false)'), e.battery_low()],
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
zigbeeModel: ['KB-B540R-ZB'],
|
|
295
|
+
model: 'KB-B540R-ZB',
|
|
296
|
+
vendor: 'Dawon DNS',
|
|
297
|
+
description: 'IOT smart plug 16A',
|
|
298
|
+
fromZigbee: [fz.on_off, fz.metering],
|
|
299
|
+
toZigbee: [tz.on_off],
|
|
300
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
301
|
+
const endpoint = device.getEndpoint(1);
|
|
302
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
303
|
+
await reporting.onOff(endpoint);
|
|
304
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
305
|
+
await reporting.instantaneousDemand(endpoint);
|
|
306
|
+
},
|
|
307
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
308
|
+
},
|
|
275
309
|
];
|
package/devices/ecosmart.js
CHANGED
|
@@ -55,7 +55,7 @@ module.exports = [
|
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
// eslint-disable-next-line
|
|
58
|
-
zigbeeModel: ['\u0000\u0002\u0000\u0004�V\u0000\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e', '\u0000\u0002\u0000\u0004��\"�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e','\u0000\u0002\u0000\u0004�\u0003\"�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e'],
|
|
58
|
+
zigbeeModel: ['\u0000\u0002\u0000\u0004�V\u0000\n\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e', '\u0000\u0002\u0000\u0004��\"�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e','\u0000\u0002\u0000\u0004�\u0003\"�\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e','\u0000\u0002\u0000\u0004r �P\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e','\u0000\u0002\u0000\u0004b �P\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u000e'],
|
|
59
59
|
model: 'D1523',
|
|
60
60
|
vendor: 'EcoSmart',
|
|
61
61
|
description: 'A19 soft white bulb',
|
package/devices/heiman.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
const exposes = require('../lib/exposes');
|
|
2
2
|
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
|
-
const globalStore = require('../lib/store');
|
|
5
4
|
const constants = require('../lib/constants');
|
|
6
5
|
const reporting = require('../lib/reporting');
|
|
7
6
|
const extend = require('../lib/extend');
|
|
8
7
|
const e = exposes.presets;
|
|
9
8
|
const ea = exposes.access;
|
|
9
|
+
const tuya = require('../lib/tuya');
|
|
10
10
|
|
|
11
11
|
module.exports = [
|
|
12
12
|
{
|
|
@@ -66,22 +66,7 @@ module.exports = [
|
|
|
66
66
|
await reporting.onOff(endpoint);
|
|
67
67
|
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
68
68
|
},
|
|
69
|
-
onEvent:
|
|
70
|
-
const endpoint = device.getEndpoint(1);
|
|
71
|
-
if (type === 'stop') {
|
|
72
|
-
clearInterval(globalStore.getValue(device, 'interval'));
|
|
73
|
-
globalStore.clearValue(device, 'interval');
|
|
74
|
-
} else if (!globalStore.hasValue(device, 'interval')) {
|
|
75
|
-
const seconds = options && options.measurement_poll_interval ? options.measurement_poll_interval : 60;
|
|
76
|
-
if (seconds === -1) return;
|
|
77
|
-
const interval = setInterval(async () => {
|
|
78
|
-
try {
|
|
79
|
-
await endpoint.read('haElectricalMeasurement', ['rmsVoltage', 'rmsCurrent', 'activePower']);
|
|
80
|
-
} catch (error) {/* Do nothing*/}
|
|
81
|
-
}, seconds*1000);
|
|
82
|
-
globalStore.putValue(device, 'interval', interval);
|
|
83
|
-
}
|
|
84
|
-
},
|
|
69
|
+
onEvent: tuya.onEventMeasurementPoll,
|
|
85
70
|
exposes: [e.switch(), e.power(), e.current(), e.voltage()],
|
|
86
71
|
},
|
|
87
72
|
{
|
package/devices/ksentry.js
CHANGED
|
@@ -6,8 +6,7 @@ module.exports = [
|
|
|
6
6
|
zigbeeModel: ['Lamp_01'],
|
|
7
7
|
model: 'KS-SM001',
|
|
8
8
|
vendor: 'Ksentry Electronics',
|
|
9
|
-
description: '
|
|
10
|
-
'/pdtl/ZigBee-module/1162731630/zigbee-on-off-controller-modules.htm)',
|
|
9
|
+
description: 'Zigbee on/off controller',
|
|
11
10
|
extend: extend.switch(),
|
|
12
11
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
13
12
|
const endpoint = device.getEndpoint(11);
|
package/devices/ledvance.js
CHANGED
|
@@ -98,4 +98,12 @@ module.exports = [
|
|
|
98
98
|
extend: extend.ledvance.light_onoff_brightness_colortemp_color({colorTempRange: [153, 526]}),
|
|
99
99
|
ota: ota.ledvance,
|
|
100
100
|
},
|
|
101
|
+
{
|
|
102
|
+
zigbeeModel: ['Tibea TW Z3'],
|
|
103
|
+
model: '4058075168572',
|
|
104
|
+
vendor: 'LEDVANCE',
|
|
105
|
+
description: 'SMART+ lamp E27 turntable white',
|
|
106
|
+
extend: extend.ledvance.light_onoff_brightness_colortemp({colorTempRange: [153, 370]}),
|
|
107
|
+
ota: ota.ledvance,
|
|
108
|
+
},
|
|
101
109
|
];
|
package/devices/lellki.js
CHANGED
|
@@ -5,6 +5,7 @@ const reporting = require('../lib/reporting');
|
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
6
|
const e = exposes.presets;
|
|
7
7
|
const ea = exposes.access;
|
|
8
|
+
const tuya = require('../lib/tuya');
|
|
8
9
|
|
|
9
10
|
module.exports = [
|
|
10
11
|
{
|
|
@@ -82,4 +83,63 @@ module.exports = [
|
|
|
82
83
|
description: 'Circuit switch',
|
|
83
84
|
extend: extend.switch(),
|
|
84
85
|
},
|
|
86
|
+
{
|
|
87
|
+
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_z6fgd73r'}],
|
|
88
|
+
model: 'XF-EU-S100-1-M',
|
|
89
|
+
description: 'Touch switch 1 gang (with power monitoring)',
|
|
90
|
+
vendor: 'LELLKI',
|
|
91
|
+
extend: extend.switch(),
|
|
92
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory],
|
|
93
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
|
|
94
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
95
|
+
const endpoint = device.getEndpoint(1);
|
|
96
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
97
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
|
|
98
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
|
|
99
|
+
device.save();
|
|
100
|
+
},
|
|
101
|
+
options: [exposes.options.measurement_poll_interval()],
|
|
102
|
+
exposes: [e.switch().withEndpoint('l1'), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
103
|
+
e.energy(), exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
|
|
104
|
+
.withDescription('Recover state after power outage')],
|
|
105
|
+
onEvent: tuya.onEventMeasurementPoll,
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_bppxj3sf'}],
|
|
109
|
+
model: 'WP34-EU',
|
|
110
|
+
vendor: 'LELLKI',
|
|
111
|
+
description: 'Outlet power cord with 4 sockets and 2 USB',
|
|
112
|
+
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.switch().withEndpoint('l3'),
|
|
113
|
+
e.switch().withEndpoint('l4'), e.switch().withEndpoint('l5')],
|
|
114
|
+
extend: extend.switch(),
|
|
115
|
+
meta: {multiEndpoint: true},
|
|
116
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
117
|
+
for (const ID of [1, 2, 3, 4, 5]) {
|
|
118
|
+
await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ['genOnOff']);
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
endpoint: (device) => {
|
|
122
|
+
return {'l1': 1, 'l2': 2, 'l3': 3, 'l4': 4, 'l5': 5};
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
fingerprint: [{modelID: 'TS011F', manufacturerName: '_TZ3000_0yxeawjt'}],
|
|
127
|
+
model: 'WK34-EU',
|
|
128
|
+
description: 'Power socket EU (with power monitoring)',
|
|
129
|
+
vendor: 'LELLKI',
|
|
130
|
+
fromZigbee: [fz.on_off, fz.electrical_measurement, fz.metering, fz.ignore_basic_report, fz.tuya_switch_power_outage_memory],
|
|
131
|
+
toZigbee: [tz.on_off, tz.tuya_switch_power_outage_memory],
|
|
132
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
133
|
+
const endpoint = device.getEndpoint(1);
|
|
134
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
135
|
+
endpoint.saveClusterAttributeKeyValue('haElectricalMeasurement', {acCurrentDivisor: 1000, acCurrentMultiplier: 1});
|
|
136
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 100, multiplier: 1});
|
|
137
|
+
device.save();
|
|
138
|
+
},
|
|
139
|
+
options: [exposes.options.measurement_poll_interval()],
|
|
140
|
+
exposes: [e.switch(), e.power(), e.current(), e.voltage().withAccess(ea.STATE),
|
|
141
|
+
e.energy(), exposes.enum('power_outage_memory', ea.STATE_SET, ['on', 'off', 'restore'])
|
|
142
|
+
.withDescription('Recover state after power outage')],
|
|
143
|
+
onEvent: tuya.onEventMeasurementPoll,
|
|
144
|
+
},
|
|
85
145
|
];
|
package/devices/moes.js
CHANGED
|
@@ -200,18 +200,17 @@ module.exports = [
|
|
|
200
200
|
fromZigbee: [fz.ignore_basic_report, fz.ignore_tuya_set_time, fz.moesS_thermostat],
|
|
201
201
|
toZigbee: [tz.moesS_thermostat_current_heating_setpoint, tz.moesS_thermostat_child_lock,
|
|
202
202
|
tz.moesS_thermostat_window_detection, tz.moesS_thermostat_temperature_calibration,
|
|
203
|
-
tz.moesS_thermostat_boost_heating_countdown, tz.moesS_thermostat_system_mode,
|
|
204
203
|
tz.moesS_thermostat_boost_heating, tz.moesS_thermostat_boostHeatingCountdownTimeSet,
|
|
205
204
|
tz.moesS_thermostat_eco_temperature, tz.moesS_thermostat_max_temperature,
|
|
206
205
|
tz.moesS_thermostat_min_temperature, tz.moesS_thermostat_moesSecoMode,
|
|
207
|
-
tz.moesS_thermostat_schedule_programming],
|
|
206
|
+
tz.moesS_thermostat_system_mode, tz.moesS_thermostat_schedule_programming],
|
|
208
207
|
exposes: [
|
|
209
208
|
e.battery(), e.child_lock(), e.eco_mode(), e.eco_temperature(), e.max_temperature(), e.min_temperature(),
|
|
210
209
|
e.position(), e.window_detection(),
|
|
211
210
|
exposes.binary('window', ea.STATE, 'CLOSED', 'OPEN').withDescription('Window status closed or open '),
|
|
212
211
|
exposes.climate()
|
|
213
212
|
.withLocalTemperature(ea.STATE).withSetpoint('current_heating_setpoint', 5, 35, 0.5, ea.STATE_SET)
|
|
214
|
-
.withLocalTemperatureCalibration(-
|
|
213
|
+
.withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET)
|
|
215
214
|
.withPreset(['programming', 'manual', 'temporary_manual', 'holiday'],
|
|
216
215
|
'MANUAL MODE ☝ - In this mode, the device executes manual temperature setting. '+
|
|
217
216
|
'When the set temperature is lower than the "minimum temperature", the valve is closed (forced closed). ' +
|
|
@@ -225,7 +224,7 @@ module.exports = [
|
|
|
225
224
|
'You can set up to 4 stages of temperature every for WEEKDAY ➀➁➂➃➄, SATURDAY ➅ and SUNDAY ➆.'),
|
|
226
225
|
exposes.binary('boost_heating', ea.STATE_SET, 'ON', 'OFF').withDescription('Boost Heating: press and hold "+" for 3 seconds, ' +
|
|
227
226
|
'the device will enter the boost heating mode, and the ▷╵◁ will flash. The countdown will be displayed in the APP'),
|
|
228
|
-
exposes.numeric('boost_heating_countdown', ea.
|
|
227
|
+
exposes.numeric('boost_heating_countdown', ea.STATE).withUnit('Min').withDescription('Countdown in minutes')
|
|
229
228
|
.withValueMin(0).withValueMax(15),
|
|
230
229
|
exposes.numeric('boost_heating_countdown_time_set', ea.STATE_SET).withUnit('second')
|
|
231
230
|
.withDescription('Boost Time Setting 100 sec - 900 sec, (default = 300 sec)').withValueMin(100).withValueMax(900)],
|
package/devices/osram.js
CHANGED
|
@@ -391,14 +391,68 @@ module.exports = [
|
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
zigbeeModel: ['Zigbee 3.0 DALI CONV LI'],
|
|
394
|
-
model: '
|
|
394
|
+
model: '4062172044776_1',
|
|
395
395
|
vendor: 'OSRAM',
|
|
396
|
-
description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires',
|
|
396
|
+
description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires (only one device)',
|
|
397
397
|
extend: extend.ledvance.light_onoff_brightness(),
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
fingerprint: [{modelID: 'Zigbee 3.0 DALI CONV LI', endpoints: [{ID: 10}, {ID: 25}, {ID: 242}]}],
|
|
401
|
+
model: '4062172044776_2',
|
|
402
|
+
vendor: 'OSRAM',
|
|
403
|
+
description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires (one device and pushbutton)',
|
|
404
|
+
extend: extend.ledvance.light_onoff_brightness(),
|
|
405
|
+
onEvent: async (type, data, device) => {
|
|
406
|
+
if (type === 'deviceInterview') {
|
|
407
|
+
device.getEndpoint(25).addBinding('genOnOff', device.getEndpoint(10));
|
|
408
|
+
device.getEndpoint(25).addBinding('genLevelCtrl', device.getEndpoint(10));
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
fingerprint: [{modelID: 'Zigbee 3.0 DALI CONV LI', endpoints: [{ID: 10}, {ID: 11}, {ID: 242}]}],
|
|
414
|
+
model: '4062172044776_3',
|
|
415
|
+
vendor: 'OSRAM',
|
|
416
|
+
description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires (with two devices)',
|
|
417
|
+
extend: extend.ledvance.light_onoff_brightness({noConfigure: true}),
|
|
398
418
|
exposes: [e.light_brightness().withEndpoint('l1'), e.light_brightness().withEndpoint('l2')],
|
|
399
419
|
endpoint: (device) => {
|
|
400
420
|
return {'l1': 10, 'l2': 11};
|
|
401
421
|
},
|
|
402
422
|
meta: {multiEndpoint: true},
|
|
423
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
424
|
+
await reporting.bind(device.getEndpoint(10), coordinatorEndpoint, ['genLevelCtrl', 'genOnOff']);
|
|
425
|
+
await reporting.bind(device.getEndpoint(11), coordinatorEndpoint, ['genLevelCtrl', 'genOnOff']);
|
|
426
|
+
await reporting.onOff(device.getEndpoint(10));
|
|
427
|
+
await reporting.brightness(device.getEndpoint(10));
|
|
428
|
+
await reporting.onOff(device.getEndpoint(11));
|
|
429
|
+
await reporting.brightness(device.getEndpoint(11));
|
|
430
|
+
},
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
fingerprint: [{modelID: 'Zigbee 3.0 DALI CONV LI', endpoints: [{ID: 10}, {ID: 11}, {ID: 25}, {ID: 242}]}],
|
|
434
|
+
model: '4062172044776_4',
|
|
435
|
+
vendor: 'OSRAM',
|
|
436
|
+
description: 'Zigbee 3.0 DALI CONV LI dimmer for DALI-based luminaires (with two devices and pushbutton)',
|
|
437
|
+
extend: extend.ledvance.light_onoff_brightness({noConfigure: true}),
|
|
438
|
+
exposes: [e.light_brightness().withEndpoint('l1'), e.light_brightness().withEndpoint('l2')],
|
|
439
|
+
endpoint: (device) => {
|
|
440
|
+
return {'l1': 10, 'l2': 11};
|
|
441
|
+
},
|
|
442
|
+
meta: {multiEndpoint: true},
|
|
443
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
444
|
+
await reporting.bind(device.getEndpoint(10), coordinatorEndpoint, ['genLevelCtrl', 'genOnOff']);
|
|
445
|
+
await reporting.bind(device.getEndpoint(11), coordinatorEndpoint, ['genLevelCtrl', 'genOnOff']);
|
|
446
|
+
await reporting.onOff(device.getEndpoint(10));
|
|
447
|
+
await reporting.brightness(device.getEndpoint(10));
|
|
448
|
+
await reporting.onOff(device.getEndpoint(11));
|
|
449
|
+
await reporting.brightness(device.getEndpoint(11));
|
|
450
|
+
},
|
|
451
|
+
onEvent: async (type, data, device) => {
|
|
452
|
+
if (type === 'deviceInterview') {
|
|
453
|
+
device.getEndpoint(25).addBinding('genOnOff', device.getEndpoint(10));
|
|
454
|
+
device.getEndpoint(25).addBinding('genLevelCtrl', device.getEndpoint(10));
|
|
455
|
+
}
|
|
456
|
+
},
|
|
403
457
|
},
|
|
404
458
|
];
|
package/devices/robb.js
CHANGED
|
@@ -184,4 +184,18 @@ module.exports = [
|
|
|
184
184
|
},
|
|
185
185
|
exposes: [e.power(), e.current(), e.voltage().withAccess(ea.STATE), e.switch(), e.energy(), e.temperature()],
|
|
186
186
|
},
|
|
187
|
+
{
|
|
188
|
+
zigbeeModel: ['ROB_200-016-0'],
|
|
189
|
+
model: 'ROB_200-016-0',
|
|
190
|
+
vendor: 'ROBB smart',
|
|
191
|
+
description: 'RGB CCT DIM 3 in 1 Zigbee Remote',
|
|
192
|
+
fromZigbee: [fz.battery, fz.command_move_to_color, fz.command_move_to_color_temp, fz.command_move_hue,
|
|
193
|
+
fz.command_step, fz.command_recall, fz.command_on, fz.command_off, fz.command_toggle, fz.command_stop,
|
|
194
|
+
fz.command_move, fz.command_color_loop_set, fz.command_ehanced_move_to_hue_and_saturation],
|
|
195
|
+
toZigbee: [],
|
|
196
|
+
exposes: [e.battery(), e.action([
|
|
197
|
+
'color_move', 'color_temperature_move', 'hue_move', 'brightness_step_up', 'brightness_step_down',
|
|
198
|
+
'recall_*', 'on', 'off', 'toggle', 'brightness_stop', 'brightness_move_up', 'brightness_move_down',
|
|
199
|
+
'color_loop_set', 'enhanced_move_to_hue_and_saturation', 'hue_stop'])],
|
|
200
|
+
},
|
|
187
201
|
];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
|
|
2
|
+
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
|
|
3
|
+
const exposes = require('zigbee-herdsman-converters/lib/exposes');
|
|
4
|
+
const reporting = require('zigbee-herdsman-converters/lib/reporting');
|
|
5
|
+
const e = exposes.presets;
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
module.exports = [
|
|
9
|
+
{
|
|
10
|
+
zigbeeModel: ['zigfred uno'],
|
|
11
|
+
model: 'ZFU-1D-CH',
|
|
12
|
+
vendor: 'Siglis',
|
|
13
|
+
description: 'zigfred uno smart in-wall switch',
|
|
14
|
+
exposes: [e.light_brightness_colorxy().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.light_brightness().withEndpoint('l3')],
|
|
15
|
+
fromZigbee: [fz.color_colortemp, fz.on_off, fz.brightness, fz.level_config, fz.power_on_behavior, fz.ignore_basic_report],
|
|
16
|
+
toZigbee: [tz.light_onoff_brightness, tz.light_color, tz.ignore_transition, tz.ignore_rate, tz.light_brightness_move,
|
|
17
|
+
tz.light_brightness_step, tz.level_config, tz.power_on_behavior, tz.light_hue_saturation_move,
|
|
18
|
+
tz.light_hue_saturation_step, tz.light_color_options, tz.light_color_mode],
|
|
19
|
+
meta: {multiEndpoint: true},
|
|
20
|
+
endpoint: (device) => {
|
|
21
|
+
return {'l1': 5, 'l2': 6, 'l3': 7};
|
|
22
|
+
},
|
|
23
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
24
|
+
const controlEp = device.getEndpoint(5);
|
|
25
|
+
const relayEp = device.getEndpoint(6);
|
|
26
|
+
const dimmerEp = device.getEndpoint(7);
|
|
27
|
+
// Bind Control EP (LED)
|
|
28
|
+
await reporting.bind(controlEp, coordinatorEndpoint, ['genOnOff']);
|
|
29
|
+
await reporting.bind(controlEp, coordinatorEndpoint, ['genLevelCtrl']);
|
|
30
|
+
await reporting.onOff(controlEp);
|
|
31
|
+
await reporting.brightness(controlEp);
|
|
32
|
+
// Bind Relay EP
|
|
33
|
+
await reporting.bind(relayEp, coordinatorEndpoint, ['genOnOff']);
|
|
34
|
+
await reporting.onOff(relayEp);
|
|
35
|
+
// Bind Dimmer EP
|
|
36
|
+
await reporting.bind(dimmerEp, coordinatorEndpoint, ['genOnOff']);
|
|
37
|
+
await reporting.bind(dimmerEp, coordinatorEndpoint, ['genLevelCtrl']);
|
|
38
|
+
await reporting.onOff(dimmerEp);
|
|
39
|
+
await reporting.brightness(dimmerEp);
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
];
|
package/devices/sinope.js
CHANGED
|
@@ -113,8 +113,8 @@ module.exports = [
|
|
|
113
113
|
model: 'TH1300ZB',
|
|
114
114
|
vendor: 'Sinopé',
|
|
115
115
|
description: 'Zigbee smart floor heating thermostat',
|
|
116
|
-
fromZigbee: [fz.legacy.sinope_thermostat_att_report, fz.legacy.hvac_user_interface, fz.
|
|
117
|
-
fz.legacy.sinope_thermostat_state, fz.sinope_TH1300ZB_specific],
|
|
116
|
+
fromZigbee: [fz.legacy.sinope_thermostat_att_report, fz.legacy.hvac_user_interface, fz.electrical_measurement,
|
|
117
|
+
fz.ignore_temperature_report, fz.legacy.sinope_thermostat_state, fz.sinope_TH1300ZB_specific],
|
|
118
118
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
|
|
119
119
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state,
|
|
120
120
|
tz.sinope_thermostat_occupancy, tz.sinope_thermostat_backlight_autodim_param, tz.sinope_thermostat_time,
|
|
@@ -128,7 +128,7 @@ module.exports = [
|
|
|
128
128
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
129
129
|
const endpoint = device.getEndpoint(1);
|
|
130
130
|
const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg',
|
|
131
|
-
'msTemperatureMeasurement', 'manuSpecificSinope'];
|
|
131
|
+
'haElectricalMeasurement', 'msTemperatureMeasurement', 'manuSpecificSinope'];
|
|
132
132
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
133
133
|
await reporting.thermostatTemperature(endpoint);
|
|
134
134
|
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
@@ -138,6 +138,17 @@ module.exports = [
|
|
|
138
138
|
await reporting.thermostatRunningState(endpoint);
|
|
139
139
|
} catch (error) {/* Not all support this */}
|
|
140
140
|
|
|
141
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
142
|
+
try {
|
|
143
|
+
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 1: 1W
|
|
144
|
+
} catch (error) {/* Do nothing*/}
|
|
145
|
+
try {
|
|
146
|
+
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 100}); // divider 1000: 0.1Arms
|
|
147
|
+
} catch (error) {/* Do nothing*/}
|
|
148
|
+
try {
|
|
149
|
+
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 5}); // divider 10: 0.5Vrms
|
|
150
|
+
} catch (error) {/* Do nothing*/}
|
|
151
|
+
|
|
141
152
|
try {
|
|
142
153
|
await reporting.thermostatKeypadLockMode(endpoint);
|
|
143
154
|
} catch (error) {
|
package/devices/sprut.js
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const exposes = require('../lib/exposes');
|
|
2
|
+
const fz = require('../converters/fromZigbee');
|
|
3
|
+
const tz = require('../converters/toZigbee');
|
|
4
|
+
const reporting = require('../lib/reporting');
|
|
5
|
+
const e = exposes.presets;
|
|
6
|
+
const {calibrateAndPrecisionRoundOptions} = require('../lib/utils');
|
|
7
|
+
|
|
8
|
+
const fzLocal = {
|
|
9
|
+
temperature: {
|
|
10
|
+
cluster: 'msTemperatureMeasurement',
|
|
11
|
+
type: ['attributeReport', 'readResponse'],
|
|
12
|
+
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature')],
|
|
13
|
+
convert: (model, msg, publish, options, meta) => {
|
|
14
|
+
const temperature = parseFloat(msg.data['measuredValue']) / 100.0;
|
|
15
|
+
return {temperature: calibrateAndPrecisionRoundOptions(temperature, options, 'temperature')};
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
occupancy: {
|
|
19
|
+
cluster: 'msOccupancySensing',
|
|
20
|
+
type: ['readResponse', 'attributeReport'],
|
|
21
|
+
convert: (model, msg, publish, options, meta) => {
|
|
22
|
+
if (msg.data.hasOwnProperty('sprutOccupancyLevel')) {
|
|
23
|
+
return {occupancy_level: msg.data['sprutOccupancyLevel']};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
voc: {
|
|
28
|
+
cluster: 'sprutVoc',
|
|
29
|
+
type: ['readResponse', 'attributeReport'],
|
|
30
|
+
convert: (model, msg, publish, options, meta) => {
|
|
31
|
+
if (msg.data.hasOwnProperty('voc')) {
|
|
32
|
+
return {voc: msg.data['voc']};
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
noise: {
|
|
37
|
+
cluster: 'sprutNoise',
|
|
38
|
+
type: ['readResponse', 'attributeReport'],
|
|
39
|
+
convert: (model, msg, publish, options, meta) => {
|
|
40
|
+
if (msg.data.hasOwnProperty('noise')) {
|
|
41
|
+
return {noise: msg.data['noise'].toFixed(2)};
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
noise_detected: {
|
|
46
|
+
cluster: 'sprutNoise',
|
|
47
|
+
type: ['readResponse', 'attributeReport'],
|
|
48
|
+
convert: (model, msg, publish, options, meta) => {
|
|
49
|
+
if (msg.data.hasOwnProperty('noise_detected')) {
|
|
50
|
+
return {noise_detected: msg.data['noise_detected'] === 1};
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
module.exports = [
|
|
57
|
+
{
|
|
58
|
+
zigbeeModel: ['WBMSW3'],
|
|
59
|
+
model: 'WB-MSW-ZIGBEE v.3',
|
|
60
|
+
vendor: 'Sprut.device',
|
|
61
|
+
description: 'Wall-mounted Zigbee sensor',
|
|
62
|
+
fromZigbee: [fzLocal.temperature, fz.illuminance, fz.humidity, fz.occupancy, fzLocal.occupancy, fz.co2, fzLocal.voc,
|
|
63
|
+
fzLocal.noise, fzLocal.noise_detected, fz.on_off],
|
|
64
|
+
toZigbee: [tz.on_off],
|
|
65
|
+
exposes: [e.temperature(), e.illuminance(), e.illuminance_lux(), e.humidity(),
|
|
66
|
+
e.occupancy(), e.occupancy_level(), e.co2(), e.voc(), e.noise(), e.noise_detected(), e.switch().withEndpoint('l1'),
|
|
67
|
+
e.switch().withEndpoint('l2'), e.switch().withEndpoint('default')],
|
|
68
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
69
|
+
const endpoint1 = device.getEndpoint(1);
|
|
70
|
+
const binds = ['genBasic', 'msTemperatureMeasurement', 'msIlluminanceMeasurement', 'msRelativeHumidity',
|
|
71
|
+
'msOccupancySensing', 'msCO2', 'sprutVoc', 'sprutNoise'];
|
|
72
|
+
await reporting.bind(endpoint1, coordinatorEndpoint, binds);
|
|
73
|
+
|
|
74
|
+
// led_red
|
|
75
|
+
await device.getEndpoint(2).read('genOnOff', ['onOff']);
|
|
76
|
+
|
|
77
|
+
// led_green
|
|
78
|
+
await device.getEndpoint(3).read('genOnOff', ['onOff']);
|
|
79
|
+
|
|
80
|
+
// buzzer
|
|
81
|
+
await device.getEndpoint(4).read('genOnOff', ['onOff']);
|
|
82
|
+
|
|
83
|
+
// Read data at start
|
|
84
|
+
await endpoint1.read('msTemperatureMeasurement', ['measuredValue']);
|
|
85
|
+
await endpoint1.read('msIlluminanceMeasurement', ['measuredValue']);
|
|
86
|
+
await endpoint1.read('msRelativeHumidity', ['measuredValue']);
|
|
87
|
+
await endpoint1.read('msOccupancySensing', ['occupancy']);
|
|
88
|
+
await endpoint1.read('sprutNoise', ['noise']);
|
|
89
|
+
await endpoint1.read('sprutNoise', ['noise_detected']);
|
|
90
|
+
},
|
|
91
|
+
endpoint: (device) => {
|
|
92
|
+
return {'system': 1, 'l1': 2, 'l2': 3, 'default': 4};
|
|
93
|
+
},
|
|
94
|
+
meta: {multiEndpoint: true},
|
|
95
|
+
},
|
|
96
|
+
];
|