@homebridge-plugins/homebridge-meross 10.8.1-beta.2 → 10.8.2

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
@@ -8,6 +8,23 @@ This project tries to adhere to [Semantic Versioning](http://semver.org/). In pr
8
8
  - `MINOR` version when a new device type is added, or when a new feature is added that is backwards-compatible
9
9
  - `PATCH` version when backwards-compatible bug fixes are implemented
10
10
 
11
+ ## v10.8.2 (2025-02-24)
12
+
13
+ ### Changed
14
+
15
+ - updated dependencies
16
+
17
+ ## v10.8.1 (2024-12-12)
18
+
19
+ ### Changed
20
+
21
+ - Bump `node` recommended versions to `v18.20.5` or `v20.18.1` or `v22.12.0`
22
+ - Dependency updates
23
+
24
+ ### Fixed
25
+
26
+ - Issue with `MSG100` on node 22: `Missing expected CR after response line`
27
+
11
28
  ## v10.8.0 (2024-10-13)
12
29
 
13
30
  ### Added
package/eslint.config.js CHANGED
@@ -32,6 +32,7 @@ export default antfu(
32
32
  ],
33
33
  order: 'asc',
34
34
  type: 'natural',
35
+ newlinesBetween: 'always',
35
36
  },
36
37
  ],
37
38
  'perfectionist/sort-named-exports': 'error',
