zigbee-herdsman-converters 14.0.667 → 14.0.668
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 +16 -0
- package/converters/toZigbee.js +25 -14
- package/devices/awox.js +1 -1
- package/devices/eglo.js +7 -0
- package/devices/ikea.js +1 -1
- package/devices/legrand.js +22 -0
- package/devices/namron.js +1 -1
- package/devices/sinope.js +5 -4
- package/devices/sunricher.js +1 -1
- package/devices/tuya.js +50 -2
- package/devices/ubisys.js +3 -3
- package/lib/reporting.js +1 -1
- package/lib/tuya.js +23 -2
- package/package.json +1 -1
package/converters/fromZigbee.js
CHANGED
|
@@ -3476,6 +3476,22 @@ const converters = {
|
|
|
3476
3476
|
return result;
|
|
3477
3477
|
},
|
|
3478
3478
|
},
|
|
3479
|
+
sinope_thermostat: {
|
|
3480
|
+
cluster: 'hvacThermostat',
|
|
3481
|
+
type: ['readResponse'],
|
|
3482
|
+
convert: (model, msg, publish, options, meta) => {
|
|
3483
|
+
const lookup = {0: 'unoccupied', 1: 'occupied'};
|
|
3484
|
+
const lookup1 = {0: 'on_demand', 1: 'sensing'};
|
|
3485
|
+
const result = {};
|
|
3486
|
+
if (msg.data.hasOwnProperty('1024')) {
|
|
3487
|
+
result.thermostat_occupancy = lookup[msg.data['1024']];
|
|
3488
|
+
}
|
|
3489
|
+
if (msg.data.hasOwnProperty('1026')) {
|
|
3490
|
+
result.backlight_auto_dim = lookup1[msg.data['1026']];
|
|
3491
|
+
}
|
|
3492
|
+
return result;
|
|
3493
|
+
},
|
|
3494
|
+
},
|
|
3479
3495
|
danfoss_thermostat: {
|
|
3480
3496
|
cluster: 'hvacThermostat',
|
|
3481
3497
|
type: ['attributeReport', 'readResponse'],
|
package/converters/toZigbee.js
CHANGED
|
@@ -884,17 +884,28 @@ const converters = {
|
|
|
884
884
|
// TODO: same problem as above.
|
|
885
885
|
// TODO: if transition is not specified, should use device default (OnTransitionTime), not 0.
|
|
886
886
|
if (transition.specified || globalStore.getValue(entity, 'turnedOffWithTransition') === true) {
|
|
887
|
-
const
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
887
|
+
const levelConfig = utils.getObjectProperty(meta.state, 'level_config', {});
|
|
888
|
+
let onLevel = utils.getObjectProperty(levelConfig, 'on_level', 0);
|
|
889
|
+
if (onLevel === 0 && entity.meta.onLevelSupported !== false) {
|
|
890
|
+
try {
|
|
891
|
+
const attributeRead = await entity.read('genLevelCtrl', ['onLevel']);
|
|
892
|
+
if (attributeRead !== undefined) {
|
|
893
|
+
onLevel = attributeRead['onLevel'];
|
|
894
|
+
}
|
|
895
|
+
} catch (e) {
|
|
896
|
+
// OnLevel not supported
|
|
895
897
|
}
|
|
896
|
-
}
|
|
897
|
-
|
|
898
|
+
}
|
|
899
|
+
if (onLevel === 0) {
|
|
900
|
+
onLevel = 'previous';
|
|
901
|
+
entity.meta.onLevelSupported = false;
|
|
902
|
+
entity.save();
|
|
903
|
+
}
|
|
904
|
+
if (onLevel === 255 || onLevel === 'previous') {
|
|
905
|
+
const current = utils.getObjectProperty(meta.state, 'brightness', 254);
|
|
906
|
+
brightness = globalStore.getValue(entity, 'brightness', current);
|
|
907
|
+
} else {
|
|
908
|
+
brightness = onLevel;
|
|
898
909
|
}
|
|
899
910
|
// Published state might have gotten clobbered by reporting.
|
|
900
911
|
publishBrightness = true;
|
|
@@ -1394,6 +1405,7 @@ const converters = {
|
|
|
1394
1405
|
}
|
|
1395
1406
|
const unoccupiedCoolingSetpoint = result;
|
|
1396
1407
|
await entity.write('hvacThermostat', {unoccupiedCoolingSetpoint});
|
|
1408
|
+
return {state: {unoccupied_heating_setpoint: value}};
|
|
1397
1409
|
},
|
|
1398
1410
|
convertGet: async (entity, key, meta) => {
|
|
1399
1411
|
await entity.read('hvacThermostat', ['unoccupiedCoolingSetpoint']);
|
|
@@ -4286,17 +4298,16 @@ const converters = {
|
|
|
4286
4298
|
const sinopeOccupancy = {0: 'unoccupied', 1: 'occupied'};
|
|
4287
4299
|
const SinopeOccupancy = utils.getKey(sinopeOccupancy, value, value, Number);
|
|
4288
4300
|
await entity.write('hvacThermostat', {SinopeOccupancy});
|
|
4301
|
+
return {state: {'thermostat_occupancy': value}};
|
|
4289
4302
|
},
|
|
4290
4303
|
},
|
|
4291
4304
|
sinope_thermostat_backlight_autodim_param: {
|
|
4292
4305
|
key: ['backlight_auto_dim'],
|
|
4293
4306
|
convertSet: async (entity, key, value, meta) => {
|
|
4294
|
-
const sinopeBacklightParam = {
|
|
4295
|
-
0: 'on demand',
|
|
4296
|
-
1: 'sensing',
|
|
4297
|
-
};
|
|
4307
|
+
const sinopeBacklightParam = {0: 'on_demand', 1: 'sensing'};
|
|
4298
4308
|
const SinopeBacklight = utils.getKey(sinopeBacklightParam, value, value, Number);
|
|
4299
4309
|
await entity.write('hvacThermostat', {SinopeBacklight});
|
|
4310
|
+
return {state: {'backlight_auto_dim': value}};
|
|
4300
4311
|
},
|
|
4301
4312
|
},
|
|
4302
4313
|
sinope_thermostat_enable_outdoor_temperature: {
|
package/devices/awox.js
CHANGED
package/devices/eglo.js
CHANGED
|
@@ -8,4 +8,11 @@ module.exports = [
|
|
|
8
8
|
description: 'ROVITO-Z ceiling light',
|
|
9
9
|
extend: extend.light_onoff_brightness_colortemp_color({colorTempRange: [153, 370]}),
|
|
10
10
|
},
|
|
11
|
+
{
|
|
12
|
+
zigbeeModel: ['ESMLFzm_w6_TW'],
|
|
13
|
+
model: '12242',
|
|
14
|
+
vendor: 'EGLO',
|
|
15
|
+
description: 'ST64 adjustable white filament bulb',
|
|
16
|
+
extend: extend.light_onoff_brightness_colortemp({colorTempRange: [153, 454]}),
|
|
17
|
+
},
|
|
11
18
|
];
|
package/devices/ikea.js
CHANGED
|
@@ -1000,7 +1000,7 @@ module.exports = [
|
|
|
1000
1000
|
extend: tradfriExtend.light_onoff_brightness(),
|
|
1001
1001
|
},
|
|
1002
1002
|
{
|
|
1003
|
-
zigbeeModel: ['
|
|
1003
|
+
zigbeeModel: ['TRADFRIbulbPAR38WS900lm'],
|
|
1004
1004
|
model: 'LED2006R9',
|
|
1005
1005
|
vendor: 'IKEA',
|
|
1006
1006
|
description: 'TRADFRI E26 PAR38 LED bulb 900 lumen, dimmable, white spectrum, downlight',
|
package/devices/legrand.js
CHANGED
|
@@ -16,6 +16,28 @@ const readInitialBatteryState = async (type, data, device) => {
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
module.exports = [
|
|
19
|
+
{
|
|
20
|
+
zigbeeModel: [' Dry contact\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
21
|
+
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
|
22
|
+
model: '412173',
|
|
23
|
+
description: 'DIN dry contactor module',
|
|
24
|
+
vendor: 'Legrand',
|
|
25
|
+
extend: extend.switch(),
|
|
26
|
+
fromZigbee: [fz.identify, fz.on_off, fz.electrical_measurement, fz.legrand_cluster_fc01, fz.ignore_basic_report, fz.ignore_genOta],
|
|
27
|
+
toZigbee: [tz.legrand_deviceMode, tz.on_off, tz.legrand_identify, tz.electrical_measurement_power],
|
|
28
|
+
exposes: [exposes.switch().withState('state', true, 'On/off (works only if device is in "switch" mode)'),
|
|
29
|
+
e.power().withAccess(ea.STATE_GET), exposes.enum('device_mode', ea.ALL, ['switch', 'auto'])
|
|
30
|
+
.withDescription('switch: allow on/off, auto will use wired action via C1/C2 on contactor for example with HC/HP')],
|
|
31
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
32
|
+
const endpoint = device.getEndpoint(1);
|
|
33
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genIdentify', 'genOnOff', 'haElectricalMeasurement']);
|
|
34
|
+
await reporting.onOff(endpoint);
|
|
35
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
36
|
+
await reporting.activePower(endpoint);
|
|
37
|
+
// Read configuration values that are not sent periodically as well as current power (activePower).
|
|
38
|
+
await endpoint.read('haElectricalMeasurement', ['activePower', 0xf000, 0xf001, 0xf002]);
|
|
39
|
+
},
|
|
40
|
+
},
|
|
19
41
|
{
|
|
20
42
|
zigbeeModel: [' Contactor\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'+
|
|
21
43
|
'\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000'],
|
package/devices/namron.js
CHANGED
|
@@ -461,7 +461,7 @@ module.exports = [
|
|
|
461
461
|
await reporting.thermostatKeypadLockMode(endpoint);
|
|
462
462
|
|
|
463
463
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
464
|
-
attribute: '
|
|
464
|
+
attribute: 'occupancy',
|
|
465
465
|
minimumReportInterval: 0,
|
|
466
466
|
maximumReportInterval: constants.repInterval.HOUR,
|
|
467
467
|
reportableChange: null,
|
package/devices/sinope.js
CHANGED
|
@@ -15,20 +15,20 @@ module.exports = [
|
|
|
15
15
|
description: 'Zigbee line volt thermostat',
|
|
16
16
|
meta: {thermostat: {dontMapPIHeatingDemand: true}},
|
|
17
17
|
fromZigbee: [fz.legacy.sinope_thermostat_att_report, fz.legacy.hvac_user_interface, fz.electrical_measurement, fz.metering,
|
|
18
|
-
fz.ignore_temperature_report, fz.legacy.sinope_thermostat_state],
|
|
18
|
+
fz.ignore_temperature_report, fz.legacy.sinope_thermostat_state, fz.sinope_thermostat],
|
|
19
19
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
|
|
20
20
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state,
|
|
21
21
|
tz.sinope_thermostat_occupancy, tz.sinope_thermostat_backlight_autodim_param, tz.sinope_thermostat_time,
|
|
22
22
|
tz.sinope_thermostat_enable_outdoor_temperature, tz.sinope_thermostat_outdoor_temperature, tz.sinope_time_format],
|
|
23
23
|
exposes: [e.local_temperature(), e.keypad_lockout(), e.power(), e.current(), e.voltage(), e.energy(),
|
|
24
24
|
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
25
|
-
.withSystemMode(['off', 'heat']).withRunningState(['idle', 'heat']),
|
|
25
|
+
.withSystemMode(['off', 'heat']).withRunningState(['idle', 'heat']).withPiHeatingDemand(),
|
|
26
|
+
exposes.enum('thermostat_occupancy', ea.SET, ['unoccupied', 'occupied']).withDescription('Occupancy state of the thermostat'),
|
|
26
27
|
exposes.enum('backlight_auto_dim', ea.SET, ['on demand', 'sensing']).withDescription('Control backlight dimming behavior')],
|
|
27
28
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
28
29
|
const endpoint = device.getEndpoint(1);
|
|
29
30
|
const binds = ['genBasic', 'genIdentify', 'genGroups', 'hvacThermostat', 'hvacUserInterfaceCfg', 'msTemperatureMeasurement',
|
|
30
31
|
'haElectricalMeasurement', 'seMetering', 'manuSpecificSinope'];
|
|
31
|
-
|
|
32
32
|
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
33
33
|
await reporting.thermostatTemperature(endpoint);
|
|
34
34
|
await reporting.thermostatPIHeatingDemand(endpoint);
|
|
@@ -72,7 +72,7 @@ module.exports = [
|
|
|
72
72
|
description: 'Zigbee line volt thermostat',
|
|
73
73
|
meta: {thermostat: {dontMapPIHeatingDemand: true}},
|
|
74
74
|
fromZigbee: [fz.legacy.sinope_thermostat_att_report, fz.legacy.hvac_user_interface, fz.electrical_measurement, fz.metering,
|
|
75
|
-
fz.ignore_temperature_report, fz.legacy.sinope_thermostat_state],
|
|
75
|
+
fz.ignore_temperature_report, fz.legacy.sinope_thermostat_state, fz.sinope_thermostat],
|
|
76
76
|
toZigbee: [tz.thermostat_local_temperature, tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
|
|
77
77
|
tz.thermostat_temperature_display_mode, tz.thermostat_keypad_lockout, tz.thermostat_system_mode, tz.thermostat_running_state,
|
|
78
78
|
tz.sinope_thermostat_occupancy, tz.sinope_thermostat_backlight_autodim_param, tz.sinope_thermostat_time,
|
|
@@ -80,6 +80,7 @@ module.exports = [
|
|
|
80
80
|
exposes: [e.local_temperature(), e.keypad_lockout(), e.power(), e.current(), e.voltage(), e.energy(),
|
|
81
81
|
exposes.climate().withSetpoint('occupied_heating_setpoint', 5, 30, 0.5).withLocalTemperature()
|
|
82
82
|
.withSystemMode(['off', 'heat']).withRunningState(['idle', 'heat']).withPiHeatingDemand(),
|
|
83
|
+
exposes.enum('thermostat_occupancy', ea.SET, ['unoccupied', 'occupied']).withDescription('Occupancy state of the thermostat'),
|
|
83
84
|
exposes.enum('backlight_auto_dim', ea.SET, ['on demand', 'sensing']).withDescription('Control backlight dimming behavior')],
|
|
84
85
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
85
86
|
const endpoint = device.getEndpoint(1);
|
package/devices/sunricher.js
CHANGED
|
@@ -465,7 +465,7 @@ module.exports = [
|
|
|
465
465
|
await reporting.thermostatKeypadLockMode(endpoint);
|
|
466
466
|
|
|
467
467
|
await endpoint.configureReporting('hvacThermostat', [{
|
|
468
|
-
attribute: '
|
|
468
|
+
attribute: 'occupancy',
|
|
469
469
|
minimumReportInterval: 0,
|
|
470
470
|
maximumReportInterval: constants.repInterval.HOUR,
|
|
471
471
|
reportableChange: null,
|
package/devices/tuya.js
CHANGED
|
@@ -2510,7 +2510,7 @@ module.exports = [
|
|
|
2510
2510
|
onEvent: tuya.onEventsetTime,
|
|
2511
2511
|
},
|
|
2512
2512
|
{
|
|
2513
|
-
fingerprint: tuya.fingerprint('TS0601', ['
|
|
2513
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_bkkmqmyo', '_TZE200_eaac7dkw']),
|
|
2514
2514
|
model: 'TS0601_din_1',
|
|
2515
2515
|
vendor: 'TuYa',
|
|
2516
2516
|
description: 'Zigbee DIN energy meter',
|
|
@@ -2522,7 +2522,7 @@ module.exports = [
|
|
|
2522
2522
|
meta: {
|
|
2523
2523
|
tuyaDatapoints: [
|
|
2524
2524
|
[1, 'energy', tuya.valueConverter.divideBy100],
|
|
2525
|
-
[6, null, tuya.valueConverter.
|
|
2525
|
+
[6, null, tuya.valueConverter.phaseVariant1], // voltage and current
|
|
2526
2526
|
[16, 'state', tuya.valueConverter.onOff],
|
|
2527
2527
|
[102, 'produced_energy', tuya.valueConverter.divideBy100],
|
|
2528
2528
|
[103, 'power', tuya.valueConverter.raw],
|
|
@@ -2539,6 +2539,54 @@ module.exports = [
|
|
|
2539
2539
|
},
|
|
2540
2540
|
whiteLabel: [{vendor: 'Hiking', model: 'DDS238-2'}, {vendor: 'TuYa', model: 'RC-MCB'}],
|
|
2541
2541
|
},
|
|
2542
|
+
{
|
|
2543
|
+
fingerprint: tuya.fingerprint('TS0601', ['_TZE200_lsanae15']),
|
|
2544
|
+
model: 'TS0601_din_2',
|
|
2545
|
+
vendor: 'TuYa',
|
|
2546
|
+
description: 'Zigbee DIN energy meter',
|
|
2547
|
+
fromZigbee: [tuya.fzDataPoints],
|
|
2548
|
+
toZigbee: [tuya.tzDataPoints],
|
|
2549
|
+
configure: tuya.configureMagicPacket,
|
|
2550
|
+
whiteLabel: [{vendor: 'XOCA', model: 'DAC2161C'}],
|
|
2551
|
+
exposes: [tuya.exposes.switch(), e.energy(), e.power(), e.voltage(), e.current(),
|
|
2552
|
+
exposes.enum('fault', ea.STATE, ['clear', 'over_current_threshold', 'over_power_threshold',
|
|
2553
|
+
'over_voltage threshold', 'wrong_frequency_threshold']).withDescription('Fault status of the device (clear = nothing)'),
|
|
2554
|
+
exposes.enum('threshold_1', ea.STATE, ['not_set', 'over_current_threshold', 'over_voltage_threshold'])
|
|
2555
|
+
.withDescription('State of threshold_1'),
|
|
2556
|
+
exposes.binary('threshold_1_protection', ea.STATE, 'ON', 'OFF')
|
|
2557
|
+
.withDescription('OFF - alarm only, ON - relay will be off when threshold reached'),
|
|
2558
|
+
exposes.numeric('threshold_1_value', ea.STATE)
|
|
2559
|
+
.withDescription('Can be in Volt or Ampere depending on threshold setting. Setup the value on the device'),
|
|
2560
|
+
exposes.enum('threshold_2', ea.STATE, ['not_set', 'over_current_threshold', 'over_voltage_threshold'])
|
|
2561
|
+
.withDescription('State of threshold_2'),
|
|
2562
|
+
exposes.binary('threshold_2_protection', ea.STATE, 'ON', 'OFF')
|
|
2563
|
+
.withDescription('OFF - alarm only, ON - relay will be off when threshold reached'),
|
|
2564
|
+
exposes.numeric('threshold_2_value', ea.STATE)
|
|
2565
|
+
.withDescription('Setup value on the device'),
|
|
2566
|
+
exposes.binary('clear_fault', ea.STATE_SET, 'ON', 'OFF')
|
|
2567
|
+
.withDescription('Turn ON to clear last the fault'),
|
|
2568
|
+
exposes.text('meter_id', ea.STATE).withDescription('Meter ID (ID of device)'),
|
|
2569
|
+
],
|
|
2570
|
+
meta: {
|
|
2571
|
+
tuyaDatapoints: [
|
|
2572
|
+
[1, 'energy', tuya.valueConverter.divideBy100],
|
|
2573
|
+
[3, null, null], // Monthly, but sends data only after request
|
|
2574
|
+
[4, null, null], // Dayly, but sends data only after request
|
|
2575
|
+
[6, null, tuya.valueConverter.phaseVariant2], // voltage and current
|
|
2576
|
+
[10, 'fault', tuya.valueConverterBasic.lookup({'clear': 0, 'over_current_threshold': 1,
|
|
2577
|
+
'over_power_threshold': 2, 'over_voltage_threshold': 4, 'wrong_frequency_threshold': 8})],
|
|
2578
|
+
[11, null, null], // Frozen - strange function, in native app - nothing is clear
|
|
2579
|
+
[16, 'state', tuya.valueConverter.onOff],
|
|
2580
|
+
[17, null, tuya.valueConverter.threshold], // It's settable, but can't write converter
|
|
2581
|
+
[18, 'meter_id', tuya.valueConverter.raw],
|
|
2582
|
+
[20, 'clear_fault', tuya.valueConverter.onOff], // Clear fault
|
|
2583
|
+
[21, null, null], // Forward Energy T1 - don't know what this
|
|
2584
|
+
[22, null, null], // Forward Energy T2 - don't know what this
|
|
2585
|
+
[23, null, null], // Forward Energy T3 - don't know what this
|
|
2586
|
+
[24, null, null], // Forward Energy T4 - don't know what this
|
|
2587
|
+
],
|
|
2588
|
+
},
|
|
2589
|
+
},
|
|
2542
2590
|
{
|
|
2543
2591
|
fingerprint: [{modelID: 'TS0601', manufacturerName: '_TZE200_byzdayie'},
|
|
2544
2592
|
{modelID: 'TS0601', manufacturerName: '_TZE200_fsb6zw01'},
|
package/devices/ubisys.js
CHANGED
|
@@ -95,8 +95,8 @@ const ubisys = {
|
|
|
95
95
|
cluster: 'hvacThermostat',
|
|
96
96
|
type: ['attributeReport', 'readResponse'],
|
|
97
97
|
convert: (model, msg, publish, options, meta) => {
|
|
98
|
-
if (msg.data.hasOwnProperty('
|
|
99
|
-
return {vacation_mode: msg.data.
|
|
98
|
+
if (msg.data.hasOwnProperty('occupancy')) {
|
|
99
|
+
return {vacation_mode: msg.data.occupancy === 0};
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
},
|
|
@@ -516,7 +516,7 @@ const ubisys = {
|
|
|
516
516
|
thermostat_vacation_mode: {
|
|
517
517
|
key: ['vacation_mode'],
|
|
518
518
|
convertGet: async (entity, key, meta) => {
|
|
519
|
-
await entity.read('hvacThermostat', ['
|
|
519
|
+
await entity.read('hvacThermostat', ['occupancy']);
|
|
520
520
|
},
|
|
521
521
|
},
|
|
522
522
|
},
|
package/lib/reporting.js
CHANGED
|
@@ -179,7 +179,7 @@ module.exports = {
|
|
|
179
179
|
await endpoint.configureReporting('hvacThermostat', p);
|
|
180
180
|
},
|
|
181
181
|
thermostatOcupancy: async (endpoint, overrides) => {
|
|
182
|
-
const p = payload('
|
|
182
|
+
const p = payload('occupancy', 0, repInterval.HOUR, 0, overrides);
|
|
183
183
|
await endpoint.configureReporting('hvacThermostat', p);
|
|
184
184
|
},
|
|
185
185
|
thermostatTemperatureSetpointHold: async (endpoint, overrides) => {
|
package/lib/tuya.js
CHANGED
|
@@ -1257,12 +1257,33 @@ const valueConverter = {
|
|
|
1257
1257
|
divideBy100: valueConverterBasic.divideBy(100),
|
|
1258
1258
|
divideBy10: valueConverterBasic.divideBy(10),
|
|
1259
1259
|
raw: valueConverterBasic.raw(),
|
|
1260
|
-
|
|
1260
|
+
phaseVariant1: {
|
|
1261
1261
|
from: (v) => {
|
|
1262
1262
|
const buffer = Buffer.from(v, 'base64');
|
|
1263
1263
|
return {voltage: (buffer[14] | buffer[13] << 8) / 10, current: (buffer[12] | buffer[11] << 8) / 1000};
|
|
1264
1264
|
},
|
|
1265
1265
|
},
|
|
1266
|
+
phaseVariant2: {
|
|
1267
|
+
from: (v) => {
|
|
1268
|
+
const buf = Buffer.from(v, 'base64');
|
|
1269
|
+
return {voltage: (buf[1] | buf[0] << 8) / 10, current: (buf[4] | buf[3] << 8) / 1000, power: (buf[7] | buf[6] << 8)};
|
|
1270
|
+
},
|
|
1271
|
+
},
|
|
1272
|
+
threshold: {
|
|
1273
|
+
from: (v) => {
|
|
1274
|
+
const buffer = Buffer.from(v, 'base64');
|
|
1275
|
+
const stateLookup = {0: 'not_set', 1: 'over_current_threshold', 3: 'over_voltage_threshold'};
|
|
1276
|
+
const protectionLookup = {0: 'OFF', 1: 'ON'};
|
|
1277
|
+
return {
|
|
1278
|
+
threshold_1_protection: protectionLookup[buffer[1]],
|
|
1279
|
+
threshold_1: stateLookup[buffer[0]],
|
|
1280
|
+
threshold_1_value: (buffer[3] | buffer[2] << 8),
|
|
1281
|
+
threshold_2_protection: protectionLookup[buffer[5]],
|
|
1282
|
+
threshold_2: stateLookup[buffer[4]],
|
|
1283
|
+
threshold_2_value: (buffer[7] | buffer[6] << 8),
|
|
1284
|
+
};
|
|
1285
|
+
},
|
|
1286
|
+
},
|
|
1266
1287
|
true0ElseFalse: {from: (v) => v === 0},
|
|
1267
1288
|
selfTestResult: valueConverterBasic.lookup({'checking': 0, 'success': 1, 'failure': 2, 'others': 3}),
|
|
1268
1289
|
lockUnlock: valueConverterBasic.lookup({'LOCK': true, 'UNLOCK': false}),
|
|
@@ -1441,7 +1462,7 @@ const tzDataPoints = {
|
|
|
1441
1462
|
'system_mode', 'heating_stop', 'current_heating_setpoint', 'local_temperature_calibration', 'preset', 'boost_timeset_countdown',
|
|
1442
1463
|
'holiday_start_stop', 'holiday_temperature', 'comfort_temperature', 'eco_temperature', 'working_day', 'week_schedule_programming',
|
|
1443
1464
|
'online', 'holiday_mode_date', 'schedule', 'schedule_monday', 'schedule_tuesday', 'schedule_wednesday', 'schedule_thursday',
|
|
1444
|
-
'schedule_friday', 'schedule_saturday', 'schedule_sunday',
|
|
1465
|
+
'schedule_friday', 'schedule_saturday', 'schedule_sunday', 'clear_fault',
|
|
1445
1466
|
],
|
|
1446
1467
|
convertSet: async (entity, key, value, meta) => {
|
|
1447
1468
|
// A set converter is only called once; therefore we need to loop
|