-
Notifications
You must be signed in to change notification settings - Fork 2.8k
/
schneider_electric.js
245 lines (244 loc) · 13.4 KB
/
schneider_electric.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
const exposes = require('../lib/exposes');
const fz = {...require('../converters/fromZigbee'), legacy: require('../lib/legacy').fromZigbee};
const tz = require('../converters/toZigbee');
const constants = require('../lib/constants');
const reporting = require('../lib/reporting');
const extend = require('../lib/extend');
const e = exposes.presets;
const ea = exposes.access;
module.exports = [
{
zigbeeModel: ['iTRV'],
model: 'WV704R0A0902',
vendor: 'Schneider Electric',
description: 'Wiser radiator thermostat',
fromZigbee: [fz.ignore_basic_report, fz.ignore_haDiagnostic, fz.ignore_genOta, fz.ignore_zclversion_read,
fz.legacy.wiser_thermostat, fz.legacy.wiser_itrv_battery, fz.hvac_user_interface, fz.wiser_device_info],
toZigbee: [tz.thermostat_occupied_heating_setpoint, tz.thermostat_keypad_lockout],
exposes: [exposes.climate().withSetpoint('occupied_heating_setpoint', 7, 30, 1).withLocalTemperature(ea.STATE)
.withSystemMode(['off', 'auto', 'heat'], ea.STATE).withRunningState(['idle', 'heat'], ea.STATE).withPiHeatingDemand()],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
const binds = ['genBasic', 'genPowerCfg', 'hvacThermostat', 'haDiagnostic'];
await reporting.bind(endpoint, coordinatorEndpoint, binds);
await reporting.batteryVoltage(endpoint);
await reporting.thermostatTemperature(endpoint, {min: 0, max: constants.repInterval.MINUTES_15, change: 25});
await reporting.thermostatOccupiedHeatingSetpoint(endpoint, {min: 0, max: constants.repInterval.MINUTES_15, change: 25});
await reporting.thermostatPIHeatingDemand(endpoint, {min: 0, max: constants.repInterval.MINUTES_15, change: 1});
// bind of hvacUserInterfaceCfg fails with 'Table Full', does this have any effect?
await endpoint.configureReporting('hvacUserInterfaceCfg', [{attribute: 'keypadLockout', reportableChange: 1,
minimumReportInterval: constants.repInterval.MINUTE, maximumReportInterval: constants.repInterval.HOUR}]);
},
},
{
zigbeeModel: ['U202DST600ZB'],
model: 'U202DST600ZB',
vendor: 'Schneider Electric',
description: 'EZinstall3 2 gang 2x300W dimmer module',
extend: extend.light_onoff_brightness({noConfigure: true}),
exposes: [e.light_brightness().withEndpoint('l1'), e.light_brightness().withEndpoint('l2')],
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint1 = device.getEndpoint(10);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint1);
await reporting.brightness(endpoint1);
const endpoint2 = device.getEndpoint(11);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint2);
await reporting.brightness(endpoint2);
},
endpoint: (device) => {
return {l1: 10, l2: 11};
},
},
{
zigbeeModel: ['PUCK/DIMMER/1'],
model: 'CCT5010-0001',
vendor: 'Schneider Electric',
description: 'Micro module dimmer',
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.lighting_ballast_configuration],
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
exposes: [e.light_brightness().withLevelConfig(),
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
.withDescription('Specifies the minimum light output of the ballast'),
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
.withDescription('Specifies the maximum light output of the ballast')],
whiteLabel: [{vendor: 'Elko', model: 'EKO07090'}],
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(3);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
await reporting.onOff(endpoint);
await reporting.brightness(endpoint);
},
},
{
zigbeeModel: ['PUCK/SWITCH/1'],
model: 'CCT5011-0001/MEG5011-0001',
vendor: 'Schneider Electric',
description: 'Micro module switch',
extend: extend.switch(),
whiteLabel: [{vendor: 'Elko', model: 'EKO07144'}],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['NHROTARY/DIMMER/1'],
model: 'WDE002334',
vendor: 'Schneider Electric',
description: 'Rotary dimmer',
fromZigbee: [fz.on_off, fz.brightness, fz.level_config, fz.lighting_ballast_configuration],
toZigbee: [tz.light_onoff_brightness, tz.level_config, tz.ballast_config],
exposes: [e.light_brightness().withLevelConfig(),
exposes.numeric('ballast_minimum_level', ea.ALL).withValueMin(1).withValueMax(254)
.withDescription('Specifies the minimum light output of the ballast'),
exposes.numeric('ballast_maximum_level', ea.ALL).withValueMin(1).withValueMax(254)
.withDescription('Specifies the maximum light output of the ballast')],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(3);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'lightingBallastCfg']);
await reporting.onOff(endpoint);
await reporting.brightness(endpoint);
},
},
{
zigbeeModel: ['U201DST600ZB'],
model: 'U201DST600ZB',
vendor: 'Schneider Electric',
description: 'EZinstall3 1 gang 550W dimmer module',
extend: extend.light_onoff_brightness({noConfigure: true}),
configure: async (device, coordinatorEndpoint, logger) => {
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
const endpoint = device.getEndpoint(10);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
await reporting.onOff(endpoint);
await reporting.brightness(endpoint);
},
},
{
zigbeeModel: ['U201SRY2KWZB'],
model: 'U201SRY2KWZB',
vendor: 'Schneider Electric',
description: 'Ulti 240V 9.1 A 1 gang relay switch impress switch module, amber LED',
extend: extend.switch(),
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(10);
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint);
},
},
{
zigbeeModel: ['U202SRY2KWZB'],
model: 'U202SRY2KWZB',
vendor: 'Schneider Electric',
description: 'Ulti 240V 9.1 A 2 gangs relay switch impress switch module, amber LED',
extend: extend.switch(),
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2')],
meta: {multiEndpoint: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(10);
await reporting.bind(endpoint1, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint1);
const endpoint2 = device.getEndpoint(11);
await reporting.bind(endpoint2, coordinatorEndpoint, ['genOnOff']);
await reporting.onOff(endpoint2);
},
endpoint: (device) => {
return {l1: 10, l2: 11};
},
},
{
zigbeeModel: ['1GANG/SHUTTER/1'],
model: 'MEG5113-0300/MEG5165-0000',
vendor: 'Schneider Electric',
description: 'Merten PlusLink Shutter insert with Merten Wiser System M Push Button',
fromZigbee: [fz.cover_position_tilt, fz.command_cover_close, fz.command_cover_open, fz.command_cover_stop],
toZigbee: [tz.cover_position_tilt, tz.cover_state],
exposes: [e.cover_position()],
meta: {coverInverted: true},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint = device.getEndpoint(1) || device.getEndpoint(5);
await reporting.bind(endpoint, coordinatorEndpoint, ['closuresWindowCovering']);
await reporting.currentPositionLiftPercentage(endpoint);
},
},
{
zigbeeModel: ['LK Switch'],
model: '545D6514',
vendor: 'Schneider Electric',
description: 'LK FUGA wiser wireless double relay',
meta: {multiEndpoint: true},
fromZigbee: [fz.on_off, fz.command_on, fz.command_off],
toZigbee: [tz.on_off],
endpoint: (device) => {
return {'l1': 1, 'l2': 2, 's1': 21, 's2': 22, 's3': 23, 's4': 24};
},
exposes: [e.switch().withEndpoint('l1'), e.switch().withEndpoint('l2'), e.action(['on_s*', 'off_s*'])],
configure: async (device, coordinatorEndpoint, logger) => {
device.endpoints.forEach(async (ep) => {
if (ep.outputClusters.includes(6)) {
await reporting.bind(ep, coordinatorEndpoint, ['genOnOff']);
if (ep.ID <= 2) {
await reporting.onOff(ep);
}
}
});
},
},
{
fingerprint: [{modelID: 'CCTFR6700', manufacturerName: 'Schneider Electric'}],
model: 'CCTFR6700',
vendor: 'Schneider Electric',
description: 'Heating thermostat',
fromZigbee: [fz.thermostat, fz.metering, fz.schneider_pilot_mode],
toZigbee: [tz.schneider_temperature_measured_value, tz.thermostat_system_mode, tz.thermostat_running_state,
tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.thermostat_control_sequence_of_operation,
tz.schneider_pilot_mode, tz.schneider_temperature_measured_value],
exposes: [e.power(), e.energy(),
exposes.enum('schneider_pilot_mode', ea.ALL, ['contactor', 'pilot']).withDescription('Controls piloting mode'),
exposes.numeric('temperature_measured_value', ea.SET),
exposes.climate().withSetpoint('occupied_heating_setpoint', 4, 30, 0.5).withLocalTemperature()
.withSystemMode(['off', 'auto', 'heat']).withRunningState(['idle', 'heat']).withPiHeatingDemand()],
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
const endpoint2 = device.getEndpoint(2);
await reporting.bind(endpoint1, coordinatorEndpoint, ['hvacThermostat']);
await reporting.thermostatOccupiedHeatingSetpoint(endpoint1, {min: 0, max: 60, change: 1});
await reporting.thermostatPIHeatingDemand(endpoint1, {min: 0, max: 60, change: 1});
await reporting.bind(endpoint2, coordinatorEndpoint, ['seMetering']);
await reporting.instantaneousDemand(endpoint2, {min: 0, max: 60, change: 1});
await reporting.currentSummDelivered(endpoint2, {min: 0, max: 60, change: 1});
},
},
{
fingerprint: [{modelID: 'Thermostat', manufacturerName: 'Schneider Electric'}],
model: 'CCTFR6400',
vendor: 'Schneider Electric',
description: 'Temperature/Humidity measurement with thermostat interface',
fromZigbee: [fz.battery, fz.schneider_temperature, fz.humidity, fz.thermostat, fz.schneider_ui_action],
toZigbee: [tz.schneider_thermostat_system_mode, tz.schneider_thermostat_occupied_heating_setpoint,
tz.schneider_thermostat_control_sequence_of_operation, tz.schneider_thermostat_pi_heating_demand,
tz.schneider_thermostat_keypad_lockout],
exposes: [e.keypad_lockout().withAccess(ea.STATE_SET), e.humidity(), e.battery(), e.battery_voltage(),
e.action(['screen_sleep', 'screen_wake', 'button_press_plus_down', 'button_press_center_down', 'button_press_minus_down']),
exposes.climate().withSetpoint('occupied_heating_setpoint', 4, 30, 0.5, ea.SET).withLocalTemperature(ea.STATE)
.withPiHeatingDemand(ea.SET)],
meta: {battery: {dontDividePercentage: true}},
configure: async (device, coordinatorEndpoint, logger) => {
const endpoint1 = device.getEndpoint(1);
await reporting.bind(endpoint1, coordinatorEndpoint,
['genPowerCfg', 'hvacThermostat', 'msTemperatureMeasurement', 'msRelativeHumidity']);
await reporting.temperature(endpoint1);
await reporting.humidity(endpoint1);
await reporting.batteryPercentageRemaining(endpoint1);
endpoint1.saveClusterAttributeKeyValue('genBasic', {zclVersion: 3});
endpoint1.saveClusterAttributeKeyValue('hvacThermostat', {schneiderWiserSpecific: 1, systemMode: 4, ctrlSeqeOfOper: 2});
endpoint1.saveClusterAttributeKeyValue('hvacUserInterfaceCfg', {keypadLockout: 0});
},
},
];