@@ -109,11 +109,11 @@ export default class {
109
109
 
110
110
  // Add the tv service if it doesn't already exist
111
111
  this.service = this.accessory.getService(this.hapServ.Television)
112
- || this.accessory.addService(this.hapServ.Television)
112
+ || this.accessory.addService(this.hapServ.Television)
113
113
 
114
114
  // Add a lightbulb service to the light accessory if it doesn't exist
115
115
  this.serviceLight = this.accessoryLight.getService(this.hapServ.Lightbulb)
116
- || this.accessoryLight.addService(this.hapServ.Lightbulb)
116
+ || this.accessoryLight.addService(this.hapServ.Lightbulb)
117
117
 
118
118
  // Remove any old tv speaker services
119
119
  if (this.accessory.getService(this.hapServ.TelevisionSpeaker)) {
@@ -17,7 +17,7 @@ export default class {
17
17
  // Set up variables from the accessory
18
18
  this.accessory = accessory
19
19
  this.inUsePowerThreshold = this.accessory.context.options.inUsePowerThreshold
20
- || platformConsts.defaultValues.inUsePowerThreshold
20
+ || platformConsts.defaultValues.inUsePowerThreshold
21
21
  this.name = accessory.displayName
22
22
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
23
23
  ? platform.config.cloudRefreshRate
@@ -54,7 +54,7 @@ export default class {
54
54
 
55
55
  // Add the heater service if it doesn't already exist
56
56
  this.service = this.accessory.getService(this.hapServ.HeaterCooler)
57
- || this.accessory.addService(this.hapServ.HeaterCooler)
57
+ || this.accessory.addService(this.hapServ.HeaterCooler)
58
58
 
59
59
  // Set custom properties of the current temperature characteristic
60
60
  this.service.getCharacteristic(this.hapChar.CurrentTemperature).setProps({
@@ -84,7 +84,7 @@ export default class {
84
84
  // Initialise these caches now since they aren't determined by the initial externalUpdate()
85
85
  this.cacheState = this.service.getCharacteristic(this.hapChar.Active).value === 1
86
86
  this.cacheCool = this.cacheState
87
- && this.service.getCharacteristic(this.hapChar.TargetHeaterCoolerState).value === 3
87
+ && this.service.getCharacteristic(this.hapChar.TargetHeaterCoolerState).value === 3
88
88
 
89
89
  // Pass the accessory to Fakegato to set up with Eve
90
90
  this.accessory.eveService = new platform.eveService('custom', this.accessory, { log: () => {} })
@@ -70,11 +70,11 @@ export default class {
70
70
 
71
71
  // Add the diffuser (fan) service if it doesn't already exist
72
72
  this.fanService = this.accessory.getService('Diffuser')
73
- || this.accessory.addService(this.hapServ.Fan, 'Diffuser', 'diffuser')
73
+ || this.accessory.addService(this.hapServ.Fan, 'Diffuser', 'diffuser')
74
74
 
75
75
  // Add the lightbulb service if it doesn't already exist
76
76
  this.lightService = this.accessory.getService('Light')
77
- || this.accessory.addService(this.hapServ.Lightbulb, 'Light', 'light')
77
+ || this.accessory.addService(this.hapServ.Lightbulb, 'Light', 'light')
78
78
 
79
79
  // Add the set handler to the diffuser (fan) on/off service
80
80
  this.fanService
package/lib/device/fan.js CHANGED
@@ -69,11 +69,11 @@ export default class {
69
69
 
70
70
  // Add the fan service if it doesn't already exist
71
71
  this.fanService = this.accessory.getService('Fan')
72
- || this.accessory.addService(this.hapServ.Fan, 'Fan', 'fan')
72
+ || this.accessory.addService(this.hapServ.Fan, 'Fan', 'fan')
73
73
 
74
74
  // Add the lightbulb service if it doesn't already exist
75
75
  this.lightService = this.accessory.getService('Light')
76
- || this.accessory.addService(this.hapServ.Lightbulb, 'Light', 'light')
76
+ || this.accessory.addService(this.hapServ.Lightbulb, 'Light', 'light')
77
77
 
78
78
  // Add the set handler to the fan on/off service
79
79
  this.fanService
@@ -18,7 +18,7 @@ export default class {
18
18
  // Set up variables from the accessory
19
19
  this.accessory = accessory
20
20
  this.operationTime = this.accessory.context.options.garageDoorOpeningTime
21
- || platformConsts.defaultValues.garageDoorOpeningTime
21
+ || platformConsts.defaultValues.garageDoorOpeningTime
22
22
  this.name = accessory.displayName
23
23
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
24
24
  ? platform.config.cloudRefreshRate
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the garage door service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.GarageDoorOpener)
42
- || this.accessory.addService(this.hapServ.GarageDoorOpener)
42
+ || this.accessory.addService(this.hapServ.GarageDoorOpener)
43
43
 
44
44
  // Add some extra Eve characteristics
45
45
  if (!this.service.testCharacteristic(this.eveChar.LastActivation)) {
@@ -202,7 +202,7 @@ export default class {
202
202
  await this.platform.sendUpdate(this.accessory, {
203
203
  namespace,
204
204
  payload,
205
- }, { insecureHTTPParser: true })
205
+ })
206
206
  }
207
207
 
208
208
  // Update the cache target state if different
@@ -315,7 +315,7 @@ export default class {
315
315
  const res = await this.platform.sendUpdate(this.accessory, {
316
316
  namespace: 'Appliance.System.All',
317
317
  payload: {},
318
- }, { insecureHTTPParser: true })
318
+ })
319
319
 
320
320
  // Log the received data
321
321
  this.accessory.logDebug(`${platformLang.incPoll}: ${JSON.stringify(res.data)}`)
@@ -17,7 +17,7 @@ export default class {
17
17
  // Set up variables from the accessory
18
18
  this.accessory = accessory
19
19
  this.operationTime = this.accessory.context.options.garageDoorOpeningTime
20
- || platformConsts.defaultValues.garageDoorOpeningTime
20
+ || platformConsts.defaultValues.garageDoorOpeningTime
21
21
  this.name = accessory.displayName
22
22
  this.priAcc = priAcc
23
23
  this.states = {
@@ -30,7 +30,7 @@ export default class {
30
30
 
31
31
  // Add the garage door service if it doesn't already exist
32
32
  this.service = this.accessory.getService(this.hapServ.GarageDoorOpener)
33
- || this.accessory.addService(this.hapServ.GarageDoorOpener)
33
+ || this.accessory.addService(this.hapServ.GarageDoorOpener)
34
34
 
35
35
  // Add some extra Eve characteristics
36
36
  if (!this.service.testCharacteristic(this.eveChar.LastActivation)) {
@@ -17,7 +17,7 @@ export default class {
17
17
  // Set up variables from the accessory
18
18
  this.accessory = accessory
19
19
  this.inUsePowerThreshold = this.accessory.context.options.inUsePowerThreshold
20
- || platformConsts.defaultValues.inUsePowerThreshold
20
+ || platformConsts.defaultValues.inUsePowerThreshold
21
21
  this.name = accessory.displayName
22
22
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
23
23
  ? platform.config.cloudRefreshRate
@@ -54,7 +54,7 @@ export default class {
54
54
 
55
55
  // Add the heater service if it doesn't already exist
56
56
  this.service = this.accessory.getService(this.hapServ.HeaterCooler)
57
- || this.accessory.addService(this.hapServ.HeaterCooler)
57
+ || this.accessory.addService(this.hapServ.HeaterCooler)
58
58
 
59
59
  // Set custom properties of the current temperature characteristic
60
60
  this.service.getCharacteristic(this.hapChar.CurrentTemperature).setProps({
@@ -84,7 +84,7 @@ export default class {
84
84
  // Initialise these caches now since they aren't determined by the initial externalUpdate()
85
85
  this.cacheState = this.service.getCharacteristic(this.hapChar.Active).value === 1
86
86
  this.cacheHeat = this.cacheState
87
- && this.service.getCharacteristic(this.hapChar.TargetHeaterCoolerState).value === 2
87
+ && this.service.getCharacteristic(this.hapChar.TargetHeaterCoolerState).value === 2
88
88
 
89
89
  // Pass the accessory to Fakegato to set up with Eve
90
90
  this.accessory.eveService = new platform.eveService('custom', this.accessory, { log: () => {} })
@@ -19,18 +19,18 @@ export default class {
19
19
 
20
20
  // Add the temperature service if it doesn't already exist
21
21
  this.tempService = this.accessory.getService(this.hapServ.TemperatureSensor)
22
- || this.accessory.addService(this.hapServ.TemperatureSensor)
22
+ || this.accessory.addService(this.hapServ.TemperatureSensor)
23
23
  this.cacheTemp = this.tempService.getCharacteristic(this.hapChar.CurrentTemperature).value
24
24
  this.updateCache()
25
25
 
26
26
  // Add the humidity service if it doesn't already exist
27
27
  this.humiService = this.accessory.getService(this.hapServ.HumiditySensor)
28
- || this.accessory.addService(this.hapServ.HumiditySensor)
28
+ || this.accessory.addService(this.hapServ.HumiditySensor)
29
29
  this.cacheHumi = this.humiService.getCharacteristic(this.hapChar.CurrentRelativeHumidity).value
30
30
 
31
31
  // Add the battery service if it doesn't already exist
32
32
  this.battService = this.accessory.getService(this.hapServ.Battery)
33
- || this.accessory.addService(this.hapServ.Battery)
33
+ || this.accessory.addService(this.hapServ.Battery)
34
34
  this.cacheBatt = this.battService.getCharacteristic(this.hapChar.BatteryLevel).value
35
35
 
36
36
  // Pass the accessory to Fakegato to set up with Eve
@@ -19,7 +19,7 @@ export default class {
19
19
 
20
20
  // Add the battery service if it doesn't already exist
21
21
  this.battService = this.accessory.getService(this.hapServ.Battery)
22
- || this.accessory.addService(this.hapServ.Battery)
22
+ || this.accessory.addService(this.hapServ.Battery)
23
23
  this.cacheBatt = this.battService.getCharacteristic(this.hapChar.BatteryLevel).value
24
24
 
25
25
  // Output the customised options to the log
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the thermostat service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.Thermostat)
42
- || this.accessory.addService(this.hapServ.Thermostat)
42
+ || this.accessory.addService(this.hapServ.Thermostat)
43
43
 
44
44
  this.service
45
45
  .getCharacteristic(this.hapChar.TargetHeatingCoolingState)
@@ -88,7 +88,7 @@ export default class {
88
88
 
89
89
  // Add the lightbulb service if it doesn't already exist
90
90
  this.lightService = this.accessory.getService(this.hapServ.Lightbulb)
91
- || this.accessory.addService(this.hapServ.Lightbulb)
91
+ || this.accessory.addService(this.hapServ.Lightbulb)
92
92
 
93
93
  // Add the set handler to the lightbulb on/off characteristic
94
94
  this.lightService
@@ -24,7 +24,7 @@ export default class {
24
24
  // Set up variables from the accessory
25
25
  this.accessory = accessory
26
26
  this.alShift = this.accessory.context.options.adaptiveLightingShift
27
- || platformConsts.defaultValues.adaptiveLightingShift
27
+ || platformConsts.defaultValues.adaptiveLightingShift
28
28
  this.brightnessStep = this.accessory.context.options.brightnessStep || platformConsts.defaultValues.brightnessStep
29
29
  this.brightnessStep = Math.min(this.brightnessStep, 100)
30
30
  this.name = accessory.displayName
@@ -41,7 +41,7 @@ export default class {
41
41
 
42
42
  // Add the lightbulb service if it doesn't already exist
43
43
  this.service = this.accessory.getService(this.hapServ.Lightbulb)
44
- || this.accessory.addService(this.hapServ.Lightbulb)
44
+ || this.accessory.addService(this.hapServ.Lightbulb)
45
45
 
46
46
  // If adaptive lighting has just been disabled then remove and re-add service to hide AL icon
47
47
  if (this.alShift === -1 && this.accessory.context.adaptiveLighting) {
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the lightbulb service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.Lightbulb)
42
- || this.accessory.addService(this.hapServ.Lightbulb)
42
+ || this.accessory.addService(this.hapServ.Lightbulb)
43
43
 
44
44
  // Add the set handler to the lightbulb on/off characteristic
45
45
  this.service
@@ -30,7 +30,7 @@ export default class {
30
30
  // Set up variables from the accessory
31
31
  this.accessory = accessory
32
32
  this.alShift = this.accessory.context.options.adaptiveLightingShift
33
- || platformConsts.defaultValues.adaptiveLightingShift
33
+ || platformConsts.defaultValues.adaptiveLightingShift
34
34
  this.brightnessStep = this.accessory.context.options.brightnessStep || platformConsts.defaultValues.brightnessStep
35
35
  this.brightnessStep = Math.min(this.brightnessStep, 100)
36
36
  this.cacheMode = 'rgb'
@@ -47,7 +47,7 @@ export default class {
47
47
 
48
48
  // Add the lightbulb service if it doesn't already exist
49
49
  this.service = this.accessory.getService(this.hapServ.Lightbulb)
50
- || this.accessory.addService(this.hapServ.Lightbulb)
50
+ || this.accessory.addService(this.hapServ.Lightbulb)
51
51
 
52
52
  // If adaptive lighting has just been disabled then remove and re-add service to hide AL icon
53
53
  if (this.alShift === -1 && this.accessory.context.adaptiveLighting) {
@@ -38,7 +38,7 @@ export default class {
38
38
 
39
39
  // Add the outlet service if it doesn't already exist
40
40
  this.service = this.accessory.getService(this.hapServ.Outlet)
41
- || this.accessory.addService(this.hapServ.Outlet)
41
+ || this.accessory.addService(this.hapServ.Outlet)
42
42
 
43
43
  // Add the set handler to the switch on/off characteristic
44
44
  this.service
@@ -18,7 +18,7 @@ export default class {
18
18
  // Set up variables from the accessory
19
19
  this.accessory = accessory
20
20
  this.inUsePowerThreshold = this.accessory.context.options.inUsePowerThreshold
21
- || platformConsts.defaultValues.inUsePowerThreshold
21
+ || platformConsts.defaultValues.inUsePowerThreshold
22
22
  this.name = accessory.displayName
23
23
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
24
24
  ? platform.config.cloudRefreshRate
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the outlet service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.Outlet)
42
- || this.accessory.addService(this.hapServ.Outlet)
42
+ || this.accessory.addService(this.hapServ.Outlet)
43
43
 
44
44
  // Add the set handler to the switch on/off characteristic
45
45
  this.service
@@ -18,7 +18,7 @@ export default class {
18
18
  // Set up variables from the accessory
19
19
  this.accessory = accessory
20
20
  this.inUsePowerThreshold = this.accessory.context.options.inUsePowerThreshold
21
- || platformConsts.defaultValues.inUsePowerThreshold
21
+ || platformConsts.defaultValues.inUsePowerThreshold
22
22
  this.name = accessory.displayName
23
23
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
24
24
  ? platform.config.cloudRefreshRate
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the purifier service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.AirPurifier)
42
- || this.accessory.addService(this.hapServ.AirPurifier)
42
+ || this.accessory.addService(this.hapServ.AirPurifier)
43
43
 
44
44
  // Add options to the purifier target state characteristic
45
45
  this.service
@@ -46,7 +46,7 @@ export default class {
46
46
 
47
47
  // Add the purifier service if it doesn't already exist
48
48
  this.service = this.accessory.getService(this.hapServ.AirPurifier)
49
- || this.accessory.addService(this.hapServ.AirPurifier)
49
+ || this.accessory.addService(this.hapServ.AirPurifier)
50
50
 
51
51
  // Add the set handler to the purifier on/off characteristic
52
52
  this.service
@@ -37,11 +37,11 @@ export default class {
37
37
 
38
38
  // Add the switch services
39
39
  this.serviceOpen = this.accessory.getService('Open')
40
- || this.accessory.addService(this.hapServ.Switch, 'Open', 'open')
40
+ || this.accessory.addService(this.hapServ.Switch, 'Open', 'open')
41
41
  this.serviceClose = this.accessory.getService('Close')
42
- || this.accessory.addService(this.hapServ.Switch, 'Close', 'close')
42
+ || this.accessory.addService(this.hapServ.Switch, 'Close', 'close')
43
43
  this.serviceStop = this.accessory.getService('Stop')
44
- || this.accessory.addService(this.hapServ.Switch, 'Stop', 'stop')
44
+ || this.accessory.addService(this.hapServ.Switch, 'Stop', 'stop')
45
45
 
46
46
  // Add the set handler to the open switch service
47
47
  this.serviceOpen
@@ -41,12 +41,12 @@ export default class {
41
41
 
42
42
  // Add an occupancy sensor if it doesn't already exist
43
43
  this.occupancyService = this.accessory.getService(this.hapServ.OccupancySensor)
44
- || this.accessory.addService(this.hapServ.OccupancySensor)
44
+ || this.accessory.addService(this.hapServ.OccupancySensor)
45
45
  this.cacheOccupancy = this.occupancyService.getCharacteristic(this.hapChar.OccupancyDetected).value
46
46
 
47
47
  // Add the light sensor if it doesn't already exist
48
48
  this.lightService = this.accessory.getService(this.hapServ.LightSensor)
49
- || this.accessory.addService(this.hapServ.LightSensor)
49
+ || this.accessory.addService(this.hapServ.LightSensor)
50
50
  this.cacheLux = this.lightService.getCharacteristic(this.hapChar.CurrentAmbientLightLevel).value
51
51
 
52
52
  // Create the queue used for sending device requests
@@ -38,7 +38,7 @@ export default class {
38
38
 
39
39
  // Add the switch service if it doesn't already exist
40
40
  this.service = this.accessory.getService(this.hapServ.Switch)
41
- || this.accessory.addService(this.hapServ.Switch)
41
+ || this.accessory.addService(this.hapServ.Switch)
42
42
 
43
43
  // Add the set handler to the switch on/off characteristic
44
44
  this.service
@@ -18,7 +18,7 @@ export default class {
18
18
  // Set up variables from the accessory
19
19
  this.accessory = accessory
20
20
  this.inUsePowerThreshold = this.accessory.context.options.inUsePowerThreshold
21
- || platformConsts.defaultValues.inUsePowerThreshold
21
+ || platformConsts.defaultValues.inUsePowerThreshold
22
22
  this.name = accessory.displayName
23
23
  const cloudRefreshRate = hasProperty(platform.config, 'cloudRefreshRate')
24
24
  ? platform.config.cloudRefreshRate
@@ -39,7 +39,7 @@ export default class {
39
39
 
40
40
  // Add the switch service if it doesn't already exist
41
41
  this.service = this.accessory.getService(this.hapServ.Switch)
42
- || this.accessory.addService(this.hapServ.Switch)
42
+ || this.accessory.addService(this.hapServ.Switch)
43
43
 
44
44
  // Add the set handler to the switch on/off characteristic
45
45
  this.service
@@ -45,7 +45,7 @@ export default class {
45
45
 
46
46
  // Add the thermostat service if it doesn't already exist
47
47
  this.service = this.accessory.getService(this.hapServ.Thermostat)
48
- || this.accessory.addService(this.hapServ.Thermostat)
48
+ || this.accessory.addService(this.hapServ.Thermostat)
49
49
 
50
50
  this.service
51
51
  .getCharacteristic(this.hapChar.TargetHeatingCoolingState)
package/lib/platform.js CHANGED
@@ -1137,7 +1137,7 @@ export default class {
1137
1137
  }
1138
1138
  }
1139
1139
 
1140
- async sendUpdate(accessory, toSend, opts = {}) {
1140
+ async sendUpdate(accessory, toSend) {
1141
1141
  // Variable res is the response from either the cloud mqtt update or local http request
1142
1142
  let res
1143
1143
 
@@ -1203,7 +1203,7 @@ export default class {
1203
1203
  data,
1204
1204
  responseType: 'json',
1205
1205
  timeout: toSend.method === 'GET' || accessory.context.connection === 'local' ? 9000 : 4000,
1206
- insecureHTTPParser: !!opts.insecureHTTPParser,
1206
+ insecureHTTPParser: true,
1207
1207
  })
1208
1208
 
1209
1209
  // Check the response properties based on whether it is a control or request update
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.8.1-beta.2",
5
+ "version": "10.8.2",
6
6
  "description": "Homebridge plugin to integrate Meross devices into HomeKit.",
7
7
  "author": {
8
8
  "name": "bwp91",
@@ -49,22 +49,22 @@
49
49
  "main": "lib/index.js",
50
50
  "engines": {
51
51
  "homebridge": "^1.6.0 || ^2.0.0-beta.0",
52
- "node": "^18.20.5 || ^20.18.1 || ^22.12.0"
52
+ "node": "^18.20.7 || ^20.18.3 || ^22.14.0"
53
53
  },
54
54
  "scripts": {
55
55
  "lint": "eslint . --fix",
56
56
  "rebuild": "rm -rf package-lock.json && rm -rf node_modules && npm install"
57
57
  },
58
58
  "dependencies": {
59
- "@homebridge/plugin-ui-utils": "^2.0.0",
59
+ "@homebridge/plugin-ui-utils": "^2.0.1",
60
60
  "axios": "^1.7.9",
61
61
  "mqtt": "^5.10.3",
62
- "node-persist": "^4.0.3",
63
- "p-queue": "^8.0.1",
64
- "p-timeout": "^6.1.3"
62
+ "node-persist": "^4.0.4",
63
+ "p-queue": "^8.1.0",
64
+ "p-timeout": "^6.1.4"
65
65
  },
66
66
  "devDependencies": {
67
- "@antfu/eslint-config": "^3.11.2",
68
- "eslint": "^9.16.0"
67
+ "@antfu/eslint-config": "^4.3.0",
68
+ "eslint": "^9.21.0"
69
69
  }
70
70
  }