zigbee-herdsman-converters 15.0.50 → 15.0.52
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 +30 -1
- package/devices/custom_devices_diy.js +2 -1
- package/devices/owon.js +8 -4
- package/devices/philips.js +1 -1
- package/devices/sonoff.js +1 -11
- package/devices/tuya.js +8 -3
- package/devices/yale.js +28 -0
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -1980,7 +1980,7 @@ const converters = {
|
|
|
1980
1980
|
return {temperature: calibrateAndPrecisionRoundOptions(value / 10, options, 'temperature')};
|
|
1981
1981
|
case tuya.dataPoints.tthHumidity:
|
|
1982
1982
|
return {humidity: calibrateAndPrecisionRoundOptions(
|
|
1983
|
-
(value / (meta.device.manufacturerName
|
|
1983
|
+
(value / (['_TZE200_bjawzodf', '_TZE200_zl1kmjqx'].includes(meta.device.manufacturerName) ? 10 : 1)),
|
|
1984
1984
|
options, 'humidity')};
|
|
1985
1985
|
case tuya.dataPoints.tthBatteryLevel:
|
|
1986
1986
|
return {
|
|
@@ -8224,6 +8224,35 @@ const converters = {
|
|
|
8224
8224
|
return result;
|
|
8225
8225
|
},
|
|
8226
8226
|
},
|
|
8227
|
+
SNZB02_temperature: {
|
|
8228
|
+
cluster: 'msTemperatureMeasurement',
|
|
8229
|
+
type: ['attributeReport', 'readResponse'],
|
|
8230
|
+
options: [exposes.options.precision('temperature'), exposes.options.calibration('temperature')],
|
|
8231
|
+
convert: (model, msg, publish, options, meta) => {
|
|
8232
|
+
const temperature = parseFloat(msg.data['measuredValue']) / 100.0;
|
|
8233
|
+
|
|
8234
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/13640
|
|
8235
|
+
// SNZB-02 reports stranges values sometimes
|
|
8236
|
+
if (temperature > -33 && temperature < 100) {
|
|
8237
|
+
const property = postfixWithEndpointName('temperature', msg, model, meta);
|
|
8238
|
+
return {[property]: calibrateAndPrecisionRoundOptions(temperature, options, 'temperature')};
|
|
8239
|
+
}
|
|
8240
|
+
},
|
|
8241
|
+
},
|
|
8242
|
+
SNZB02_humidity: {
|
|
8243
|
+
cluster: 'msRelativeHumidity',
|
|
8244
|
+
type: ['attributeReport', 'readResponse'],
|
|
8245
|
+
options: [exposes.options.precision('humidity'), exposes.options.calibration('humidity')],
|
|
8246
|
+
convert: (model, msg, publish, options, meta) => {
|
|
8247
|
+
const humidity = parseFloat(msg.data['measuredValue']) / 100.0;
|
|
8248
|
+
|
|
8249
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/13640
|
|
8250
|
+
// SNZB-02 reports stranges values sometimes
|
|
8251
|
+
if (humidity >= 0 && humidity <= 99.75) {
|
|
8252
|
+
return {humidity: calibrateAndPrecisionRoundOptions(humidity, options, 'humidity')};
|
|
8253
|
+
}
|
|
8254
|
+
},
|
|
8255
|
+
},
|
|
8227
8256
|
// #endregion
|
|
8228
8257
|
|
|
8229
8258
|
// #region Ignore converters (these message dont need parsing).
|
|
@@ -812,7 +812,8 @@ module.exports = [
|
|
|
812
812
|
model: 'SNZB-02_EFEKTA',
|
|
813
813
|
vendor: 'Custom devices (DiY)',
|
|
814
814
|
description: 'Alternative firmware for the SONOFF SNZB-02 sensor from EfektaLab, DIY',
|
|
815
|
-
fromZigbee: [fz.
|
|
815
|
+
fromZigbee: [fz.SNZB02_temperature, fz.SNZB02_humidity, fz.battery, fzLocal.termostat_config,
|
|
816
|
+
fzLocal.hydrostat_config, fzLocal.node_config],
|
|
816
817
|
toZigbee: [tzLocal.termostat_config, tzLocal.hydrostat_config, tzLocal.node_config],
|
|
817
818
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
818
819
|
const endpoint = device.getEndpoint(1);
|
package/devices/owon.js
CHANGED
|
@@ -94,14 +94,16 @@ module.exports = [
|
|
|
94
94
|
description: 'Smart plug',
|
|
95
95
|
fromZigbee: [fz.on_off, fz.metering],
|
|
96
96
|
toZigbee: [tz.on_off],
|
|
97
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
97
98
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
98
99
|
const endpoint = device.getEndpoint(1);
|
|
99
100
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
100
101
|
await reporting.onOff(endpoint);
|
|
101
102
|
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
102
|
-
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2});
|
|
103
|
+
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2}); // divider 1000: 2W
|
|
104
|
+
await reporting.currentSummDelivered(endpoint, {min: 5, max: constants.repInterval.MINUTES_5,
|
|
105
|
+
change: [10, 10]}); // divider 1000: 0,01kWh
|
|
103
106
|
},
|
|
104
|
-
exposes: [e.switch(), e.power(), e.energy()],
|
|
105
107
|
},
|
|
106
108
|
{
|
|
107
109
|
zigbeeModel: ['WSP404'],
|
|
@@ -110,14 +112,16 @@ module.exports = [
|
|
|
110
112
|
description: 'Smart plug',
|
|
111
113
|
fromZigbee: [fz.on_off, fz.metering],
|
|
112
114
|
toZigbee: [tz.on_off],
|
|
115
|
+
exposes: [e.switch(), e.power(), e.energy()],
|
|
113
116
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
114
117
|
const endpoint = device.getEndpoint(1);
|
|
115
118
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'seMetering']);
|
|
116
119
|
await reporting.onOff(endpoint);
|
|
117
120
|
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
118
|
-
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2});
|
|
121
|
+
await reporting.instantaneousDemand(endpoint, {min: 5, max: constants.repInterval.MINUTES_5, change: 2}); // divider 1000: 2W
|
|
122
|
+
await reporting.currentSummDelivered(endpoint, {min: 5, max: constants.repInterval.MINUTES_5,
|
|
123
|
+
change: [10, 10]}); // divider 1000: 0,01kWh
|
|
119
124
|
},
|
|
120
|
-
exposes: [e.switch(), e.power(), e.energy()],
|
|
121
125
|
},
|
|
122
126
|
{
|
|
123
127
|
zigbeeModel: ['CB432'],
|
package/devices/philips.js
CHANGED
|
@@ -617,7 +617,7 @@ module.exports = [
|
|
|
617
617
|
model: '8718699688820',
|
|
618
618
|
vendor: 'Philips',
|
|
619
619
|
description: 'Hue Filament Standard A60/E27 bluetooth',
|
|
620
|
-
extend: philips.extend.light_onoff_brightness(),
|
|
620
|
+
extend: philips.extend.light_onoff_brightness({disableHueEffects: false}),
|
|
621
621
|
},
|
|
622
622
|
{
|
|
623
623
|
zigbeeModel: ['LWA021'],
|
package/devices/sonoff.js
CHANGED
|
@@ -9,16 +9,6 @@ const ea = exposes.access;
|
|
|
9
9
|
const ota = require('../lib/ota');
|
|
10
10
|
|
|
11
11
|
const fzLocal = {
|
|
12
|
-
// SNZB-02 reports stranges values sometimes
|
|
13
|
-
// https://github.com/Koenkk/zigbee2mqtt/issues/13640
|
|
14
|
-
SNZB02_temperature: {
|
|
15
|
-
...fz.temperature,
|
|
16
|
-
convert: (model, msg, publish, options, meta) => {
|
|
17
|
-
if (msg.data.measuredValue > -10000 && msg.data.measuredValue < 10000) {
|
|
18
|
-
return fz.temperature.convert(model, msg, publish, options, meta);
|
|
19
|
-
}
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
12
|
router_config: {
|
|
23
13
|
cluster: 'genLevelCtrl',
|
|
24
14
|
type: ['attributeReport', 'readResponse'],
|
|
@@ -157,7 +147,7 @@ module.exports = [
|
|
|
157
147
|
whiteLabel: [{vendor: 'eWeLink', model: 'RHK08'}],
|
|
158
148
|
description: 'Temperature and humidity sensor',
|
|
159
149
|
exposes: [e.battery(), e.temperature(), e.humidity(), e.battery_voltage()],
|
|
160
|
-
fromZigbee: [
|
|
150
|
+
fromZigbee: [fz.SNZB02_temperature, fz.humidity, fz.battery],
|
|
161
151
|
toZigbee: [],
|
|
162
152
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
163
153
|
try {
|
package/devices/tuya.js
CHANGED
|
@@ -797,7 +797,8 @@ module.exports = [
|
|
|
797
797
|
{
|
|
798
798
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_bq5c8xfe'},
|
|
799
799
|
{modelID: 'TS0601', manufacturerName: '_TZE200_bjawzodf'},
|
|
800
|
-
{modelID: 'TS0601', manufacturerName: '_TZE200_qyflbnbj'}
|
|
800
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_qyflbnbj'},
|
|
801
|
+
{modelID: 'TS0601', manufacturerName: '_TZE200_zl1kmjqx'}],
|
|
801
802
|
model: 'TS0601_temperature_humidity_sensor',
|
|
802
803
|
vendor: 'TuYa',
|
|
803
804
|
description: 'Temperature & humidity sensor',
|
|
@@ -1111,7 +1112,9 @@ module.exports = [
|
|
|
1111
1112
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_kmh5qpmb'},
|
|
1112
1113
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_hgu1dlak'},
|
|
1113
1114
|
{modelID: 'TS0202', manufacturerName: '_TZ3000_h4wnrtck'},
|
|
1114
|
-
{modelID: '
|
|
1115
|
+
{modelID: 'TS0202', manufacturerName: '_TZ3000_sr0vaafi'},
|
|
1116
|
+
{modelID: 'WHD02', manufacturerName: '_TZ3000_hktqahrq'},
|
|
1117
|
+
],
|
|
1115
1118
|
model: 'TS0202',
|
|
1116
1119
|
vendor: 'TuYa',
|
|
1117
1120
|
description: 'Motion sensor',
|
|
@@ -1126,6 +1129,7 @@ module.exports = [
|
|
|
1126
1129
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg']);
|
|
1127
1130
|
try {
|
|
1128
1131
|
await reporting.batteryPercentageRemaining(endpoint);
|
|
1132
|
+
await reporting.batteryVoltage(endpoint);
|
|
1129
1133
|
} catch (error) {/* Fails for some https://github.com/Koenkk/zigbee2mqtt/issues/13708*/}
|
|
1130
1134
|
},
|
|
1131
1135
|
},
|
|
@@ -2994,7 +2998,8 @@ module.exports = [
|
|
|
2994
2998
|
vendor: 'TuYa',
|
|
2995
2999
|
description: '1 gang switch module - (without neutral)',
|
|
2996
3000
|
extend: tuya.extend.switch({switchType: true}),
|
|
2997
|
-
whiteLabel: [{vendor: 'AVATTO', model: '1gang N-ZLWSM01'}, {vendor: 'SMATRUL', model: 'TMZ02L-16A-W'}
|
|
3001
|
+
whiteLabel: [{vendor: 'AVATTO', model: '1gang N-ZLWSM01'}, {vendor: 'SMATRUL', model: 'TMZ02L-16A-W'},
|
|
3002
|
+
{vendor: 'Aubess', model: 'TMZ02L-16A-B'}],
|
|
2998
3003
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
2999
3004
|
await tuya.configureMagicPacket(device, coordinatorEndpoint, logger);
|
|
3000
3005
|
await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ['genOnOff']);
|
package/devices/yale.js
CHANGED
|
@@ -150,6 +150,34 @@ module.exports = [
|
|
|
150
150
|
description: 'Assure lock SL',
|
|
151
151
|
extend: lockExtend(),
|
|
152
152
|
},
|
|
153
|
+
{
|
|
154
|
+
zigbeeModel: ['YRD410 TS'],
|
|
155
|
+
model: 'YRD410-BLE',
|
|
156
|
+
vendor: 'Yale',
|
|
157
|
+
description: 'Assure lock 2',
|
|
158
|
+
extend: lockExtend(),
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
zigbeeModel: ['YRD420 TS'],
|
|
162
|
+
model: 'YRD420-BLE',
|
|
163
|
+
vendor: 'Yale',
|
|
164
|
+
description: 'Assure lock 2',
|
|
165
|
+
extend: lockExtend(),
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
zigbeeModel: ['YRD430 TS'],
|
|
169
|
+
model: 'YRD430-BLE',
|
|
170
|
+
vendor: 'Yale',
|
|
171
|
+
description: 'Assure lock 2',
|
|
172
|
+
extend: lockExtend(),
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
zigbeeModel: ['YRD450 TS'],
|
|
176
|
+
model: 'YRD450-BLE',
|
|
177
|
+
vendor: 'Yale',
|
|
178
|
+
description: 'Assure lock 2',
|
|
179
|
+
extend: lockExtend(),
|
|
180
|
+
},
|
|
153
181
|
{
|
|
154
182
|
// Appears to be a slightly rebranded Assure lock SL
|
|
155
183
|
// Just with Lockwood | Assa Abloy branding instead of Yale
|