@homebridge-plugins/homebridge-ewelink 12.16.1 → 12.16.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 CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  All notable changes to `@homebridge-plugins/homebridge-ewelink` will be documented in this file.
4
4
 
5
+ ## v12.16.3 (Pending Release)
6
+
7
+ ### Changed
8
+
9
+ - fix: fire the button press for R5 and SwitchMan scene controllers when the action time arrives as a number, so HomeKit sees the press (#762)
10
+
11
+ ## v12.16.2 (2026-07-18)
12
+
13
+ ### Changed
14
+
15
+ - chore(deps): dependency updates
16
+
5
17
  ## v12.16.1 (2026-07-17)
6
18
 
7
19
  ### Changed
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <p align="center">
2
- <a href="https://github.com/homebridge-plugins/homebridge-ewelink"><img alt="Homebridge Verified" src="https://user-images.githubusercontent.com/43026681/101325266-63126600-3863-11eb-9382-4a2924f0e540.png" width="600px"></a>
2
+ <a href="https://github.com/homebridge-plugins/homebridge-ewelink"><img alt="Homebridge Verified" src="https://raw.githubusercontent.com/homebridge-plugins/homebridge-ewelink/latest/branding/Homebridge_x_eWeLink.png" width="600px"></a>
3
3
  </p>
4
4
  <span align="center">
5
5
 
@@ -34,7 +34,7 @@ Homebridge plugin to integrate eWeLink devices into HomeKit
34
34
 
35
35
  - [Installation](https://github.com/homebridge-plugins/homebridge-ewelink/wiki/Installation)
36
36
  - [Configuration](https://github.com/homebridge-plugins/homebridge-ewelink/wiki/Configuration)
37
- - [Beta Version](https://github.com/homebridge/homebridge/wiki/How-to-Install-Alternate-Plugin-Versions)
37
+ - [Beta Version](https://github.com/homebridge-plugins/homebridge-ewelink/wiki/Beta-Version)
38
38
  - [Node Version](https://github.com/homebridge-plugins/homebridge-ewelink/wiki/Node-Version)
39
39
 
40
40
  ### Features
@@ -5,7 +5,7 @@
5
5
  "strictValidation": true,
6
6
  "customUi": true,
7
7
  "customUiPath": "./lib/homebridge-ui",
8
- "headerDisplay": "<p align=\"center\"><img width=\"60%\" src=\"https://user-images.githubusercontent.com/43026681/101325266-63126600-3863-11eb-9382-4a2924f0e540.png\"></p><p align=\"center\">For help and support please visit our <a href=\"https://github.com/homebridge-plugins/homebridge-ewelink/wiki\">GitHub Wiki</a>. We hope you find this plugin useful!</p>",
8
+ "headerDisplay": "<p align=\"center\"><img width=\"250px\" src=\"https://raw.githubusercontent.com/homebridge-plugins/homebridge-ewelink/latest/branding/Homebridge_x_eWeLink.png\"></p><p align=\"center\">For help and support please visit our <a href=\"https://github.com/homebridge-plugins/homebridge-ewelink/wiki\">GitHub Wiki</a>. We hope you find this plugin useful!</p>",
9
9
  "schema": {
10
10
  "type": "object",
11
11
  "properties": {
@@ -89,7 +89,10 @@ export default class {
89
89
  setTimeout(() => {
90
90
  this.timeouts[label] = false
91
91
  }, 1000)
92
- const timeDiff = (Date.now() - Date.parse(params.actionTime)) / 1000
92
+ // actionTime may arrive as an ISO string or as an epoch-millis number
93
+ // (the R5 sends a number); new Date() handles both, Date.parse() would
94
+ // return NaN for the number and the button event would never fire (#762)
95
+ const timeDiff = (Date.now() - new Date(params.actionTime).getTime()) / 1000
93
96
  if (timeDiff < 5) {
94
97
  const service = this[`service${label}`]
95
98
  service.updateCharacteristic(this.hapChar.ProgrammableSwitchEvent, params.key)
@@ -73,7 +73,10 @@ export default class {
73
73
  setTimeout(() => {
74
74
  this.timeouts[params.outlet] = false
75
75
  }, 1000)
76
- const timeDiff = (Date.now() - Date.parse(params.actionTime)) / 1000
76
+ // actionTime may arrive as an ISO string or as an epoch-millis number;
77
+ // new Date() handles both, whereas Date.parse() returns NaN for the
78
+ // number and the button event would never fire (#762)
79
+ const timeDiff = (Date.now() - new Date(params.actionTime).getTime()) / 1000
77
80
  if (timeDiff < 5) {
78
81
  this.service.updateCharacteristic(this.hapChar.ProgrammableSwitchEvent, params.outlet)
79
82
  if (params.updateSource && this.enableLogging) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "displayName": "Homebridge eWeLink",
4
4
  "alias": "eWeLink",
5
5
  "type": "module",
6
- "version": "12.16.1",
6
+ "version": "12.16.3-beta.0",
7
7
  "description": "Homebridge plugin to integrate eWeLink devices into HomeKit.",
8
8
  "author": {
9
9
  "name": "bwp91",
@@ -66,7 +66,7 @@
66
66
  "node-persist": "^4.0.4",
67
67
  "p-queue": "^9.3.1",
68
68
  "websocket-as-promised": "^3.0.1",
69
- "ws": "^8.21.0"
69
+ "ws": "^8.21.1"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@antfu/eslint-config": "^9.1.0"