zigbee-herdsman-converters 14.0.662 → 14.0.664
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/devices/ledvance.js +3 -0
- package/devices/leviton.js +25 -7
- package/devices/namron.js +3 -2
- package/devices/samotech.js +11 -0
- package/devices/sonoff.js +20 -0
- package/devices/stelpro.js +44 -0
- package/devices/tuya.js +1 -1
- package/devices/yookee.js +1 -0
- package/package.json +1 -1
package/devices/ledvance.js
CHANGED
|
@@ -21,6 +21,9 @@ module.exports = [
|
|
|
21
21
|
const endpoint = device.getEndpoint(1);
|
|
22
22
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
23
23
|
await reporting.onOff(endpoint);
|
|
24
|
+
// Has Unknown power source, force it here.
|
|
25
|
+
device.powerSource = 'Mains (single phase)';
|
|
26
|
+
device.save();
|
|
24
27
|
},
|
|
25
28
|
},
|
|
26
29
|
{
|
package/devices/leviton.js
CHANGED
|
@@ -3,9 +3,24 @@ const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/lega
|
|
|
3
3
|
const tz = require('../converters/toZigbee');
|
|
4
4
|
const reporting = require('../lib/reporting');
|
|
5
5
|
const extend = require('../lib/extend');
|
|
6
|
+
const utils = require('../lib/utils');
|
|
6
7
|
const e = exposes.presets;
|
|
7
8
|
const ea = exposes.access;
|
|
8
9
|
|
|
10
|
+
const fzLocal = {
|
|
11
|
+
on_off_via_brightness: {
|
|
12
|
+
cluster: 'genLevelCtrl',
|
|
13
|
+
type: ['attributeReport', 'readResponse'],
|
|
14
|
+
convert: (model, msg, publish, options, meta) => {
|
|
15
|
+
if (msg.data.hasOwnProperty('currentLevel')) {
|
|
16
|
+
const currentLevel = Number(msg.data['currentLevel']);
|
|
17
|
+
const property = utils.postfixWithEndpointName('state', msg, model, meta);
|
|
18
|
+
return {[property]: currentLevel > 0 ? 'ON' : 'OFF'};
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
9
24
|
module.exports = [
|
|
10
25
|
{
|
|
11
26
|
zigbeeModel: ['DL15S'],
|
|
@@ -91,21 +106,24 @@ module.exports = [
|
|
|
91
106
|
model: 'ZS057-D0Z',
|
|
92
107
|
vendor: 'Leviton',
|
|
93
108
|
description: 'Wall switch, 0-10V dimmer, 120-277V, Lumina™ RF',
|
|
109
|
+
meta: {disableDefaultResponse: true},
|
|
94
110
|
extend: extend.light_onoff_brightness({disableEffect: true, noConfigure: true}),
|
|
95
|
-
fromZigbee: [fz.
|
|
96
|
-
toZigbee: [tz.light_onoff_brightness, tz.ballast_config
|
|
111
|
+
fromZigbee: [fz.on_off, fzLocal.on_off_via_brightness, fz.lighting_ballast_configuration],
|
|
112
|
+
toZigbee: [tz.light_onoff_brightness, tz.ballast_config],
|
|
97
113
|
exposes: [e.light_brightness(),
|
|
114
|
+
// Note: ballast_power_on_level used to be here, but it does't appear to work properly with this device
|
|
115
|
+
// If set, it's reset back to 0 when the device is turned off then back to 32 when turned on
|
|
98
116
|
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
99
117
|
.withDescription('Specifies the minimum brightness value'),
|
|
100
118
|
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
101
|
-
.withDescription('Specifies the maximum brightness value'),
|
|
102
|
-
exposes.numeric('ballast_power_on_level', ea.ALL).withValueMin(1).withValueMax(254)
|
|
103
|
-
.withDescription('Specifies the initialisation light level. Can not be set lower than "ballast_minimum_level"')],
|
|
119
|
+
.withDescription('Specifies the maximum brightness value')],
|
|
104
120
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
105
|
-
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
106
121
|
const endpoint = device.getEndpoint(1);
|
|
107
122
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
|
|
108
|
-
|
|
123
|
+
// This device doesn't reliably report state changes - make it chatty to compensate for that
|
|
124
|
+
// This feels like a hack - hopefully there is a better fix at some point
|
|
125
|
+
await reporting.onOff(endpoint, {max: 5});
|
|
126
|
+
await reporting.brightness(endpoint, {max: 5});
|
|
109
127
|
},
|
|
110
128
|
},
|
|
111
129
|
];
|
package/devices/namron.js
CHANGED
|
@@ -5,6 +5,7 @@ const tz = require('../converters/toZigbee');
|
|
|
5
5
|
const constants = require('../lib/constants');
|
|
6
6
|
const reporting = require('../lib/reporting');
|
|
7
7
|
const globalStore = require('../lib/store');
|
|
8
|
+
const utils = require('../lib/utils');
|
|
8
9
|
const extend = require('../lib/extend');
|
|
9
10
|
const ea = exposes.access;
|
|
10
11
|
const e = exposes.presets;
|
|
@@ -34,7 +35,7 @@ const fzLocal = {
|
|
|
34
35
|
result.window_open_check = lookup[data[0x1009]];
|
|
35
36
|
}
|
|
36
37
|
if (data.hasOwnProperty(0x100A)) { // Hysterersis
|
|
37
|
-
result.hysterersis = data[0x100A];
|
|
38
|
+
result.hysterersis = utils.precisionRound(data[0x100A], 2) / 10;
|
|
38
39
|
}
|
|
39
40
|
return result;
|
|
40
41
|
},
|
|
@@ -64,7 +65,7 @@ const tzLocal = {
|
|
|
64
65
|
const payload = {0x1009: {value: lookup[value], type: herdsman.Zcl.DataType.enum8}};
|
|
65
66
|
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
66
67
|
} else if (key==='hysterersis') {
|
|
67
|
-
const payload = {0x100A: {value: value, type: 0x20}};
|
|
68
|
+
const payload = {0x100A: {value: value * 10, type: 0x20}};
|
|
68
69
|
await entity.write('hvacThermostat', payload, sunricherManufacturer);
|
|
69
70
|
}
|
|
70
71
|
},
|
package/devices/samotech.js
CHANGED
|
@@ -13,6 +13,17 @@ module.exports = [
|
|
|
13
13
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
|
+
{
|
|
17
|
+
zigbeeModel: ['SM308-S'],
|
|
18
|
+
model: 'SM308-S',
|
|
19
|
+
vendor: 'Samotech',
|
|
20
|
+
description: 'Zigbee in wall smart switch',
|
|
21
|
+
extend: extend.switch(),
|
|
22
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
23
|
+
const endpoint = device.getEndpoint(1);
|
|
24
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genBasic', 'genIdentify', 'genOnOff']);
|
|
25
|
+
},
|
|
26
|
+
},
|
|
16
27
|
{
|
|
17
28
|
zigbeeModel: ['SM309-S'],
|
|
18
29
|
model: 'SM309-S',
|
package/devices/sonoff.js
CHANGED
|
@@ -60,6 +60,26 @@ module.exports = [
|
|
|
60
60
|
device.save();
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
|
+
{
|
|
64
|
+
zigbeeModel: ['ZBMINIL2'],
|
|
65
|
+
model: 'ZBMINIL2',
|
|
66
|
+
vendor: 'SONOFF',
|
|
67
|
+
description: 'Zigbee smart switch (no neutral)',
|
|
68
|
+
ota: ota.zigbeeOTA,
|
|
69
|
+
extend: extend.switch(),
|
|
70
|
+
toZigbee: extend.switch().toZigbee.concat([tz.power_on_behavior]),
|
|
71
|
+
fromZigbee: extend.switch().fromZigbee.concat([fz.power_on_behavior]),
|
|
72
|
+
exposes: extend.switch().exposes.concat([e.power_on_behavior()]),
|
|
73
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
74
|
+
// Unbind genPollCtrl to prevent device from sending checkin message.
|
|
75
|
+
// Zigbee-herdsmans responds to the checkin message which causes the device
|
|
76
|
+
// to poll slower.
|
|
77
|
+
// https://github.com/Koenkk/zigbee2mqtt/issues/11676
|
|
78
|
+
await device.getEndpoint(1).unbind('genPollCtrl', coordinatorEndpoint);
|
|
79
|
+
device.powerSource = 'Mains (single phase)';
|
|
80
|
+
device.save();
|
|
81
|
+
},
|
|
82
|
+
},
|
|
63
83
|
{
|
|
64
84
|
zigbeeModel: ['01MINIZB'],
|
|
65
85
|
model: 'ZBMINI',
|
package/devices/stelpro.js
CHANGED
|
@@ -5,7 +5,51 @@ const reporting = require('../lib/reporting');
|
|
|
5
5
|
const e = exposes.presets;
|
|
6
6
|
const constants = require('../lib/constants');
|
|
7
7
|
|
|
8
|
+
const fzLocal = {
|
|
9
|
+
power: {
|
|
10
|
+
cluster: 'hvacThermostat',
|
|
11
|
+
type: ['attributeReport', 'readResponse'],
|
|
12
|
+
convert: (model, msg, publish, options, meta) => {
|
|
13
|
+
if (msg.data.hasOwnProperty('16392')) {
|
|
14
|
+
return {power: msg.data['16392']};
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
energy: {
|
|
19
|
+
cluster: 'hvacThermostat',
|
|
20
|
+
type: ['attributeReport', 'readResponse'],
|
|
21
|
+
convert: (model, msg, publish, options, meta) => {
|
|
22
|
+
if (msg.data.hasOwnProperty('16393')) {
|
|
23
|
+
return {energy: parseFloat(msg.data['16393']) / 1000};
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
8
29
|
module.exports = [
|
|
30
|
+
{
|
|
31
|
+
zigbeeModel: ['HT402'],
|
|
32
|
+
model: 'HT402',
|
|
33
|
+
vendor: 'Stelpro',
|
|
34
|
+
description: 'Hilo thermostat',
|
|
35
|
+
fromZigbee: [fz.stelpro_thermostat, fz.hvac_user_interface, fzLocal.power, fzLocal.energy],
|
|
36
|
+
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupancy, tz.thermostat_occupied_heating_setpoint,
|
|
37
|
+
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode,
|
|
38
|
+
tz.thermostat_running_state, tz.stelpro_thermostat_outdoor_temperature],
|
|
39
|
+
exposes: [e.local_temperature(), e.keypad_lockout(), e.power(), e.energy(),
|
|
40
|
+
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
41
|
+
.withSystemMode(['heat']).withRunningState(['idle', 'heat'])],
|
|
42
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
43
|
+
const endpoint = device.getEndpoint(25);
|
|
44
|
+
const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg', 'msTemperatureMeasurement'];
|
|
45
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
46
|
+
await reporting.thermostatTemperature(endpoint);
|
|
47
|
+
await reporting.thermostatOccupiedHeatingSetpoint(endpoint);
|
|
48
|
+
await reporting.thermostatSystemMode(endpoint);
|
|
49
|
+
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
50
|
+
await reporting.thermostatKeypadLockMode(endpoint);
|
|
51
|
+
},
|
|
52
|
+
},
|
|
9
53
|
{
|
|
10
54
|
zigbeeModel: ['ST218'],
|
|
11
55
|
model: 'ST218',
|
package/devices/tuya.js
CHANGED
|
@@ -3364,7 +3364,7 @@ module.exports = [
|
|
|
3364
3364
|
{modelID: 'TS0601', manufacturerName: '_TZE200_wukb7rhc'},
|
|
3365
3365
|
{modelID: 'TS0601', manufacturerName: '_TZE204_ztc6ggyl'},
|
|
3366
3366
|
{modelID: 'TS0601', manufacturerName: '_TZE200_ztc6ggyl'}],
|
|
3367
|
-
model: '
|
|
3367
|
+
model: 'TS0601_smart_human_presence_sensor',
|
|
3368
3368
|
vendor: 'TuYa',
|
|
3369
3369
|
description: 'Smart Human presence sensor',
|
|
3370
3370
|
fromZigbee: [fz.tuya_smart_human_presense_sensor],
|
package/devices/yookee.js
CHANGED
|
@@ -12,6 +12,7 @@ module.exports = [
|
|
|
12
12
|
description: 'Smart blind controller',
|
|
13
13
|
fromZigbee: [fz.D10110_cover_position_tilt, fz.battery],
|
|
14
14
|
toZigbee: [tz.cover_state, tz.cover_position_tilt],
|
|
15
|
+
meta: {coverInverted: true},
|
|
15
16
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
16
17
|
const endpoint = device.getEndpoint(1);
|
|
17
18
|
await reporting.bind(endpoint, coordinatorEndpoint, ['genPowerCfg', 'closuresWindowCovering']);
|