@homebridge-plugins/homebridge-ewelink 12.5.0 → 12.6.1
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 +20 -0
- package/README.md +2 -0
- package/lib/homebridge-ui/public/index.html +37 -1
- package/lib/utils/custom-chars.js +23 -21
- package/lib/utils/eve-chars.js +113 -97
- package/lib/utils/lang-en.js +1 -1
- package/lib/utils/lang-fr.js +1 -1
- package/lib/utils/lang-th.js +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to homebridge-ewelink will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## v12.6.1 (2025-07-18)
|
|
6
|
+
|
|
7
|
+
### Other Changes
|
|
8
|
+
|
|
9
|
+
- add maintainer message
|
|
10
|
+
|
|
11
|
+
## v12.6.0 (2025-07-13)
|
|
12
|
+
|
|
13
|
+
### Notable Changes
|
|
14
|
+
|
|
15
|
+
- fix custom plugin config modal styles in ui 5
|
|
16
|
+
- fix eve characteristics for hb 2
|
|
17
|
+
- fix custom characteristics for hb 2
|
|
18
|
+
|
|
19
|
+
### Other Changes
|
|
20
|
+
|
|
21
|
+
- fix plugin name in release workflow
|
|
22
|
+
- add permissions to workflows
|
|
23
|
+
- improvements to the deprecate workflow
|
|
24
|
+
|
|
5
25
|
## v12.5.0 (2025-07-12)
|
|
6
26
|
|
|
7
27
|
⚠️ This plugin no longer officially supports Node `v16` and `v18`, however there is no reason why it shouldn't work on these versions.
|
package/README.md
CHANGED
|
@@ -26,6 +26,8 @@ Homebridge plugin to integrate eWeLink devices into HomeKit
|
|
|
26
26
|
- listens for real-time device updates when controlled externally
|
|
27
27
|
- 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)
|
|
28
28
|
|
|
29
|
+
> 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 😄
|
|
30
|
+
|
|
29
31
|
### Prerequisites
|
|
30
32
|
|
|
31
33
|
- To use this plugin, you will need to already have:
|
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
<style>
|
|
2
|
+
.dark-mode {
|
|
3
|
+
background-color: #242424;
|
|
4
|
+
color: lightgrey;
|
|
5
|
+
|
|
6
|
+
.form-control {
|
|
7
|
+
background-color: #333333 !important;
|
|
8
|
+
border: none !important;
|
|
9
|
+
color: #eeeeee !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
thead, tbody, tr {
|
|
13
|
+
border-style: hidden;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
th {
|
|
17
|
+
color: #eeeeee !important;
|
|
18
|
+
font-weight: 500 !important;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
select {
|
|
22
|
+
background-image:
|
|
23
|
+
linear-gradient(45deg, transparent 50%, gray 50%),
|
|
24
|
+
linear-gradient(135deg, gray 50%, transparent 50%),
|
|
25
|
+
linear-gradient(to right, #ccc, #ccc);
|
|
26
|
+
background-position:
|
|
27
|
+
calc(100% - 20px) calc(1em + 2px),
|
|
28
|
+
calc(100% - 15px) calc(1em + 2px),
|
|
29
|
+
calc(100% - 2.5em) 0.5em;
|
|
30
|
+
background-size:
|
|
31
|
+
5px 5px,
|
|
32
|
+
5px 5px,
|
|
33
|
+
1px 1.5em;
|
|
34
|
+
background-repeat: no-repeat;
|
|
35
|
+
}
|
|
36
|
+
</style>
|
|
1
37
|
<p class="text-center">
|
|
2
38
|
<img
|
|
3
39
|
src="https://user-images.githubusercontent.com/43026681/101325266-63126600-3863-11eb-9382-4a2924f0e540.png"
|
|
@@ -49,7 +85,7 @@
|
|
|
49
85
|
<select class="form-control" id="deviceSelect"></select>
|
|
50
86
|
</div>
|
|
51
87
|
</form>
|
|
52
|
-
<table class="table w-100" id="deviceTable" style="display: none;">
|
|
88
|
+
<table class="table w-100 mt-3" id="deviceTable" style="display: none;">
|
|
53
89
|
<thead>
|
|
54
90
|
<tr class="table-active">
|
|
55
91
|
<th scope="col" style="width: 40%;">Device Name</th>
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
import { inherits } from 'node:util'
|
|
2
|
-
|
|
3
1
|
export default class {
|
|
4
2
|
constructor(api) {
|
|
5
|
-
this.hapServ = api.hap.Service
|
|
6
|
-
this.hapChar = api.hap.Characteristic
|
|
7
3
|
this.uuids = {
|
|
8
4
|
invertSwitch: 'E965F001-079E-48FF-8F27-9C2605A29F52',
|
|
9
5
|
festiveScene: 'E965F002-079E-48FF-8F27-9C2605A29F52',
|
|
10
6
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
|
|
8
|
+
const uuids = this.uuids
|
|
9
|
+
|
|
10
|
+
this.InvertSwitch = class extends api.hap.Characteristic {
|
|
11
|
+
constructor() {
|
|
12
|
+
super('Invert Switch', uuids.invertSwitch)
|
|
13
|
+
this.setProps({
|
|
14
|
+
format: api.hap.Formats.BOOL,
|
|
15
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
|
|
16
|
+
})
|
|
17
|
+
this.value = this.getDefaultValue()
|
|
18
|
+
}
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
20
|
+
|
|
21
|
+
this.FestiveScene = class extends api.hap.Characteristic {
|
|
22
|
+
constructor() {
|
|
23
|
+
super('Festive Scene', uuids.festiveScene)
|
|
24
|
+
this.setProps({
|
|
25
|
+
format: api.hap.Formats.BOOL,
|
|
26
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
|
|
27
|
+
})
|
|
28
|
+
this.value = this.getDefaultValue()
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
|
-
|
|
29
|
-
inherits(this.FestiveScene, this.hapChar)
|
|
31
|
+
|
|
30
32
|
this.InvertSwitch.UUID = this.uuids.invertSwitch
|
|
31
33
|
this.FestiveScene.UUID = this.uuids.festiveScene
|
|
32
34
|
}
|
package/lib/utils/eve-chars.js
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { inherits } from 'node:util'
|
|
2
|
-
|
|
3
1
|
export default class {
|
|
4
2
|
constructor(api) {
|
|
5
|
-
this.hapServ = api.hap.Service
|
|
6
|
-
this.hapChar = api.hap.Characteristic
|
|
7
3
|
this.uuids = {
|
|
8
4
|
currentConsumption: 'E863F10D-079E-48FF-8F27-9C2605A29F52',
|
|
9
5
|
totalConsumption: 'E863F10C-079E-48FF-8F27-9C2605A29F52',
|
|
@@ -15,108 +11,128 @@ export default class {
|
|
|
15
11
|
closedDuration: 'E863F119-079E-48FF-8F27-9C2605A29F52',
|
|
16
12
|
timesOpened: 'E863F129-079E-48FF-8F27-9C2605A29F52',
|
|
17
13
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
14
|
+
|
|
15
|
+
const uuids = this.uuids
|
|
16
|
+
|
|
17
|
+
this.CurrentConsumption = class extends api.hap.Characteristic {
|
|
18
|
+
constructor() {
|
|
19
|
+
super('Current Consumption', uuids.currentConsumption)
|
|
20
|
+
this.setProps({
|
|
21
|
+
format: api.hap.Formats.UINT16,
|
|
22
|
+
unit: 'W',
|
|
23
|
+
maxValue: 100000,
|
|
24
|
+
minValue: 0,
|
|
25
|
+
minStep: 1,
|
|
26
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
27
|
+
})
|
|
28
|
+
this.value = this.getDefaultValue()
|
|
29
|
+
}
|
|
30
30
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
31
|
+
|
|
32
|
+
this.TotalConsumption = class extends api.hap.Characteristic {
|
|
33
|
+
constructor() {
|
|
34
|
+
super('Total Consumption', uuids.totalConsumption)
|
|
35
|
+
this.setProps({
|
|
36
|
+
format: api.hap.Formats.FLOAT,
|
|
37
|
+
unit: 'kWh',
|
|
38
|
+
maxValue: 100000000000,
|
|
39
|
+
minValue: 0,
|
|
40
|
+
minStep: 0.01,
|
|
41
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
42
|
+
})
|
|
43
|
+
this.value = this.getDefaultValue()
|
|
44
|
+
}
|
|
42
45
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
|
|
47
|
+
this.Voltage = class extends api.hap.Characteristic {
|
|
48
|
+
constructor() {
|
|
49
|
+
super('Voltage', uuids.voltage)
|
|
50
|
+
this.setProps({
|
|
51
|
+
format: api.hap.Formats.FLOAT,
|
|
52
|
+
unit: 'V',
|
|
53
|
+
maxValue: 100000000000,
|
|
54
|
+
minValue: 0,
|
|
55
|
+
minStep: 1,
|
|
56
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
57
|
+
})
|
|
58
|
+
this.value = this.getDefaultValue()
|
|
59
|
+
}
|
|
54
60
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
61
|
+
|
|
62
|
+
this.ElectricCurrent = class extends api.hap.Characteristic {
|
|
63
|
+
constructor() {
|
|
64
|
+
super('Electric Current', uuids.electricCurrent)
|
|
65
|
+
this.setProps({
|
|
66
|
+
format: api.hap.Formats.FLOAT,
|
|
67
|
+
unit: 'A',
|
|
68
|
+
maxValue: 100000000000,
|
|
69
|
+
minValue: 0,
|
|
70
|
+
minStep: 0.1,
|
|
71
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
72
|
+
})
|
|
73
|
+
this.value = this.getDefaultValue()
|
|
74
|
+
}
|
|
66
75
|
}
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
76
|
+
|
|
77
|
+
this.ResetTotal = class extends api.hap.Characteristic {
|
|
78
|
+
constructor() {
|
|
79
|
+
super('Reset Total', uuids.resetTotal)
|
|
80
|
+
this.setProps({
|
|
81
|
+
format: api.hap.Formats.UINT32,
|
|
82
|
+
unit: api.hap.Units.seconds,
|
|
83
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
|
|
84
|
+
})
|
|
85
|
+
this.value = this.getDefaultValue()
|
|
86
|
+
}
|
|
75
87
|
}
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
88
|
+
|
|
89
|
+
this.LastActivation = class extends api.hap.Characteristic {
|
|
90
|
+
constructor() {
|
|
91
|
+
super('Last Activation', uuids.lastActivation)
|
|
92
|
+
this.setProps({
|
|
93
|
+
format: api.hap.Formats.UINT32,
|
|
94
|
+
unit: api.hap.Units.SECONDS,
|
|
95
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
96
|
+
})
|
|
97
|
+
this.value = this.getDefaultValue()
|
|
98
|
+
}
|
|
84
99
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
100
|
+
|
|
101
|
+
this.OpenDuration = class extends api.hap.Characteristic {
|
|
102
|
+
constructor() {
|
|
103
|
+
super('Open Duration', uuids.openDuration)
|
|
104
|
+
this.setProps({
|
|
105
|
+
format: api.hap.Formats.UINT32,
|
|
106
|
+
unit: api.hap.Units.SECONDS,
|
|
107
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
|
|
108
|
+
})
|
|
109
|
+
this.value = this.getDefaultValue()
|
|
110
|
+
}
|
|
93
111
|
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
112
|
+
|
|
113
|
+
this.ClosedDuration = class extends api.hap.Characteristic {
|
|
114
|
+
constructor() {
|
|
115
|
+
super('Closed Duration', uuids.closedDuration)
|
|
116
|
+
this.setProps({
|
|
117
|
+
format: api.hap.Formats.UINT32,
|
|
118
|
+
unit: api.hap.Units.SECONDS,
|
|
119
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
|
|
120
|
+
})
|
|
121
|
+
this.value = this.getDefaultValue()
|
|
122
|
+
}
|
|
102
123
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
124
|
+
|
|
125
|
+
this.TimesOpened = class extends api.hap.Characteristic {
|
|
126
|
+
constructor() {
|
|
127
|
+
super('Times Opened', uuids.timesOpened)
|
|
128
|
+
this.setProps({
|
|
129
|
+
format: api.hap.Formats.UINT32,
|
|
130
|
+
perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
|
|
131
|
+
})
|
|
132
|
+
this.value = this.getDefaultValue()
|
|
133
|
+
}
|
|
110
134
|
}
|
|
111
|
-
|
|
112
|
-
inherits(this.TotalConsumption, this.hapChar)
|
|
113
|
-
inherits(this.Voltage, this.hapChar)
|
|
114
|
-
inherits(this.ElectricCurrent, this.hapChar)
|
|
115
|
-
inherits(this.LastActivation, this.hapChar)
|
|
116
|
-
inherits(this.ResetTotal, this.hapChar)
|
|
117
|
-
inherits(this.OpenDuration, this.hapChar)
|
|
118
|
-
inherits(this.ClosedDuration, this.hapChar)
|
|
119
|
-
inherits(this.TimesOpened, this.hapChar)
|
|
135
|
+
|
|
120
136
|
this.CurrentConsumption.UUID = this.uuids.currentConsumption
|
|
121
137
|
this.TotalConsumption.UUID = this.uuids.totalConsumption
|
|
122
138
|
this.Voltage.UUID = this.uuids.voltage
|
package/lib/utils/lang-en.js
CHANGED
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
viaAL: 'via adaptive lighting',
|
|
138
138
|
viaLAN: 'via LAN',
|
|
139
139
|
viaWS: 'via WS',
|
|
140
|
-
welcome: '
|
|
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
141
|
wsHostRec: 'Web socket host received',
|
|
142
142
|
wsLogin: 'Sending WS login request',
|
|
143
143
|
wsLoginErr: 'Unknown WS parameters received',
|
package/lib/utils/lang-fr.js
CHANGED
|
@@ -140,7 +140,7 @@ export default {
|
|
|
140
140
|
viaAL: 'via éclairafe adaptatif',
|
|
141
141
|
viaLAN: 'via LAN',
|
|
142
142
|
viaWS: 'via WS',
|
|
143
|
-
welcome: '
|
|
143
|
+
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 😄',
|
|
144
144
|
wsHostRec: 'reception d\'un hôte Web socket',
|
|
145
145
|
wsLogin: 'Envoie d\'une requête de connection WS',
|
|
146
146
|
wsLoginErr: 'Paramètres WS reçus inconnus',
|
package/lib/utils/lang-th.js
CHANGED
|
@@ -137,7 +137,7 @@ export default {
|
|
|
137
137
|
viaAL: 'ผ่านแสงแบบปรับได้',
|
|
138
138
|
viaLAN: 'ผ่าน LAN',
|
|
139
139
|
viaWS: 'ผ่าน WS',
|
|
140
|
-
welcome: '
|
|
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
141
|
wsHostRec: 'ได้รับโฮสต์เว็บซ็อกเก็ต',
|
|
142
142
|
wsLogin: 'กำลังส่งคำขอเข้าสู่ระบบ WS',
|
|
143
143
|
wsLoginErr: 'ได้รับพารามิเตอร์ WS ที่ไม่รู้จัก',
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"displayName": "Homebridge eWeLink",
|
|
4
4
|
"alias": "eWeLink",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"version": "12.
|
|
6
|
+
"version": "12.6.1",
|
|
7
7
|
"description": "Homebridge plugin to integrate eWeLink devices into HomeKit.",
|
|
8
8
|
"author": {
|
|
9
9
|
"name": "bwp91",
|
|
@@ -69,6 +69,6 @@
|
|
|
69
69
|
"ws": "^8.18.3"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@antfu/eslint-config": "^4.
|
|
72
|
+
"@antfu/eslint-config": "^4.17.0"
|
|
73
73
|
}
|
|
74
74
|
}
|