zigbee-herdsman-converters 20.36.0 → 20.38.0
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/CHANGELOG.md +39 -0
- package/devices/amina.d.ts +4 -0
- package/devices/amina.d.ts.map +1 -0
- package/devices/amina.js +361 -0
- package/devices/amina.js.map +1 -0
- package/devices/develco.d.ts.map +1 -1
- package/devices/develco.js +13 -10
- package/devices/develco.js.map +1 -1
- package/devices/easyiot.d.ts.map +1 -1
- package/devices/easyiot.js +164 -0
- package/devices/easyiot.js.map +1 -1
- package/devices/ikea.js +1 -1
- package/devices/ikea.js.map +1 -1
- package/devices/index.d.ts.map +1 -1
- package/devices/index.js +2 -0
- package/devices/index.js.map +1 -1
- package/devices/linptech.d.ts.map +1 -1
- package/devices/linptech.js +11 -2
- package/devices/linptech.js.map +1 -1
- package/devices/neo.d.ts.map +1 -1
- package/devices/neo.js +8 -0
- package/devices/neo.js.map +1 -1
- package/devices/nous.d.ts.map +1 -1
- package/devices/nous.js +1 -0
- package/devices/nous.js.map +1 -1
- package/devices/philips.d.ts.map +1 -1
- package/devices/philips.js +15 -1
- package/devices/philips.js.map +1 -1
- package/devices/tuya.d.ts.map +1 -1
- package/devices/tuya.js +281 -26
- package/devices/tuya.js.map +1 -1
- package/lib/tuya.d.ts +7 -0
- package/lib/tuya.d.ts.map +1 -1
- package/lib/tuya.js +38 -0
- package/lib/tuya.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [20.38.0](https://github.com/Koenkk/zigbee-herdsman-converters/compare/v20.37.0...v20.38.0) (2024-10-31)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **add:** 929003809101 ([#8238](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8238)) ([aaed22d](https://github.com/Koenkk/zigbee-herdsman-converters/commit/aaed22d2d35cdfd7df64f56fc410a4f06dc1201a))
|
|
9
|
+
* **add:** amina S ([#8191](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8191)) ([24e4ab9](https://github.com/Koenkk/zigbee-herdsman-converters/commit/24e4ab91647b97e7148df608af3d0f728500be3d))
|
|
10
|
+
* **add:** HA-08_THERMO ([#8227](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8227)) ([533fc18](https://github.com/Koenkk/zigbee-herdsman-converters/commit/533fc1810eae3f6e39a14c0f1d6b97d4cec78bed))
|
|
11
|
+
* **add:** NAS-TH07B2 ([#8234](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8234)) ([fff3657](https://github.com/Koenkk/zigbee-herdsman-converters/commit/fff36571cf6877c7d05695f28a709c223feb4b06))
|
|
12
|
+
* **add:** RMDZB-1PNL63 ([#8236](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8236)) ([2119cb0](https://github.com/Koenkk/zigbee-herdsman-converters/commit/2119cb0ece87f36cfbbb12fce0220a5ba15cd4ae))
|
|
13
|
+
* **add:** RS485, ZB-PM01, ZB-WC01, ZB-WB01, ZB-WB02, ZB-WB03, ZB-WB08, ZB-PSW04, ZB-SW08 ([#8222](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8222)) ([0a8da2d](https://github.com/Koenkk/zigbee-herdsman-converters/commit/0a8da2d69f2920868e0f47b36b9909d170213cb2))
|
|
14
|
+
* **add:** TS0601_GTZ10 ([#8235](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8235)) ([ea835fe](https://github.com/Koenkk/zigbee-herdsman-converters/commit/ea835fe773071d600a4e36489b67d36a8ea5314f))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **detect:** Detect `_TZ3000_6l1pjfqe` as TOMZN TOB9Z-63M https://github.com/Koenkk/zigbee-herdsman-converters/issues/8232 ([54c64c8](https://github.com/Koenkk/zigbee-herdsman-converters/commit/54c64c806893251497972e797f2fe9043b32d836))
|
|
20
|
+
* **detect:** Detect `_TZ3210_3mpwqzuu` as Tuya TS110E_2gang_2 ([#8228](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8228)) ([e8c01b5](https://github.com/Koenkk/zigbee-herdsman-converters/commit/e8c01b58244241501b738c5af865250b32df3586))
|
|
21
|
+
* **detect:** Detect `TRADFRI bulb E12 CWS globe 800lm` as IKEA LED2111G6 https://github.com/Koenkk/zigbee2mqtt/discussions/7215 ([d740396](https://github.com/Koenkk/zigbee-herdsman-converters/commit/d7403960efe011f64d88e9b3b2902b6d6a705ff8))
|
|
22
|
+
* Develco MOSZB-153: Fix illuminance reporting & unlock LED, timeout control ([#8223](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8223)) ([f5c73fb](https://github.com/Koenkk/zigbee-herdsman-converters/commit/f5c73fb73aec2d8b2a0cfbc54a454359f3204c6f))
|
|
23
|
+
* **ignore:** update dependencies ([#8239](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8239)) ([5156abc](https://github.com/Koenkk/zigbee-herdsman-converters/commit/5156abc03d7e8a7a85e35a2990df9325de7bb910))
|
|
24
|
+
* Improvements to Tuya ZY-M100-24G ('_TZE204_ijxvkhd0') ([#8229](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8229)) ([949b083](https://github.com/Koenkk/zigbee-herdsman-converters/commit/949b0838b95bd2e723558b692265a12dde8bbab1))
|
|
25
|
+
|
|
26
|
+
## [20.37.0](https://github.com/Koenkk/zigbee-herdsman-converters/compare/v20.36.0...v20.37.0) (2024-10-30)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **add:** 929003736101 [@markuswebert](https://github.com/markuswebert) https://github.com/Koenkk/zigbee2mqtt/issues/24540 ([ed54796](https://github.com/Koenkk/zigbee-herdsman-converters/commit/ed547960c959ba9e617e62a167946542d6ea9d59))
|
|
32
|
+
* **add:** SC500ZB ([#8218](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8218)) ([53fb204](https://github.com/Koenkk/zigbee-herdsman-converters/commit/53fb204325eb0b61063ce5cd644c13cb7bf9eea1))
|
|
33
|
+
* Linptech ES1ZZ: add led indicator and fix the illuminance calculation ([#8226](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8226)) ([820bdeb](https://github.com/Koenkk/zigbee-herdsman-converters/commit/820bdeb71319fbb64d97432a4529d8321231ab31))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **detect:** Detect `_TZE200_ydrdfkim` as Nous SZ-T04 ([#8225](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8225)) ([2a97d06](https://github.com/Koenkk/zigbee-herdsman-converters/commit/2a97d061efe5b7c95d33a6d98b2ec2ed4aed8e57))
|
|
39
|
+
* Fix TS0222_light not exposing illuminance ([#8220](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8220)) ([255c180](https://github.com/Koenkk/zigbee-herdsman-converters/commit/255c180bd7afe81d08e508e80f338841feda8a98))
|
|
40
|
+
* **ignore:** update dependencies ([#8192](https://github.com/Koenkk/zigbee-herdsman-converters/issues/8192)) ([5d0ca39](https://github.com/Koenkk/zigbee-herdsman-converters/commit/5d0ca39277af13557d9fc7211162504dd2f461a2))
|
|
41
|
+
|
|
3
42
|
## [20.36.0](https://github.com/Koenkk/zigbee-herdsman-converters/compare/v20.35.0...v20.36.0) (2024-10-29)
|
|
4
43
|
|
|
5
44
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amina.d.ts","sourceRoot":"","sources":["../src/devices/amina.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,oBAAoB,EAAmB,MAAM,cAAc,CAAC;AAwHpE,QAAA,MAAM,WAAW,EAAE,oBAAoB,EAwPtC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/devices/amina.js
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const zigbee_herdsman_1 = require("zigbee-herdsman");
|
|
27
|
+
const constants = __importStar(require("../lib/constants"));
|
|
28
|
+
const exposes = __importStar(require("../lib/exposes"));
|
|
29
|
+
const modernExtend_1 = require("../lib/modernExtend");
|
|
30
|
+
const ota = __importStar(require("../lib/ota"));
|
|
31
|
+
const reporting = __importStar(require("../lib/reporting"));
|
|
32
|
+
const utils = __importStar(require("../lib/utils"));
|
|
33
|
+
const e = exposes.presets;
|
|
34
|
+
const ea = exposes.access;
|
|
35
|
+
const manufacturerOptions = { manufacturerCode: 0x143b };
|
|
36
|
+
const aminaControlAttributes = {
|
|
37
|
+
cluster: 0xfee7,
|
|
38
|
+
alarms: 0x02,
|
|
39
|
+
ev_status: 0x03,
|
|
40
|
+
connect_status: 0x04,
|
|
41
|
+
single_phase: 0x05,
|
|
42
|
+
offline_current: 0x06,
|
|
43
|
+
offline_single_phase: 0x07,
|
|
44
|
+
time_to_offline: 0x08,
|
|
45
|
+
enable_offline: 0x09,
|
|
46
|
+
total_active_energy: 0x10,
|
|
47
|
+
last_session_energy: 0x11,
|
|
48
|
+
};
|
|
49
|
+
const aminaAlarms = [
|
|
50
|
+
'welded_relay',
|
|
51
|
+
'wrong_voltage_balance',
|
|
52
|
+
'rdc_dd_dc_leakage',
|
|
53
|
+
'rdc_dd_ac_leakage',
|
|
54
|
+
'high_temperature',
|
|
55
|
+
'overvoltage',
|
|
56
|
+
'undervoltage',
|
|
57
|
+
'overcurrent',
|
|
58
|
+
'car_communication_error',
|
|
59
|
+
'charger_processing_error',
|
|
60
|
+
'critical_overcurrent',
|
|
61
|
+
'critical_powerloss',
|
|
62
|
+
'unknown_alarm_bit_12',
|
|
63
|
+
'unknown_alarm_bit_13',
|
|
64
|
+
'unknown_alarm_bit_14',
|
|
65
|
+
'unknown_alarm_bit_15',
|
|
66
|
+
];
|
|
67
|
+
const aminaAlarmsEnum = e.enum('alarm', ea.STATE_GET, aminaAlarms);
|
|
68
|
+
const fzLocal = {
|
|
69
|
+
ev_status: {
|
|
70
|
+
cluster: 'aminaControlCluster',
|
|
71
|
+
type: ['attributeReport', 'readResponse'],
|
|
72
|
+
convert: (model, msg, publish, options, meta) => {
|
|
73
|
+
const result = {};
|
|
74
|
+
if (msg.data.evStatus !== undefined) {
|
|
75
|
+
let statusText = 'Not Connected';
|
|
76
|
+
const evStatus = msg.data['evStatus'];
|
|
77
|
+
result.ev_connected = (evStatus & (1 << 0)) !== 0;
|
|
78
|
+
result.charging = (evStatus & (1 << 2)) !== 0;
|
|
79
|
+
result.derated = (evStatus & (1 << 15)) !== 0;
|
|
80
|
+
if (result.ev_connected === true)
|
|
81
|
+
statusText = 'EV Connected';
|
|
82
|
+
if ((evStatus & (1 << 1)) !== 0)
|
|
83
|
+
statusText = 'Ready to charge';
|
|
84
|
+
if (result.charging === true)
|
|
85
|
+
statusText = 'Charging';
|
|
86
|
+
if ((evStatus & (1 << 3)) !== 0)
|
|
87
|
+
statusText = 'Charging Paused';
|
|
88
|
+
if (result.derated === true)
|
|
89
|
+
statusText += ', Derated';
|
|
90
|
+
result.ev_status = statusText;
|
|
91
|
+
return result;
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
},
|
|
95
|
+
alarms: {
|
|
96
|
+
cluster: 'aminaControlCluster',
|
|
97
|
+
type: ['attributeReport', 'readResponse'],
|
|
98
|
+
convert: (model, msg, publish, options, meta) => {
|
|
99
|
+
const result = {};
|
|
100
|
+
if (msg.data.alarms !== undefined) {
|
|
101
|
+
result.alarm_active = false;
|
|
102
|
+
if (msg.data['alarms'] !== 0) {
|
|
103
|
+
result.alarms = aminaAlarmsEnum.values.filter((_, i) => (msg.data['alarms'] & (1 << i)) !== 0);
|
|
104
|
+
result.alarm_active = true;
|
|
105
|
+
}
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
const tzLocal = {
|
|
112
|
+
charge_limit: {
|
|
113
|
+
key: ['charge_limit'],
|
|
114
|
+
convertSet: async (entity, key, value, meta) => {
|
|
115
|
+
const payload = { level: value, transtime: 0 };
|
|
116
|
+
await entity.command('genLevelCtrl', 'moveToLevel', payload, utils.getOptions(meta.mapped, entity));
|
|
117
|
+
},
|
|
118
|
+
convertGet: async (entity, key, meta) => {
|
|
119
|
+
await entity.read('genLevelCtrl', ['currentLevel'], manufacturerOptions);
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
ev_status: {
|
|
123
|
+
key: ['ev_status'],
|
|
124
|
+
convertGet: async (entity, key, meta) => {
|
|
125
|
+
await entity.read('aminaControlCluster', ['evStatus'], manufacturerOptions);
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
alarms: {
|
|
129
|
+
key: ['alarms'],
|
|
130
|
+
convertGet: async (entity, key, meta) => {
|
|
131
|
+
await entity.read('aminaControlCluster', ['alarms'], manufacturerOptions);
|
|
132
|
+
},
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
const definitions = [
|
|
136
|
+
{
|
|
137
|
+
zigbeeModel: ['amina S'],
|
|
138
|
+
model: 'amina S',
|
|
139
|
+
vendor: 'Amina Distribution AS',
|
|
140
|
+
description: 'Amina S EV Charger',
|
|
141
|
+
ota: ota.zigbeeOTA,
|
|
142
|
+
fromZigbee: [fzLocal.ev_status, fzLocal.alarms],
|
|
143
|
+
toZigbee: [tzLocal.ev_status, tzLocal.alarms, tzLocal.charge_limit],
|
|
144
|
+
exposes: [
|
|
145
|
+
e.text('ev_status', ea.STATE_GET).withDescription('Current charging status'),
|
|
146
|
+
e.list('alarms', ea.STATE_GET, aminaAlarmsEnum).withDescription('List of active alarms'),
|
|
147
|
+
],
|
|
148
|
+
extend: [
|
|
149
|
+
(0, modernExtend_1.deviceAddCustomCluster)('aminaControlCluster', {
|
|
150
|
+
ID: aminaControlAttributes.cluster,
|
|
151
|
+
manufacturerCode: manufacturerOptions.manufacturerCode,
|
|
152
|
+
attributes: {
|
|
153
|
+
alarms: { ID: aminaControlAttributes.alarms, type: zigbee_herdsman_1.Zcl.DataType.BITMAP16 },
|
|
154
|
+
evStatus: { ID: aminaControlAttributes.ev_status, type: zigbee_herdsman_1.Zcl.DataType.BITMAP16 },
|
|
155
|
+
connectStatus: { ID: aminaControlAttributes.connect_status, type: zigbee_herdsman_1.Zcl.DataType.BITMAP16 },
|
|
156
|
+
singlePhase: { ID: aminaControlAttributes.single_phase, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
157
|
+
offlineCurrent: { ID: aminaControlAttributes.offline_current, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
158
|
+
offlineSinglePhase: { ID: aminaControlAttributes.offline_single_phase, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
159
|
+
timeToOffline: { ID: aminaControlAttributes.time_to_offline, type: zigbee_herdsman_1.Zcl.DataType.UINT16 },
|
|
160
|
+
enableOffline: { ID: aminaControlAttributes.enable_offline, type: zigbee_herdsman_1.Zcl.DataType.UINT8 },
|
|
161
|
+
totalActiveEnergy: { ID: aminaControlAttributes.total_active_energy, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
|
|
162
|
+
lastSessionEnergy: { ID: aminaControlAttributes.last_session_energy, type: zigbee_herdsman_1.Zcl.DataType.UINT32 },
|
|
163
|
+
},
|
|
164
|
+
commands: {},
|
|
165
|
+
commandsResponse: {},
|
|
166
|
+
}),
|
|
167
|
+
(0, modernExtend_1.onOff)({
|
|
168
|
+
powerOnBehavior: false,
|
|
169
|
+
}),
|
|
170
|
+
(0, modernExtend_1.numeric)({
|
|
171
|
+
name: 'charge_limit',
|
|
172
|
+
cluster: 'genLevelCtrl',
|
|
173
|
+
attribute: 'currentLevel',
|
|
174
|
+
description: 'Maximum allowed amperage draw',
|
|
175
|
+
reporting: { min: 0, max: 'MAX', change: 1 },
|
|
176
|
+
unit: 'A',
|
|
177
|
+
valueMin: 6,
|
|
178
|
+
valueMax: 32,
|
|
179
|
+
valueStep: 1,
|
|
180
|
+
access: 'ALL',
|
|
181
|
+
}),
|
|
182
|
+
(0, modernExtend_1.numeric)({
|
|
183
|
+
name: 'total_active_power',
|
|
184
|
+
cluster: 'haElectricalMeasurement',
|
|
185
|
+
attribute: 'totalActivePower',
|
|
186
|
+
description: 'Instantaneous measured total active power',
|
|
187
|
+
reporting: { min: '10_SECONDS', max: 'MAX', change: 10 },
|
|
188
|
+
unit: 'kW',
|
|
189
|
+
scale: 1000,
|
|
190
|
+
precision: 2,
|
|
191
|
+
access: 'STATE_GET',
|
|
192
|
+
}),
|
|
193
|
+
(0, modernExtend_1.numeric)({
|
|
194
|
+
name: 'total_active_energy',
|
|
195
|
+
cluster: 'aminaControlCluster',
|
|
196
|
+
attribute: 'totalActiveEnergy',
|
|
197
|
+
description: 'Sum of consumed energy',
|
|
198
|
+
//reporting: {min: '10_SECONDS', max: 'MAX', change: 5}, // Not Reportable atm, updated using onEvent
|
|
199
|
+
unit: 'kWh',
|
|
200
|
+
scale: 1000,
|
|
201
|
+
precision: 2,
|
|
202
|
+
access: 'STATE_GET',
|
|
203
|
+
}),
|
|
204
|
+
(0, modernExtend_1.numeric)({
|
|
205
|
+
name: 'last_session_energy',
|
|
206
|
+
cluster: 'aminaControlCluster',
|
|
207
|
+
attribute: 'lastSessionEnergy',
|
|
208
|
+
description: 'Sum of consumed energy last session',
|
|
209
|
+
//reporting: {min: '10_SECONDS', max: 'MAX', change: 5}, // Not Reportable atm, updated using onEvent
|
|
210
|
+
unit: 'kWh',
|
|
211
|
+
scale: 1000,
|
|
212
|
+
precision: 2,
|
|
213
|
+
access: 'STATE_GET',
|
|
214
|
+
}),
|
|
215
|
+
(0, modernExtend_1.binary)({
|
|
216
|
+
name: 'ev_connected',
|
|
217
|
+
cluster: 'aminaControlCluster',
|
|
218
|
+
attribute: 'evConnected',
|
|
219
|
+
description: 'An EV is connected to the charger',
|
|
220
|
+
valueOn: ['true', 1],
|
|
221
|
+
valueOff: ['false', 0],
|
|
222
|
+
access: 'STATE',
|
|
223
|
+
}),
|
|
224
|
+
(0, modernExtend_1.binary)({
|
|
225
|
+
name: 'charging',
|
|
226
|
+
cluster: 'aminaControlCluster',
|
|
227
|
+
attribute: 'charging',
|
|
228
|
+
description: 'Power is being delivered to the EV',
|
|
229
|
+
valueOn: ['true', 1],
|
|
230
|
+
valueOff: ['false', 0],
|
|
231
|
+
access: 'STATE',
|
|
232
|
+
}),
|
|
233
|
+
(0, modernExtend_1.binary)({
|
|
234
|
+
name: 'derated',
|
|
235
|
+
cluster: 'aminaControlCluster',
|
|
236
|
+
attribute: 'derated',
|
|
237
|
+
description: 'Charging derated due to high temperature',
|
|
238
|
+
valueOn: ['true', 1],
|
|
239
|
+
valueOff: ['false', 0],
|
|
240
|
+
access: 'STATE',
|
|
241
|
+
}),
|
|
242
|
+
(0, modernExtend_1.binary)({
|
|
243
|
+
name: 'alarm_active',
|
|
244
|
+
cluster: 'aminaControlCluster',
|
|
245
|
+
attribute: 'alarmActive',
|
|
246
|
+
description: 'An active alarm is present',
|
|
247
|
+
valueOn: ['true', 1],
|
|
248
|
+
valueOff: ['false', 0],
|
|
249
|
+
access: 'STATE',
|
|
250
|
+
}),
|
|
251
|
+
(0, modernExtend_1.electricityMeter)({
|
|
252
|
+
cluster: 'electrical',
|
|
253
|
+
acFrequency: true,
|
|
254
|
+
threePhase: true,
|
|
255
|
+
}),
|
|
256
|
+
(0, modernExtend_1.binary)({
|
|
257
|
+
name: 'single_phase',
|
|
258
|
+
cluster: 'aminaControlCluster',
|
|
259
|
+
attribute: 'singlePhase',
|
|
260
|
+
description: 'Enable single phase charging. A restart of charging is required for the change to take effect.',
|
|
261
|
+
valueOn: ['enable', 1],
|
|
262
|
+
valueOff: ['disable', 0],
|
|
263
|
+
entityCategory: 'config',
|
|
264
|
+
}),
|
|
265
|
+
(0, modernExtend_1.binary)({
|
|
266
|
+
name: 'enable_offline',
|
|
267
|
+
cluster: 'aminaControlCluster',
|
|
268
|
+
attribute: 'enableOffline',
|
|
269
|
+
description: 'Enable offline mode when connection to the network is lost',
|
|
270
|
+
valueOn: ['enable', 1],
|
|
271
|
+
valueOff: ['disable', 0],
|
|
272
|
+
entityCategory: 'config',
|
|
273
|
+
}),
|
|
274
|
+
(0, modernExtend_1.numeric)({
|
|
275
|
+
name: 'time_to_offline',
|
|
276
|
+
cluster: 'aminaControlCluster',
|
|
277
|
+
attribute: 'timeToOffline',
|
|
278
|
+
description: 'Time until charger will behave as offline after connection has been lost',
|
|
279
|
+
valueMin: 0,
|
|
280
|
+
valueMax: 60,
|
|
281
|
+
valueStep: 1,
|
|
282
|
+
unit: 's',
|
|
283
|
+
entityCategory: 'config',
|
|
284
|
+
}),
|
|
285
|
+
(0, modernExtend_1.numeric)({
|
|
286
|
+
name: 'offline_current',
|
|
287
|
+
cluster: 'aminaControlCluster',
|
|
288
|
+
attribute: 'offlineCurrent',
|
|
289
|
+
description: 'Maximum allowed amperage draw when device is offline',
|
|
290
|
+
valueMin: 6,
|
|
291
|
+
valueMax: 32,
|
|
292
|
+
valueStep: 1,
|
|
293
|
+
unit: 'A',
|
|
294
|
+
entityCategory: 'config',
|
|
295
|
+
}),
|
|
296
|
+
(0, modernExtend_1.binary)({
|
|
297
|
+
name: 'offline_single_phase',
|
|
298
|
+
cluster: 'aminaControlCluster',
|
|
299
|
+
attribute: 'offlineSinglePhase',
|
|
300
|
+
description: 'Use single phase charging when device is offline',
|
|
301
|
+
valueOn: ['enable', 1],
|
|
302
|
+
valueOff: ['disable', 0],
|
|
303
|
+
entityCategory: 'config',
|
|
304
|
+
}),
|
|
305
|
+
],
|
|
306
|
+
endpoint: (device) => {
|
|
307
|
+
return { default: 10 };
|
|
308
|
+
},
|
|
309
|
+
configure: async (device, coordinatorEndpoint) => {
|
|
310
|
+
const endpoint = device.getEndpoint(10);
|
|
311
|
+
const binds = ['genBasic', 'genLevelCtrl', 'aminaControlCluster'];
|
|
312
|
+
await reporting.bind(endpoint, coordinatorEndpoint, binds);
|
|
313
|
+
await endpoint.configureReporting('aminaControlCluster', [
|
|
314
|
+
{
|
|
315
|
+
attribute: 'evStatus',
|
|
316
|
+
minimumReportInterval: 0,
|
|
317
|
+
maximumReportInterval: constants.repInterval.MAX,
|
|
318
|
+
reportableChange: 1,
|
|
319
|
+
},
|
|
320
|
+
]);
|
|
321
|
+
await endpoint.configureReporting('aminaControlCluster', [
|
|
322
|
+
{
|
|
323
|
+
attribute: 'alarms',
|
|
324
|
+
minimumReportInterval: 0,
|
|
325
|
+
maximumReportInterval: constants.repInterval.MAX,
|
|
326
|
+
reportableChange: 1,
|
|
327
|
+
},
|
|
328
|
+
]);
|
|
329
|
+
await endpoint.read('aminaControlCluster', [
|
|
330
|
+
'alarms',
|
|
331
|
+
'evStatus',
|
|
332
|
+
'connectStatus',
|
|
333
|
+
'singlePhase',
|
|
334
|
+
'offlineCurrent',
|
|
335
|
+
'offlineSinglePhase',
|
|
336
|
+
'timeToOffline',
|
|
337
|
+
'enableOffline',
|
|
338
|
+
'totalActiveEnergy',
|
|
339
|
+
'lastSessionEnergy',
|
|
340
|
+
]);
|
|
341
|
+
},
|
|
342
|
+
onEvent: async (type, data, device) => {
|
|
343
|
+
if (type === 'message' &&
|
|
344
|
+
data.type === 'attributeReport' &&
|
|
345
|
+
data.cluster === 'haElectricalMeasurement' &&
|
|
346
|
+
data.data['totalActivePower']) {
|
|
347
|
+
// Device does not support reporting of energy attributes, so we poll them manually when power is updated
|
|
348
|
+
await data.endpoint.read('aminaControlCluster', ['totalActiveEnergy']);
|
|
349
|
+
}
|
|
350
|
+
if (type === 'message' && data.type === 'attributeReport' && data.cluster === 'aminaControlCluster' && data.data['evStatus']) {
|
|
351
|
+
// Device does not support reporting of energy attributes, so we poll them manually when charging is stopped
|
|
352
|
+
if ((data.data['evStatus'] & (1 << 2)) === 0) {
|
|
353
|
+
await data.endpoint.read('aminaControlCluster', ['totalActiveEnergy', 'lastSessionEnergy']);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
];
|
|
359
|
+
exports.default = definitions;
|
|
360
|
+
module.exports = definitions;
|
|
361
|
+
//# sourceMappingURL=amina.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"amina.js","sourceRoot":"","sources":["../src/devices/amina.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAoC;AAEpC,4DAA8C;AAC9C,wDAA0C;AAC1C,sDAAqG;AACrG,gDAAkC;AAClC,4DAA8C;AAE9C,oDAAsC;AAEtC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAA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ACzG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,mBAAmB,CAAC,CAAC,CAAC;YAC3E,CAAC;YAED,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,IAAI,KAAK,iBAAiB,IAAI,IAAI,CAAC,OAAO,KAAK,qBAAqB,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC3H,4GAA4G;gBAC5G,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC;oBAC3C,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAC,CAAC;gBAChG,CAAC;YACL,CAAC;QACL,CAAC;KACJ;CACJ,CAAC;AAEF,kBAAe,WAAW,CAAC;AAC3B,MAAM,CAAC,OAAO,GAAG,WAAW,CAAC"}
|
package/devices/develco.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"develco.d.ts","sourceRoot":"","sources":["../src/devices/develco.ts"],"names":[],"mappings":"AAYA,OAAO,EAAC,oBAAoB,EAAmB,MAAM,cAAc,CAAC;AA+MpE,QAAA,MAAM,WAAW,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"develco.d.ts","sourceRoot":"","sources":["../src/devices/develco.ts"],"names":[],"mappings":"AAYA,OAAO,EAAC,oBAAoB,EAAmB,MAAM,cAAc,CAAC;AA+MpE,QAAA,MAAM,WAAW,EAAE,oBAAoB,EAgzBtC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
package/devices/develco.js
CHANGED
|
@@ -683,10 +683,8 @@ const definitions = [
|
|
|
683
683
|
toZigbee: [develco.tz.led_control, develco.tz.ias_occupancy_timeout],
|
|
684
684
|
exposes: (device, options) => {
|
|
685
685
|
const dynExposes = [];
|
|
686
|
-
if (Number(device?.softwareBuildID?.split('.')[0]) >=
|
|
686
|
+
if (Number(device?.softwareBuildID?.split('.')[0]) >= 2) {
|
|
687
687
|
dynExposes.push(e.numeric('occupancy_timeout', ea.ALL).withUnit('s').withValueMin(5).withValueMax(65535));
|
|
688
|
-
}
|
|
689
|
-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 4) {
|
|
690
688
|
dynExposes.push(e.enum('led_control', ea.ALL, ['off', 'fault_only', 'motion_only', 'both']).withDescription('Control LED indicator usage.'));
|
|
691
689
|
}
|
|
692
690
|
dynExposes.push(e.linkquality());
|
|
@@ -700,16 +698,21 @@ const definitions = [
|
|
|
700
698
|
develco_1.develcoModernExtend.addCustomClusterManuSpecificDevelcoGenBasic(),
|
|
701
699
|
develco_1.develcoModernExtend.readGenBasicPrimaryVersions(),
|
|
702
700
|
develco_1.develcoModernExtend.temperature(),
|
|
703
|
-
(0, modernExtend_1.illuminance)(),
|
|
704
|
-
(0, modernExtend_1.battery)(
|
|
705
|
-
|
|
701
|
+
(0, modernExtend_1.illuminance)({ reporting: { min: 60, max: 3600, change: 500 } }),
|
|
702
|
+
(0, modernExtend_1.battery)({
|
|
703
|
+
voltageToPercentage: { min: 2500, max: 3000 },
|
|
704
|
+
percentage: true,
|
|
705
|
+
voltage: true,
|
|
706
|
+
lowStatus: false,
|
|
707
|
+
voltageReporting: true,
|
|
708
|
+
percentageReporting: false,
|
|
709
|
+
}),
|
|
710
|
+
(0, modernExtend_1.iasZoneAlarm)({ zoneType: 'occupancy', zoneAttributes: ['alarm_1'] }),
|
|
706
711
|
],
|
|
707
712
|
configure: async (device, coordinatorEndpoint) => {
|
|
708
|
-
|
|
709
|
-
|
|
713
|
+
if (device && device.softwareBuildID && Number(device.softwareBuildID.split('.')[0]) >= 2) {
|
|
714
|
+
const endpoint35 = device.getEndpoint(35);
|
|
710
715
|
await endpoint35.read('ssIasZone', ['develcoAlarmOffDelay'], manufacturerOptions);
|
|
711
|
-
}
|
|
712
|
-
if (Number(device?.softwareBuildID?.split('.')[0]) >= 4) {
|
|
713
716
|
await endpoint35.read('genBasic', ['develcoLedControl'], manufacturerOptions);
|
|
714
717
|
}
|
|
715
718
|
},
|