zigbee-herdsman-converters 15.0.29 → 15.0.30
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/bosch.js +20 -0
- package/devices/busch-jaeger.js +65 -35
- package/devices/danfoss.js +2 -1
- package/devices/hive.js +1 -1
- package/devices/ikea.js +8 -1
- package/devices/samotech.js +14 -3
- package/devices/schneider_electric.js +9 -0
- package/devices/sinope.js +38 -0
- package/devices/xiaomi.js +6 -6
- package/package.json +1 -1
package/devices/bosch.js
CHANGED
|
@@ -528,6 +528,26 @@ const definition = [
|
|
|
528
528
|
},
|
|
529
529
|
exposes: [e.switch(), e.power_on_behavior(), e.power(), e.energy()],
|
|
530
530
|
},
|
|
531
|
+
{
|
|
532
|
+
zigbeeModel: ['RBSH-SP-ZB-FR'],
|
|
533
|
+
model: 'BSP-EZ2',
|
|
534
|
+
vendor: 'Bosch',
|
|
535
|
+
description: 'Plug compact FR',
|
|
536
|
+
fromZigbee: [fz.on_off, fz.power_on_behavior, fz.electrical_measurement, fz.metering],
|
|
537
|
+
toZigbee: [tz.on_off, tz.power_on_behavior],
|
|
538
|
+
configure: async (device, coordinatorEndpoint, logger) => {
|
|
539
|
+
const endpoint = device.getEndpoint(1);
|
|
540
|
+
await endpoint.read('genOnOff', ['onOff', 'startUpOnOff']);
|
|
541
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff']);
|
|
542
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['seMetering']);
|
|
543
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
544
|
+
await reporting.currentSummDelivered(endpoint, {change: [0, 1]});
|
|
545
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['haElectricalMeasurement']);
|
|
546
|
+
await endpoint.read('haElectricalMeasurement', ['acPowerMultiplier', 'acPowerDivisor']);
|
|
547
|
+
await reporting.activePower(endpoint);
|
|
548
|
+
},
|
|
549
|
+
exposes: [e.switch(), e.power_on_behavior(), e.power(), e.energy()],
|
|
550
|
+
},
|
|
531
551
|
];
|
|
532
552
|
|
|
533
553
|
module.exports = definition;
|
package/devices/busch-jaeger.js
CHANGED
|
@@ -15,9 +15,13 @@ module.exports = [
|
|
|
15
15
|
extend: extend.switch(),
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
|
-
// Busch-Jaeger 6735, 6736
|
|
19
|
-
// 6711 U (Relay) back-ends.
|
|
20
|
-
//
|
|
18
|
+
// Busch-Jaeger 6735, 6736 and 6737 have been tested with the 6710 U (Power Adapter),
|
|
19
|
+
// 6711 U (Relay) and 6715 U (dimmer) back-ends. Unfortunately both the relay and the dimmer
|
|
20
|
+
// report as model 'RM01' with genLevelCtrl clusters, so we need to set up both of them
|
|
21
|
+
// as dimmable lights.
|
|
22
|
+
//
|
|
23
|
+
// The battery-powered version of the device ('RB01') is supported as well. These devices are
|
|
24
|
+
// sold as Busch-Jaeger 6735/01, 6736/01 and 6737/01.
|
|
21
25
|
//
|
|
22
26
|
// In order to manually capture scenes as described in the devices manual, the endpoint
|
|
23
27
|
// corresponding to the row needs to be unbound (https://www.zigbee2mqtt.io/information/binding.html)
|
|
@@ -26,59 +30,85 @@ module.exports = [
|
|
|
26
30
|
zigbeeModel: ['RM01', 'RB01'],
|
|
27
31
|
model: '6735/6736/6737',
|
|
28
32
|
vendor: 'Busch-Jaeger',
|
|
29
|
-
description: 'Zigbee Light Link power supply/relay/dimmer',
|
|
33
|
+
description: 'Zigbee Light Link power supply/relay/dimmer/wall-switch',
|
|
30
34
|
endpoint: (device) => {
|
|
31
35
|
return {'row_1': 0x0a, 'row_2': 0x0b, 'row_3': 0x0c, 'row_4': 0x0d, 'relay': 0x12};
|
|
32
36
|
},
|
|
33
|
-
exposes:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
exposes: (device, options) => {
|
|
38
|
+
const expose = [];
|
|
39
|
+
|
|
40
|
+
// If endpoint 0x12 (18) is present this means the following two things:
|
|
41
|
+
// 1. The device is connected to a relay or dimmer and needs to be exposed as a dimmable light
|
|
42
|
+
// 2. The top rocker will not be usable (not emit any events) as it's hardwired to the relay/dimmer
|
|
43
|
+
if (!device || device.getEndpoint(0x12) != null) {
|
|
44
|
+
expose.push(e.light_brightness().withEndpoint('relay'));
|
|
45
|
+
// Exposing the device as a switch without endpoint is actually wrong, but this is the historic
|
|
46
|
+
// definition and we are keeping it for compatibility reasons.
|
|
47
|
+
// DEPRECATED and should be removed in the future
|
|
48
|
+
expose.push(e.switch());
|
|
49
|
+
}
|
|
50
|
+
// Not all devices support all actions (depends on number of rocker rows and if relay/dimmer is installed),
|
|
51
|
+
// but defining all possible actions here won't do any harm.
|
|
52
|
+
expose.push(e.action([
|
|
53
|
+
'row_1_on', 'row_1_off', 'row_1_up', 'row_1_down', 'row_1_stop',
|
|
54
|
+
'row_2_on', 'row_2_off', 'row_2_up', 'row_2_down', 'row_2_stop',
|
|
55
|
+
'row_3_on', 'row_3_off', 'row_3_up', 'row_3_down', 'row_3_stop',
|
|
56
|
+
'row_4_on', 'row_4_off', 'row_4_up', 'row_4_down', 'row_4_stop',
|
|
57
|
+
]));
|
|
58
|
+
expose.push(e.linkquality());
|
|
59
|
+
|
|
60
|
+
return expose;
|
|
61
|
+
},
|
|
37
62
|
meta: {multiEndpoint: true},
|
|
38
63
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
64
|
+
// Depending on the actual devices - 6735, 6736, or 6737 - there are 1, 2, or 4 endpoints for
|
|
65
|
+
// the rockers. If the module is installed on a dimmer or relay, there is an additional endpoint (18).
|
|
66
|
+
const endpoint18 = device.getEndpoint(0x12);
|
|
67
|
+
if (endpoint18 != null) {
|
|
68
|
+
await reporting.bind(endpoint18, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
69
|
+
} else {
|
|
70
|
+
// We only need to bind endpoint 10 (top rocker) if endoint 18 (relay/dimmer) is not present.
|
|
71
|
+
// Otherwise the top rocker is hard-wired to the relay/dimmer and cannot be used anyways.
|
|
72
|
+
const endpoint10 = device.getEndpoint(0x0a);
|
|
73
|
+
if (endpoint10 != null) {
|
|
74
|
+
await reporting.bind(endpoint10, coordinatorEndpoint, ['genLevelCtrl']);
|
|
75
|
+
}
|
|
45
76
|
}
|
|
46
|
-
|
|
47
|
-
//
|
|
77
|
+
|
|
78
|
+
// The total number of bindings seems to be severely limited with some of these devices.
|
|
79
|
+
// In order to be able to toggle groups, we need to remove the scenes cluster from RM01.
|
|
80
|
+
const dropScenesCluster = device.modelID == 'RM01';
|
|
81
|
+
|
|
48
82
|
const endpoint11 = device.getEndpoint(0x0b);
|
|
49
83
|
if (endpoint11 != null) {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
84
|
+
if (dropScenesCluster) {
|
|
85
|
+
const index = endpoint11.outputClusters.indexOf(5);
|
|
86
|
+
if (index > -1) {
|
|
87
|
+
endpoint11.outputClusters.splice(index, 1);
|
|
88
|
+
}
|
|
55
89
|
}
|
|
56
90
|
await reporting.bind(endpoint11, coordinatorEndpoint, ['genLevelCtrl']);
|
|
57
91
|
}
|
|
58
92
|
const endpoint12 = device.getEndpoint(0x0c);
|
|
59
93
|
if (endpoint12 != null) {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
94
|
+
if (dropScenesCluster) {
|
|
95
|
+
const index = endpoint12.outputClusters.indexOf(5);
|
|
96
|
+
if (index > -1) {
|
|
97
|
+
endpoint12.outputClusters.splice(index, 1);
|
|
98
|
+
}
|
|
65
99
|
}
|
|
66
100
|
await reporting.bind(endpoint12, coordinatorEndpoint, ['genLevelCtrl']);
|
|
67
101
|
}
|
|
68
102
|
const endpoint13 = device.getEndpoint(0x0d);
|
|
69
103
|
if (endpoint13 != null) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
104
|
+
if (dropScenesCluster) {
|
|
105
|
+
const index = endpoint13.outputClusters.indexOf(5);
|
|
106
|
+
if (index > -1) {
|
|
107
|
+
endpoint13.outputClusters.splice(index, 1);
|
|
108
|
+
}
|
|
75
109
|
}
|
|
76
110
|
await reporting.bind(endpoint13, coordinatorEndpoint, ['genLevelCtrl']);
|
|
77
111
|
}
|
|
78
|
-
const endpoint18 = device.getEndpoint(0x12);
|
|
79
|
-
if (endpoint18 != null) {
|
|
80
|
-
await reporting.bind(endpoint18, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
81
|
-
}
|
|
82
112
|
},
|
|
83
113
|
fromZigbee: [fz.ignore_basic_report, fz.on_off, fz.brightness, fz.legacy.RM01_on_click, fz.legacy.RM01_off_click,
|
|
84
114
|
fz.legacy.RM01_up_hold, fz.legacy.RM01_down_hold, fz.legacy.RM01_stop],
|
package/devices/danfoss.js
CHANGED
|
@@ -80,7 +80,8 @@ module.exports = [
|
|
|
80
80
|
'has no (noticable?) effect.'),
|
|
81
81
|
exposes.binary('window_open_feature', ea.ALL, true, false)
|
|
82
82
|
.withDescription('Whether or not the window open feature is enabled'),
|
|
83
|
-
exposes.
|
|
83
|
+
exposes.enum('window_open_internal', ea.STATE_GET,
|
|
84
|
+
['quarantine', 'closed', 'hold', 'open', 'external_open'])
|
|
84
85
|
.withDescription('0=Quarantine, 1=Windows are closed, 2=Hold - Windows are maybe about to open, ' +
|
|
85
86
|
'3=Open window detected, 4=In window open state from external but detected closed locally'),
|
|
86
87
|
exposes.binary('window_open_external', ea.ALL, true, false)
|
package/devices/hive.js
CHANGED
|
@@ -158,7 +158,7 @@ module.exports = [
|
|
|
158
158
|
},
|
|
159
159
|
},
|
|
160
160
|
extendDevice(require('./danfoss'), '014G2461', {
|
|
161
|
-
zigbeeModel: ['TRV001'],
|
|
161
|
+
zigbeeModel: ['TRV001', 'TRV003'],
|
|
162
162
|
model: 'UK7004240',
|
|
163
163
|
vendor: 'Hive',
|
|
164
164
|
description: 'Radiator valve based on Danfoss Ally (014G2461)',
|
package/devices/ikea.js
CHANGED
|
@@ -556,7 +556,14 @@ module.exports = [
|
|
|
556
556
|
model: 'ICPSHC24-30-IL44-1',
|
|
557
557
|
vendor: 'IKEA',
|
|
558
558
|
description: 'SILVERGLANS IP44 LED driver for wireless control (30 watt)',
|
|
559
|
-
|
|
559
|
+
extend: tradfriExtend.light_onoff_brightness(),
|
|
560
|
+
meta: {turnsOffAtBrightness1: true},
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
zigbeeModel: ['Pendant lamp WW'],
|
|
564
|
+
model: 'T2030',
|
|
565
|
+
vendor: 'IKEA',
|
|
566
|
+
description: 'PILSKOTT LED pendant lamp',
|
|
560
567
|
extend: tradfriExtend.light_onoff_brightness(),
|
|
561
568
|
meta: {turnsOffAtBrightness1: true},
|
|
562
569
|
},
|
package/devices/samotech.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
const fz = require('../converters/fromZigbee');
|
|
2
|
+
const exposes = require('../lib/exposes');
|
|
1
3
|
const reporting = require('../lib/reporting');
|
|
2
4
|
const extend = require('../lib/extend');
|
|
5
|
+
const e = exposes.presets;
|
|
3
6
|
|
|
4
7
|
module.exports = [
|
|
5
8
|
{
|
|
@@ -28,14 +31,22 @@ module.exports = [
|
|
|
28
31
|
zigbeeModel: ['SM309-S'],
|
|
29
32
|
model: 'SM309-S',
|
|
30
33
|
vendor: 'Samotech',
|
|
31
|
-
description: 'Zigbee dimmer 400W',
|
|
32
|
-
|
|
34
|
+
description: 'Zigbee dimmer 400W with power and energy metering',
|
|
35
|
+
fromZigbee: extend.light_onoff_brightness().fromZigbee.concat([fz.electrical_measurement, fz.metering]),
|
|
36
|
+
toZigbee: extend.light_onoff_brightness().toZigbee,
|
|
33
37
|
configure: async (device, coordinatorEndpoint, logger) => {
|
|
34
38
|
await extend.light_onoff_brightness().configure(device, coordinatorEndpoint, logger);
|
|
35
39
|
const endpoint = device.getEndpoint(1);
|
|
36
|
-
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl']);
|
|
40
|
+
await reporting.bind(endpoint, coordinatorEndpoint, ['genOnOff', 'genLevelCtrl', 'haElectricalMeasurement', 'seMetering']);
|
|
41
|
+
await reporting.readEletricalMeasurementMultiplierDivisors(endpoint);
|
|
42
|
+
await reporting.readMeteringMultiplierDivisor(endpoint);
|
|
43
|
+
await reporting.rmsVoltage(endpoint, {min: 10, change: 20});
|
|
44
|
+
await reporting.rmsCurrent(endpoint, {min: 10, change: 10});
|
|
45
|
+
await reporting.activePower(endpoint, {min: 10, change: 15});
|
|
46
|
+
await reporting.currentSummDelivered(endpoint, {min: 300});
|
|
37
47
|
await reporting.onOff(endpoint);
|
|
38
48
|
},
|
|
49
|
+
exposes: extend.light_onoff_brightness().exposes.concat([e.power(), e.current(), e.voltage(), e.energy()]),
|
|
39
50
|
},
|
|
40
51
|
{
|
|
41
52
|
zigbeeModel: ['SM309'],
|
|
@@ -1006,4 +1006,13 @@ module.exports = [
|
|
|
1006
1006
|
await endpoint.read('genPowerCfg', ['batteryVoltage', 'batteryPercentageRemaining']);
|
|
1007
1007
|
},
|
|
1008
1008
|
},
|
|
1009
|
+
{
|
|
1010
|
+
zigbeeModel: ['CCT591011_AS'],
|
|
1011
|
+
model: 'CCT591011_AS',
|
|
1012
|
+
vendor: 'Schneider Electric',
|
|
1013
|
+
description: 'Wiser window/door sensor',
|
|
1014
|
+
fromZigbee: [fz.ias_contact_alarm_1, fz.ias_contact_alarm_1_report],
|
|
1015
|
+
toZigbee: [],
|
|
1016
|
+
exposes: [e.battery_low(), e.contact(), e.tamper()],
|
|
1017
|
+
},
|
|
1009
1018
|
];
|
package/devices/sinope.js
CHANGED
|
@@ -484,6 +484,12 @@ module.exports = [
|
|
|
484
484
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
485
485
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
486
486
|
.withDescription('Occupancy state of the thermostat'),
|
|
487
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
488
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
489
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
490
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
491
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
492
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
487
493
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
488
494
|
.withDescription('Control backlight dimming behavior'),
|
|
489
495
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -545,6 +551,12 @@ module.exports = [
|
|
|
545
551
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
546
552
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
547
553
|
.withDescription('Occupancy state of the thermostat'),
|
|
554
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
555
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
556
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
557
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
558
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
559
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
548
560
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
549
561
|
.withDescription('Control backlight dimming behavior'),
|
|
550
562
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -606,6 +618,12 @@ module.exports = [
|
|
|
606
618
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
607
619
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
608
620
|
.withDescription('Occupancy state of the thermostat'),
|
|
621
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
622
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
623
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
624
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
625
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
626
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
609
627
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
610
628
|
.withDescription('Control backlight dimming behavior'),
|
|
611
629
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -673,6 +691,12 @@ module.exports = [
|
|
|
673
691
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
674
692
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
675
693
|
.withDescription('Occupancy state of the thermostat'),
|
|
694
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
695
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
696
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
697
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
698
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
699
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
676
700
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
677
701
|
.withDescription('Control backlight dimming behavior'),
|
|
678
702
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -741,6 +765,12 @@ module.exports = [
|
|
|
741
765
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
742
766
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
743
767
|
.withDescription('Occupancy state of the thermostat'),
|
|
768
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
769
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
770
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
771
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
772
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
773
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
744
774
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
745
775
|
.withDescription('Control backlight dimming behavior'),
|
|
746
776
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -895,6 +925,12 @@ module.exports = [
|
|
|
895
925
|
.withRunningState(['idle', 'heat'], ea.STATE),
|
|
896
926
|
exposes.enum('thermostat_occupancy', ea.ALL, ['unoccupied', 'occupied'])
|
|
897
927
|
.withDescription('Occupancy state of the thermostat'),
|
|
928
|
+
exposes.binary('enable_outdoor_temperature', ea.ALL, 'ON', 'OFF')
|
|
929
|
+
.withDescription('Showing outdoor temperature on secondary display'),
|
|
930
|
+
exposes.enum('temperature_display_mode', ea.ALL, ['celsius', 'fahrenheit'])
|
|
931
|
+
.withDescription('The temperature format displayed on the thermostat screen'),
|
|
932
|
+
exposes.enum('time_format', ea.ALL, ['24h', '12h'])
|
|
933
|
+
.withDescription('The time format featured on the thermostat display'),
|
|
898
934
|
exposes.enum('backlight_auto_dim', ea.ALL, ['on_demand', 'sensing'])
|
|
899
935
|
.withDescription('Control backlight dimming behavior'),
|
|
900
936
|
exposes.enum('keypad_lockout', ea.ALL, ['unlock', 'lock1'])
|
|
@@ -997,6 +1033,7 @@ module.exports = [
|
|
|
997
1033
|
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 10 : 0.1W
|
|
998
1034
|
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 10}); // divider 100: 0.1Arms
|
|
999
1035
|
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 10}); // divider 100: 0.1Vrms
|
|
1036
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000, multiplier: 1});
|
|
1000
1037
|
await reporting.currentSummDelivered(endpoint, {min: 10, max: 303, change: [0, 1]}); // divider 1
|
|
1001
1038
|
},
|
|
1002
1039
|
},
|
|
@@ -1017,6 +1054,7 @@ module.exports = [
|
|
|
1017
1054
|
await reporting.activePower(endpoint, {min: 10, max: 305, change: 1}); // divider 10 : 0.1W
|
|
1018
1055
|
await reporting.rmsCurrent(endpoint, {min: 10, max: 306, change: 10}); // divider 100: 0.1Arms
|
|
1019
1056
|
await reporting.rmsVoltage(endpoint, {min: 10, max: 307, change: 10}); // divider 100: 0.1Vrms
|
|
1057
|
+
endpoint.saveClusterAttributeKeyValue('seMetering', {divisor: 1000, multiplier: 1});
|
|
1020
1058
|
await reporting.currentSummDelivered(endpoint, {min: 10, max: 303, change: [0, 1]}); // divider 1
|
|
1021
1059
|
},
|
|
1022
1060
|
},
|
package/devices/xiaomi.js
CHANGED
|
@@ -235,7 +235,7 @@ const fzLocal = {
|
|
|
235
235
|
type: ['attributeReport', 'readResponse'],
|
|
236
236
|
convert: (model, msg, publish, options, meta) => {
|
|
237
237
|
/**
|
|
238
|
-
* @type {{
|
|
238
|
+
* @type {{ action?: string; }}
|
|
239
239
|
*/
|
|
240
240
|
const payload = {};
|
|
241
241
|
const log = utils.createLogger(meta.logger, 'xiaomi', 'aqara_fp1');
|
|
@@ -251,7 +251,7 @@ const fzLocal = {
|
|
|
251
251
|
!(typeof value[0] === 'string' || typeof value[0] === 'number') ||
|
|
252
252
|
!(typeof value[1] === 'string' || typeof value[1] === 'number')
|
|
253
253
|
) {
|
|
254
|
-
log('warn', `
|
|
254
|
+
log('warn', `action: Unrecognized payload structure '${JSON.stringify(value)}'`);
|
|
255
255
|
break;
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -263,17 +263,17 @@ const fzLocal = {
|
|
|
263
263
|
const eventTypeCode = parseInt(eventTypeCodeRaw, 10);
|
|
264
264
|
|
|
265
265
|
if (Number.isNaN(regionId)) {
|
|
266
|
-
log('warn', `
|
|
266
|
+
log('warn', `action: Invalid regionId "${regionIdRaw}"`);
|
|
267
267
|
break;
|
|
268
268
|
}
|
|
269
269
|
if (!Object.values(fp1.constants.region_event_types).includes(eventTypeCode)) {
|
|
270
|
-
log('warn', `
|
|
270
|
+
log('warn', `action: Unknown region event type "${eventTypeCode}"`);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
const eventTypeName = fp1.mappers.aqara_fp1.region_event_type_names[eventTypeCode];
|
|
275
|
-
log('debug', `
|
|
276
|
-
payload.
|
|
275
|
+
log('debug', `action: Triggered event (region "${regionId}", type "${eventTypeName}")`);
|
|
276
|
+
payload.action = `region_${regionId}_${eventTypeName}`;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
case 0xf7: {
|