homebridge-homeassistant-garagedoor 1.1.3 → 1.1.5
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/README.md +141 -18
- package/index.js +4 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,30 +1,153 @@
|
|
|
1
|
-
|
|
1
|
+
Features ✨
|
|
2
|
+
✅ Native Garage Door in Home app + Siri
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
✅ Config UI X form (no JSON editing)
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
✅ Bidirectional sync (Home app ↔ Home Assistant)
|
|
6
7
|
|
|
8
|
+
✅ Auto-close after OPEN (3s)
|
|
9
|
+
|
|
10
|
+
✅ Real-time polling (30s default)
|
|
11
|
+
|
|
12
|
+
✅ Error 400 fixed (no redundant requests)
|
|
13
|
+
|
|
14
|
+
📦 Installation
|
|
15
|
+
bash
|
|
16
|
+
npm install -g homebridge-homeassistant-garagedoor
|
|
17
|
+
⚙️ Configuration (Config UI X)
|
|
18
|
+
text
|
|
19
|
+
Plugins → HA Garage Door → ADD NEW (+)
|
|
20
|
+
|
|
21
|
+
✅ Name: Puerta1 HA
|
|
22
|
+
✅ HA URL: http://192.168.68.239:8123
|
|
23
|
+
✅ HA Token: eyJhbGciOiJIUzI1NiIs... (Long-Lived Access Token)
|
|
24
|
+
✅ Entity ID: switch.Puerta1
|
|
25
|
+
✅ Poll Interval: 30 (seconds)
|
|
26
|
+
[SAVE] ✓
|
|
27
|
+
🔑 Home Assistant Long-Lived Access Token
|
|
28
|
+
HA → User Profile (👤 bottom-left)
|
|
29
|
+
|
|
30
|
+
Long-Lived Access Tokens → Create Token
|
|
31
|
+
|
|
32
|
+
Name: Homebridge Garage Door
|
|
33
|
+
|
|
34
|
+
Copy token → Paste in Config UI X
|
|
35
|
+
|
|
36
|
+
Token expires: Never (unless revoked)
|
|
37
|
+
|
|
38
|
+
📱 Home App Behavior
|
|
39
|
+
text
|
|
40
|
+
✅ Initial: CERRADA
|
|
41
|
+
✅ Tap → OPEN (3s) → Auto CLOSE
|
|
42
|
+
✅ Siri: "Open/close Puerta1 HA"
|
|
43
|
+
✅ Status: Real-time sync via polling
|
|
44
|
+
🛠️ Manual config.json
|
|
45
|
+
json
|
|
7
46
|
{
|
|
8
|
-
"accessory": "HomeAssistantGarageDoor",
|
|
9
|
-
"name": "
|
|
10
|
-
"haUrl": "http://192.168.68.239:8123",
|
|
11
|
-
"haToken": "
|
|
12
|
-
"entityId": "switch.Puerta1"
|
|
47
|
+
"accessory": "HomeAssistantGarageDoor",
|
|
48
|
+
"name": "Puerta1 HA",
|
|
49
|
+
"haUrl": "http://192.168.68.239:8123",
|
|
50
|
+
"haToken": "eyJhbGciOiJIUzI1NiIs...",
|
|
51
|
+
"entityId": "switch.Puerta1",
|
|
52
|
+
"pollInterval": 30
|
|
13
53
|
}
|
|
14
|
-
|
|
54
|
+
🔍 Logs
|
|
15
55
|
text
|
|
56
|
+
[Puerta1 HA] Initialized - HA: http://192.168.68.239:8123 (switch.Puerta1)
|
|
57
|
+
[Puerta1 HA] Target state: OPEN
|
|
58
|
+
[Puerta1 HA] HA turn_on → 200: []
|
|
59
|
+
[Puerta1 HA] Auto-close en 3s...
|
|
60
|
+
[Puerta1 HA] Target state: CLOSED
|
|
61
|
+
[Puerta1 HA] HA turn_off → 200: []
|
|
62
|
+
[Puerta1 HA] Poll: CLOSED (off)
|
|
63
|
+
🚀 Development
|
|
64
|
+
bash
|
|
65
|
+
cd ~/github/homebridge-homeassistant-garagedoor
|
|
66
|
+
npm version patch
|
|
67
|
+
git add .
|
|
68
|
+
git commit -m "vX.X.X: Update"
|
|
69
|
+
git push
|
|
70
|
+
npm publish --access public
|
|
71
|
+
ESPAÑOL
|
|
72
|
+
🚪 homebridge-homeassistant-garagedoor
|
|
73
|
+
Plugin Homebridge para controlar switches de Home Assistant como puertas de garaje nativas en HomeKit.
|
|
16
74
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- ✅ Always starts **CLOSED** (safe default)
|
|
20
|
-
- ✅ Uses HA REST API (`switch.turn_on/off`)
|
|
21
|
-
- ✅ Full Config UI X support
|
|
22
|
-
- ✅ Works with Docker/Homebridge
|
|
75
|
+
✨ Características
|
|
76
|
+
✅ Puerta de garaje nativa en app Home + Siri
|
|
23
77
|
|
|
24
|
-
|
|
25
|
-
npm install -g homebridge-homeassistant-garagedoor
|
|
78
|
+
✅ Config UI X con formulario automático
|
|
26
79
|
|
|
80
|
+
✅ Sincronización bidireccional (Home ↔ HA)
|
|
81
|
+
|
|
82
|
+
✅ Auto-cierre tras OPEN (3 segundos)
|
|
83
|
+
|
|
84
|
+
✅ Polling en tiempo real (30s por defecto)
|
|
85
|
+
|
|
86
|
+
✅ Error 400 solucionado (sin peticiones redundantes)
|
|
87
|
+
|
|
88
|
+
📦 Instalación
|
|
89
|
+
bash
|
|
90
|
+
npm install -g homebridge-homeassistant-garagedoor
|
|
91
|
+
⚙️ Configuración (Config UI X)
|
|
27
92
|
text
|
|
93
|
+
Plugins → HA Garage Door → NUEVO (+)
|
|
94
|
+
|
|
95
|
+
✅ Nombre: Puerta1 HA
|
|
96
|
+
✅ URL HA: http://192.168.68.239:8123
|
|
97
|
+
✅ Token HA: eyJhbGciOiJIUzI1NiIs... (Long-Lived Access Token)
|
|
98
|
+
✅ Entity ID: switch.Puerta1
|
|
99
|
+
✅ Intervalo Poll: 30 (segundos)
|
|
100
|
+
[GUARDAR] ✓
|
|
101
|
+
🔑 Token Long-Lived Home Assistant
|
|
102
|
+
HA → Perfil Usuario (👤 abajo-izquierda)
|
|
103
|
+
|
|
104
|
+
Long-Lived Access Tokens → Crear Token
|
|
28
105
|
|
|
29
|
-
|
|
106
|
+
Nombre: Homebridge Puerta Garaje
|
|
107
|
+
|
|
108
|
+
Copiar token → Pegar en Config UI X
|
|
109
|
+
|
|
110
|
+
Token caduca: Nunca (salvo revocación manual)
|
|
111
|
+
|
|
112
|
+
📱 Comportamiento App Home
|
|
113
|
+
text
|
|
114
|
+
✅ Inicio: CERRADA
|
|
115
|
+
✅ Toca → ABRE (3s) → Auto CIERRA
|
|
116
|
+
✅ Siri: "Abre/cierra Puerta1 HA"
|
|
117
|
+
✅ Estado: Sincronización en tiempo real
|
|
118
|
+
🛠️ config.json manual
|
|
119
|
+
json
|
|
120
|
+
{
|
|
121
|
+
"accessory": "HomeAssistantGarageDoor",
|
|
122
|
+
"name": "Puerta1 HA",
|
|
123
|
+
"haUrl": "http://192.168.68.239:8123",
|
|
124
|
+
"haToken": "eyJhbGciOiJIUzI1NiIs...",
|
|
125
|
+
"entityId": "switch.Puerta1",
|
|
126
|
+
"pollInterval": 30
|
|
127
|
+
}
|
|
128
|
+
🔍 Logs esperados
|
|
129
|
+
text
|
|
130
|
+
[Puerta1 HA] Initialized - HA: http://192.168.68.239:8123 (switch.Puerta1)
|
|
131
|
+
[Puerta1 HA] Target state: OPEN
|
|
132
|
+
[Puerta1 HA] HA turn_on → 200: []
|
|
133
|
+
[Puerta1 HA] Auto-close en 3s...
|
|
134
|
+
[Puerta1 HA] Target state: CLOSED
|
|
135
|
+
[Puerta1 HA] HA turn_off → 200: []
|
|
136
|
+
[Puerta1 HA] Poll: CLOSED (off)
|
|
137
|
+
📈 Versiones
|
|
138
|
+
v1.1.3 Auto-close tras OPEN (3s)
|
|
139
|
+
v1.1.2 FIX "Cerrando" → CLOSED
|
|
140
|
+
v1.1.1 UI X alias alignment
|
|
141
|
+
v1.1.0 Config UI X schema inline
|
|
142
|
+
v1.0.9 Full config.schema.json
|
|
143
|
+
🤝 Contributing
|
|
144
|
+
bash
|
|
145
|
+
git clone https://github.com/torresyago/homebridge-homeassistant-garagedoor.git
|
|
146
|
+
cd homebridge-homeassistant-garagedoor
|
|
147
|
+
npm install
|
|
148
|
+
npm run build # si existe
|
|
149
|
+
📄 License
|
|
150
|
+
MIT License - see LICENSE
|
|
30
151
|
|
|
152
|
+
⭐ Star this repo if useful!
|
|
153
|
+
¡Dale estrella si te sirve! 🚪✨
|
package/index.js
CHANGED
|
@@ -67,7 +67,10 @@ class HomeAssistantGarageDoor {
|
|
|
67
67
|
);
|
|
68
68
|
|
|
69
69
|
const haState = response.data.state;
|
|
70
|
-
|
|
70
|
+
this.log(`[${this.name}] Poll: ALWAYS CLOSED (forced)`);
|
|
71
|
+
this.currentState = 'CLOSED';
|
|
72
|
+
this.service.setCharacteristic(this.Characteristic.CurrentDoorState, this.Characteristic.CurrentDoorState.CLOSED);
|
|
73
|
+
return;
|
|
71
74
|
|
|
72
75
|
if (this.currentState !== doorState) {
|
|
73
76
|
this.currentState = doorState;
|
package/package.json
CHANGED