@homebridge-plugins/homebridge-ewelink 12.15.1 → 12.15.3-beta.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 +13 -0
- package/README.md +0 -2
- package/lib/device/zigbee/zigbee-water-valve.js +8 -4
- package/lib/platform.js +6 -3
- package/lib/utils/constants.js +1 -0
- package/lib/utils/lang-en.js +0 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `@homebridge-plugins/homebridge-ewelink` will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## v12.15.3 (Pending Release)
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- chore: remove the looking-for-maintainers message
|
|
10
|
+
- fix: use the switch_00 param for the swv-zne irrigation valve (7047) (#778)
|
|
11
|
+
|
|
12
|
+
## v12.15.2 (2026-07-14)
|
|
13
|
+
|
|
14
|
+
### Changed
|
|
15
|
+
|
|
16
|
+
- fix: never pass external accessories to the homebridge cache so saving no longer fails
|
|
17
|
+
|
|
5
18
|
## v12.15.1 (2026-07-13)
|
|
6
19
|
|
|
7
20
|
### Changed
|
package/README.md
CHANGED
|
@@ -24,8 +24,6 @@ Homebridge plugin to integrate eWeLink devices into HomeKit
|
|
|
24
24
|
- listens for real-time device updates when controlled externally
|
|
25
25
|
- supports removing your eWeLink credentials from the configuration in certain situations, see [wiki](https://github.com/homebridge-plugins/homebridge-ewelink/wiki/Connection-Methods#lan-mode-without-ewelink-credentials)
|
|
26
26
|
|
|
27
|
-
> I'm looking for some lovely people to help maintain this plugin, please get in touch on GitHub or Discord if you'd like to help out 😄
|
|
28
|
-
|
|
29
27
|
### Prerequisites
|
|
30
28
|
|
|
31
29
|
- To use this plugin, you will need to already have:
|
|
@@ -14,6 +14,10 @@ export default class {
|
|
|
14
14
|
// Set up custom variables for this device type
|
|
15
15
|
this.enableLogging = !platform.config.disableDeviceLogging
|
|
16
16
|
|
|
17
|
+
// The newer SWV-ZNE irrigation valve (uiid 7047) reports and accepts its
|
|
18
|
+
// state under 'switch_00' rather than 'switch' (#778)
|
|
19
|
+
this.switchParam = accessory.context.eweUIID === 7047 ? 'switch_00' : 'switch'
|
|
20
|
+
|
|
17
21
|
// Initialize cache state
|
|
18
22
|
this.cacheState = false
|
|
19
23
|
|
|
@@ -61,7 +65,7 @@ export default class {
|
|
|
61
65
|
|
|
62
66
|
// Send command to the device
|
|
63
67
|
await this.platform.sendDeviceUpdate(this.accessory, {
|
|
64
|
-
|
|
68
|
+
[this.switchParam]: newState,
|
|
65
69
|
})
|
|
66
70
|
|
|
67
71
|
// Update InUse characteristic to match Active
|
|
@@ -114,7 +118,7 @@ export default class {
|
|
|
114
118
|
try {
|
|
115
119
|
// Send explicit command to turn off the valve
|
|
116
120
|
await this.platform.sendDeviceUpdate(this.accessory, {
|
|
117
|
-
|
|
121
|
+
[this.switchParam]: false,
|
|
118
122
|
})
|
|
119
123
|
|
|
120
124
|
// Update HomeKit characteristics
|
|
@@ -166,8 +170,8 @@ export default class {
|
|
|
166
170
|
async externalUpdate(params) {
|
|
167
171
|
try {
|
|
168
172
|
// Handle On/Off state
|
|
169
|
-
if (hasProperty(params,
|
|
170
|
-
const newState = !!params.
|
|
173
|
+
if (hasProperty(params, this.switchParam)) {
|
|
174
|
+
const newState = !!params[this.switchParam]
|
|
171
175
|
if (newState !== this.cacheState) {
|
|
172
176
|
this.cacheState = newState
|
|
173
177
|
const value = newState ? 1 : 0
|
package/lib/platform.js
CHANGED
|
@@ -626,7 +626,7 @@ export default class {
|
|
|
626
626
|
}
|
|
627
627
|
|
|
628
628
|
// Setup successful
|
|
629
|
-
this.log('%s.
|
|
629
|
+
this.log('%s.', this.lang.complete)
|
|
630
630
|
} catch (err) {
|
|
631
631
|
// Catch any errors during setup
|
|
632
632
|
const eText = parseError(err, [
|
|
@@ -1950,10 +1950,12 @@ export default class {
|
|
|
1950
1950
|
// accessory in our in-memory map. Hidden accessories are deliberately never
|
|
1951
1951
|
// registered (see addAccessory), so they have no associated plugin and would
|
|
1952
1952
|
// make Homebridge throw when it serialises its accessory cache to disk
|
|
1953
|
-
// ('Cannot serialize accessory ... - missing associated plugin').
|
|
1953
|
+
// ('Cannot serialize accessory ... - missing associated plugin'). The same
|
|
1954
|
+
// applies to external accessories (the tv/box/stick simulations), which are
|
|
1955
|
+
// published outside the bridge so have no associated platform. We still
|
|
1954
1956
|
// keep them in devicesInHB so lookups (e.g. the SW0 master of a multi-channel
|
|
1955
1957
|
// device) continue to work.
|
|
1956
|
-
if (!accessory.context.hidden) {
|
|
1958
|
+
if (!accessory.context.hidden && !accessory.context.isExternal) {
|
|
1957
1959
|
this.api.updatePlatformAccessories([accessory])
|
|
1958
1960
|
}
|
|
1959
1961
|
devicesInHB.set(accessory.UUID, accessory)
|
|
@@ -1996,6 +1998,7 @@ export default class {
|
|
|
1996
1998
|
switchNumber: hbDeviceId.split('SW')[1].toString(),
|
|
1997
1999
|
channelCount: platformConsts.supportedDevices[device.extra.uiid],
|
|
1998
2000
|
hidden: false,
|
|
2001
|
+
isExternal: true,
|
|
1999
2002
|
}
|
|
2000
2003
|
|
|
2001
2004
|
// Register the accessory
|
package/lib/utils/constants.js
CHANGED
package/lib/utils/lang-en.js
CHANGED
|
@@ -137,7 +137,6 @@ export default {
|
|
|
137
137
|
viaAL: 'via adaptive lighting',
|
|
138
138
|
viaLAN: 'via LAN',
|
|
139
139
|
viaWS: 'via WS',
|
|
140
|
-
welcome: 'I\'m looking for some lovely people to help maintain this plugin, please get in touch on GitHub or Discord if you\'d like to help out 😄',
|
|
141
140
|
wsHostRec: 'Web socket host received',
|
|
142
141
|
wsLogin: 'Sending WS login request',
|
|
143
142
|
wsLoginErr: 'Unknown WS parameters received',
|
package/package.json
CHANGED