@homebridge-plugins/homebridge-meross 10.9.0 → 10.10.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 CHANGED
@@ -2,6 +2,26 @@
2
2
 
3
3
  All notable changes to homebridge-meross will be documented in this file.
4
4
 
5
+ ## v10.10.1 (2025-07-18)
6
+
7
+ ### Other Changes
8
+
9
+ - add maintainer message
10
+
11
+ ## v10.10.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
  ## v10.9.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
@@ -27,6 +27,8 @@ Homebridge plugin to integrate Meross devices into HomeKit
27
27
  - supports configuring devices for local-only control without your Meross credentials
28
28
  - can ignore any HomeKit-native devices you have using the configuration
29
29
 
30
+ > 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 😄
31
+
30
32
  ### Prerequisites
31
33
 
32
34
  - 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/127397024-8b15fc07-f31b-44bd-89e3-51d738d2609a.png"
@@ -38,7 +74,7 @@
38
74
  <select class="form-control" id="deviceSelect"></select>
39
75
  </div>
40
76
  </form>
41
- <table class="table w-100" id="deviceTable" style="display: none;">
77
+ <table class="table w-100 mt-3" id="deviceTable" style="display: none;">
42
78
  <thead>
43
79
  <tr class="table-active">
44
80
  <th scope="col" style="width: 40%;">Device Name</th>
@@ -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
  diffColourMode: 'E962F001-079E-48FF-8F27-9C2605A29F52',
9
5
  diffRainbowMode: 'E962F002-079E-48FF-8F27-9C2605A29F52',
@@ -20,133 +16,163 @@ export default class {
20
16
  babySceneThree: 'E962F013-079E-48FF-8F27-9C2605A29F52',
21
17
  babySceneFour: 'E962F014-079E-48FF-8F27-9C2605A29F52',
22
18
  }
23
- const self = this
24
- this.DiffColourMode = function DiffColourMode() {
25
- self.hapChar.call(this, 'Colour Mode', self.uuids.diffColourMode)
26
- this.setProps({
27
- format: api.hap.Formats.BOOL,
28
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
29
- })
30
- this.value = this.getDefaultValue()
19
+
20
+ const uuids = this.uuids
21
+
22
+ this.DiffColourMode = class extends api.hap.Characteristic {
23
+ constructor() {
24
+ super('Colour Mode', uuids.diffColourMode)
25
+ this.setProps({
26
+ format: api.hap.Formats.BOOL,
27
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
28
+ })
29
+ this.value = this.getDefaultValue()
30
+ }
31
31
  }
32
- this.DiffRainbowMode = function DiffRainbowMode() {
33
- self.hapChar.call(this, 'Rainbow Mode', self.uuids.diffRainbowMode)
34
- this.setProps({
35
- format: api.hap.Formats.BOOL,
36
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
37
- })
38
- this.value = this.getDefaultValue()
32
+
33
+ this.DiffRainbowMode = class extends api.hap.Characteristic {
34
+ constructor() {
35
+ super('Rainbow Mode', uuids.diffRainbowMode)
36
+ this.setProps({
37
+ format: api.hap.Formats.BOOL,
38
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
39
+ })
40
+ this.value = this.getDefaultValue()
41
+ }
39
42
  }
40
- this.DiffTemperatureMode = function DiffTemperatureMode() {
41
- self.hapChar.call(this, 'Temperature Mode', self.uuids.diffTemperatureMode)
42
- this.setProps({
43
- format: api.hap.Formats.BOOL,
44
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
45
- })
46
- this.value = this.getDefaultValue()
43
+
44
+ this.DiffTemperatureMode = class extends api.hap.Characteristic {
45
+ constructor() {
46
+ super('Temperature Mode', uuids.diffTemperatureMode)
47
+ this.setProps({
48
+ format: api.hap.Formats.BOOL,
49
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
50
+ })
51
+ this.value = this.getDefaultValue()
52
+ }
47
53
  }
48
- this.ValveHeatMode = function ValveHeatMode() {
49
- self.hapChar.call(this, 'Heat Mode', self.uuids.valveHeatMode)
50
- this.setProps({
51
- format: api.hap.Formats.BOOL,
52
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
53
- })
54
- this.value = this.getDefaultValue()
54
+
55
+ this.ValveHeatMode = class extends api.hap.Characteristic {
56
+ constructor() {
57
+ super('Heat Mode', uuids.valveHeatMode)
58
+ this.setProps({
59
+ format: api.hap.Formats.BOOL,
60
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
61
+ })
62
+ this.value = this.getDefaultValue()
63
+ }
55
64
  }
56
- this.ValveCoolMode = function ValveCoolMode() {
57
- self.hapChar.call(this, 'Cool Mode', self.uuids.valveCoolMode)
58
- this.setProps({
59
- format: api.hap.Formats.BOOL,
60
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
61
- })
62
- this.value = this.getDefaultValue()
65
+
66
+ this.ValveCoolMode = class extends api.hap.Characteristic {
67
+ constructor() {
68
+ super('Cool Mode', uuids.valveCoolMode)
69
+ this.setProps({
70
+ format: api.hap.Formats.BOOL,
71
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
72
+ })
73
+ this.value = this.getDefaultValue()
74
+ }
63
75
  }
64
- this.ValveAutoMode = function ValveAutoMode() {
65
- self.hapChar.call(this, 'Auto Mode', self.uuids.valveAutoMode)
66
- this.setProps({
67
- format: api.hap.Formats.BOOL,
68
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
69
- })
70
- this.value = this.getDefaultValue()
76
+
77
+ this.ValveAutoMode = class extends api.hap.Characteristic {
78
+ constructor() {
79
+ super('Auto Mode', uuids.valveAutoMode)
80
+ this.setProps({
81
+ format: api.hap.Formats.BOOL,
82
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
83
+ })
84
+ this.value = this.getDefaultValue()
85
+ }
71
86
  }
72
- this.ValveEconomyMode = function ValveEconomyMode() {
73
- self.hapChar.call(this, 'Economy Mode', self.uuids.valveEconomyMode)
74
- this.setProps({
75
- format: api.hap.Formats.BOOL,
76
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
77
- })
78
- this.value = this.getDefaultValue()
87
+
88
+ this.ValveEconomyMode = class extends api.hap.Characteristic {
89
+ constructor() {
90
+ super('Economy Mode', uuids.valveEconomyMode)
91
+ this.setProps({
92
+ format: api.hap.Formats.BOOL,
93
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
94
+ })
95
+ this.value = this.getDefaultValue()
96
+ }
79
97
  }
80
- this.ValveWindowOpen = function ValveWindowOpen() {
81
- self.hapChar.call(this, 'Window Open', self.uuids.valveWindowOpen)
82
- this.setProps({
83
- format: api.hap.Formats.BOOL,
84
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
85
- })
86
- this.value = this.getDefaultValue()
98
+
99
+ this.ValveWindowOpen = class extends api.hap.Characteristic {
100
+ constructor() {
101
+ super('Window Open', uuids.valveWindowOpen)
102
+ this.setProps({
103
+ format: api.hap.Formats.BOOL,
104
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
105
+ })
106
+ this.value = this.getDefaultValue()
107
+ }
87
108
  }
88
- this.LightNightWarm = function LightNightWarm() {
89
- self.hapChar.call(this, 'Night Light Warm', self.uuids.lightNightWarm)
90
- this.setProps({
91
- format: api.hap.Formats.BOOL,
92
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
93
- })
94
- this.value = this.getDefaultValue()
109
+
110
+ this.LightNightWarm = class extends api.hap.Characteristic {
111
+ constructor() {
112
+ super('Night Light Warm', uuids.lightNightWarm)
113
+ this.setProps({
114
+ format: api.hap.Formats.BOOL,
115
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
116
+ })
117
+ this.value = this.getDefaultValue()
118
+ }
95
119
  }
96
- this.LightNightWhite = function LightNightWhite() {
97
- self.hapChar.call(this, 'Night Light White', self.uuids.lightNightWhite)
98
- this.setProps({
99
- format: api.hap.Formats.BOOL,
100
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
101
- })
102
- this.value = this.getDefaultValue()
120
+
121
+ this.LightNightWhite = class extends api.hap.Characteristic {
122
+ constructor() {
123
+ super('Night Light White', uuids.lightNightWhite)
124
+ this.setProps({
125
+ format: api.hap.Formats.BOOL,
126
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
127
+ })
128
+ this.value = this.getDefaultValue()
129
+ }
103
130
  }
104
- this.BabySceneOne = function BabySceneOne() {
105
- self.hapChar.call(this, 'Baby Scene 1', self.uuids.babySceneOne)
106
- this.setProps({
107
- format: api.hap.Formats.BOOL,
108
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
109
- })
110
- this.value = this.getDefaultValue()
131
+
132
+ this.BabySceneOne = class extends api.hap.Characteristic {
133
+ constructor() {
134
+ super('Baby Scene 1', uuids.babySceneOne)
135
+ this.setProps({
136
+ format: api.hap.Formats.BOOL,
137
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
138
+ })
139
+ this.value = this.getDefaultValue()
140
+ }
111
141
  }
112
- this.BabySceneTwo = function BabySceneTwo() {
113
- self.hapChar.call(this, 'Baby Scene 2', self.uuids.babySceneTwo)
114
- this.setProps({
115
- format: api.hap.Formats.BOOL,
116
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
117
- })
118
- this.value = this.getDefaultValue()
142
+
143
+ this.BabySceneTwo = class extends api.hap.Characteristic {
144
+ constructor() {
145
+ super('Baby Scene 2', uuids.babySceneTwo)
146
+ this.setProps({
147
+ format: api.hap.Formats.BOOL,
148
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
149
+ })
150
+ this.value = this.getDefaultValue()
151
+ }
119
152
  }
120
- this.BabySceneThree = function BabySceneThree() {
121
- self.hapChar.call(this, 'Baby Scene 3', self.uuids.babySceneThree)
122
- this.setProps({
123
- format: api.hap.Formats.BOOL,
124
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
125
- })
126
- this.value = this.getDefaultValue()
153
+
154
+ this.BabySceneThree = class extends api.hap.Characteristic {
155
+ constructor() {
156
+ super('Baby Scene 3', uuids.babySceneThree)
157
+ this.setProps({
158
+ format: api.hap.Formats.BOOL,
159
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
160
+ })
161
+ this.value = this.getDefaultValue()
162
+ }
127
163
  }
128
- this.BabySceneFour = function BabySceneFour() {
129
- self.hapChar.call(this, 'Baby Scene 4', self.uuids.babySceneFour)
130
- this.setProps({
131
- format: api.hap.Formats.BOOL,
132
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
133
- })
134
- this.value = this.getDefaultValue()
164
+
165
+ this.BabySceneFour = class extends api.hap.Characteristic {
166
+ constructor() {
167
+ super('Baby Scene 4', uuids.babySceneFour)
168
+ this.setProps({
169
+ format: api.hap.Formats.BOOL,
170
+ perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.PAIRED_WRITE, api.hap.Perms.NOTIFY],
171
+ })
172
+ this.value = this.getDefaultValue()
173
+ }
135
174
  }
136
- inherits(this.DiffColourMode, this.hapChar)
137
- inherits(this.DiffRainbowMode, this.hapChar)
138
- inherits(this.DiffTemperatureMode, this.hapChar)
139
- inherits(this.ValveHeatMode, this.hapChar)
140
- inherits(this.ValveCoolMode, this.hapChar)
141
- inherits(this.ValveAutoMode, this.hapChar)
142
- inherits(this.ValveEconomyMode, this.hapChar)
143
- inherits(this.ValveWindowOpen, this.hapChar)
144
- inherits(this.LightNightWarm, this.hapChar)
145
- inherits(this.LightNightWhite, this.hapChar)
146
- inherits(this.BabySceneOne, this.hapChar)
147
- inherits(this.BabySceneTwo, this.hapChar)
148
- inherits(this.BabySceneThree, this.hapChar)
149
- inherits(this.BabySceneFour, this.hapChar)
175
+
150
176
  this.DiffColourMode.UUID = this.uuids.diffColourMode
151
177
  this.DiffRainbowMode.UUID = this.uuids.diffRainbowMode
152
178
  this.DiffTemperatureMode.UUID = this.uuids.diffTemperatureMode
@@ -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
- const self = this
19
- this.CurrentConsumption = function CurrentConsumption() {
20
- self.hapChar.call(this, 'Current Consumption', self.uuids.currentConsumption)
21
- this.setProps({
22
- format: api.hap.Formats.UINT16,
23
- unit: 'W',
24
- maxValue: 100000,
25
- minValue: 0,
26
- minStep: 1,
27
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
28
- })
29
- this.value = this.getDefaultValue()
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
- this.TotalConsumption = function TotalConsumption() {
32
- self.hapChar.call(this, 'Total Consumption', self.uuids.totalConsumption)
33
- this.setProps({
34
- format: api.hap.Formats.FLOAT,
35
- unit: 'kWh',
36
- maxValue: 100000000000,
37
- minValue: 0,
38
- minStep: 0.01,
39
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
40
- })
41
- this.value = this.getDefaultValue()
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
- this.Voltage = function Voltage() {
44
- self.hapChar.call(this, 'Voltage', self.uuids.voltage)
45
- this.setProps({
46
- format: api.hap.Formats.FLOAT,
47
- unit: 'V',
48
- maxValue: 100000000000,
49
- minValue: 0,
50
- minStep: 1,
51
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
52
- })
53
- this.value = this.getDefaultValue()
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
- this.ElectricCurrent = function ElectricCurrent() {
56
- self.hapChar.call(this, 'Electric Current', self.uuids.electricCurrent)
57
- this.setProps({
58
- format: api.hap.Formats.FLOAT,
59
- unit: 'A',
60
- maxValue: 100000000000,
61
- minValue: 0,
62
- minStep: 0.1,
63
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
64
- })
65
- this.value = this.getDefaultValue()
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
- this.ResetTotal = function ResetTotal() {
68
- self.hapChar.call(this, 'Reset Total', self.uuids.resetTotal)
69
- this.setProps({
70
- format: api.hap.Formats.UINT32,
71
- unit: api.hap.Units.seconds,
72
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
73
- })
74
- this.value = this.getDefaultValue()
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
- this.LastActivation = function LastActivation() {
77
- self.hapChar.call(this, 'Last Activation', self.uuids.lastActivation)
78
- this.setProps({
79
- format: api.hap.Formats.UINT32,
80
- unit: api.hap.Units.SECONDS,
81
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
82
- })
83
- this.value = this.getDefaultValue()
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
- this.OpenDuration = function OpenDuration() {
86
- self.hapChar.call(this, 'Open Duration', self.uuids.openDuration)
87
- this.setProps({
88
- format: api.hap.Formats.UINT32,
89
- unit: api.hap.Units.SECONDS,
90
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
91
- })
92
- this.value = this.getDefaultValue()
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
- this.ClosedDuration = function ClosedDuration() {
95
- self.hapChar.call(this, 'Closed Duration', self.uuids.closedDuration)
96
- this.setProps({
97
- format: api.hap.Formats.UINT32,
98
- unit: api.hap.Units.SECONDS,
99
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY, api.hap.Perms.PAIRED_WRITE],
100
- })
101
- this.value = this.getDefaultValue()
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
- this.TimesOpened = function TimesOpened() {
104
- self.hapChar.call(this, 'Times Opened', self.uuids.timesOpened)
105
- this.setProps({
106
- format: api.hap.Formats.UINT32,
107
- perms: [api.hap.Perms.PAIRED_READ, api.hap.Perms.NOTIFY],
108
- })
109
- this.value = this.getDefaultValue()
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
- inherits(this.CurrentConsumption, this.hapChar)
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
@@ -109,6 +109,6 @@ export default {
109
109
  storageWriteErr: 'could not save accessory to file as',
110
110
  timeout: 'the request timed out',
111
111
  viaAL: 'via adaptive lighting',
112
- welcome: 'This plugin has been made with by bwp91, please consider a on GitHub if you are finding it useful!',
112
+ 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 😄',
113
113
  wrongDevice: 'queried IP belongs to a different Meross device',
114
114
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@homebridge-plugins/homebridge-meross",
3
3
  "alias": "Meross",
4
4
  "type": "module",
5
- "version": "10.9.0",
5
+ "version": "10.10.1",
6
6
  "description": "Homebridge plugin to integrate Meross devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",
@@ -58,12 +58,12 @@
58
58
  "dependencies": {
59
59
  "@homebridge/plugin-ui-utils": "^2.1.0",
60
60
  "axios": "^1.10.0",
61
- "mqtt": "^5.13.2",
61
+ "mqtt": "^5.13.3",
62
62
  "node-persist": "^4.0.4",
63
63
  "p-queue": "^8.1.0",
64
64
  "p-timeout": "^6.1.4"
65
65
  },
66
66
  "devDependencies": {
67
- "@antfu/eslint-config": "^4.16.2"
67
+ "@antfu/eslint-config": "^4.17.0"
68
68
  }
69
69
  }