@camstack/addon-provider-velux 0.2.148 → 0.2.150
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 +13 -0
- package/README.md +87 -2
- package/assets/icon.png +0 -0
- package/dist/addon.js +13812 -2518
- package/dist/addon.mjs +13802 -2514
- package/dist/index.js +13 -5
- package/dist/index.mjs +2 -2
- package/i18n/en.json +4 -5
- package/i18n/it.json +4 -5
- package/package.json +13 -7
- package/assets/icon.svg +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.2.150] - 2026-10-30
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- Fix the Velux addon failing to talk to the gateway when deployed: the bundled output now carries every KLF-200 frame decoder instead of looking for files beside it
|
|
15
|
+
- Velux is now an integration: add it from Integrations (the KLF-200 on your network is offered automatically), test the login, and adopt the Gateway (reboot, firmware, web link), windows with a rain sensor, and covers. The old standalone Velux device is removed; add the gateway again.
|
|
16
|
+
|
|
17
|
+
## [0.2.149] - 2026-10-29
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Velux KLF-200 now connects for real: windows, shutters, blinds and awnings are covers whose state is pushed by the gateway, a roof window's rain sensor is a leak sensor, and a dropped session reconnects by itself (see the addon README for the gateway's two-connection limit)
|
|
22
|
+
|
|
10
23
|
## [0.2.148] - 2026-10-27
|
|
11
24
|
|
|
12
25
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Velux Provider
|
|
2
2
|
|
|
3
|
-
Velux KLF-200 device-provider addon for CamStack
|
|
3
|
+
Velux KLF-200 device-provider addon for CamStack. The gateway's windows, roller shutters, blinds and
|
|
4
|
+
awnings become `cover` devices (positional, no tilt), and a roof window's built-in rain sensor becomes a
|
|
5
|
+
`flood` sensor. State is pushed by the gateway, not polled.
|
|
4
6
|
|
|
5
7
|
<!-- readme:generated:start (derived from the manifest; edit outside this block) -->
|
|
6
8
|
|
|
@@ -18,7 +20,7 @@ Edit these from System, Addons, this addon, Settings (a device's own settings ar
|
|
|
18
20
|
**Connection**
|
|
19
21
|
|
|
20
22
|
- Gateway: Name
|
|
21
|
-
- Connection: Gateway host / IP, Password
|
|
23
|
+
- Connection: Gateway host / IP, Password
|
|
22
24
|
|
|
23
25
|
## Requirements
|
|
24
26
|
|
|
@@ -32,3 +34,86 @@ Edit these from System, Addons, this addon, Settings (a device's own settings ar
|
|
|
32
34
|
See [CHANGELOG.md](./CHANGELOG.md) for what changed in each version.
|
|
33
35
|
|
|
34
36
|
<!-- readme:generated:end -->
|
|
37
|
+
|
|
38
|
+
## Pairing the gateway
|
|
39
|
+
|
|
40
|
+
1. **Free a connection slot first.** The KLF-200 accepts only a few simultaneous API sessions (see below). If
|
|
41
|
+
Home Assistant's VELUX integration is connected to the same gateway, that is fine for one session each, but
|
|
42
|
+
if anything else (a phone app session, ioBroker, a second hub) is also connected, close it before adding the
|
|
43
|
+
gateway here.
|
|
44
|
+
2. In CamStack: Integrations, add **Velux**. Pick the gateway found on your network (a KLF-200 announces itself
|
|
45
|
+
as `VELUX_KLF_…`) or type its **host / IP**, then enter the gateway **password**. **Test** checks the login
|
|
46
|
+
and closes its session at once.
|
|
47
|
+
3. The password is the **WiFi / web password printed on the back of the unit**, not the WiFi network password of
|
|
48
|
+
your router. It is stored in the CamStack keychain; it is never put in an environment variable, a command
|
|
49
|
+
line or a log line.
|
|
50
|
+
4. Open the integration's discovery. The KLF-200 appears as one **Gateway** device (reboot, firmware, link to its
|
|
51
|
+
web page); every window, shutter, blind and awning appears as a cover. A window with a rain sensor appears as
|
|
52
|
+
one container holding the cover and the rain sensor. Adopt the ones you want. Firmware update is not offered:
|
|
53
|
+
the gateway API cannot do it.
|
|
54
|
+
|
|
55
|
+
You do **not** have to disable Home Assistant's integration: one session from each of two clients fits inside the
|
|
56
|
+
gateway's limit. Do disable it (or reload it) if the gateway starts refusing logins, and see the limit below.
|
|
57
|
+
|
|
58
|
+
## The connection limit
|
|
59
|
+
|
|
60
|
+
The KLF-200 API specification (v3.18) allows **two simultaneous API sessions** over its TLS socket on port
|
|
61
|
+
**51200**; a third login is refused until one closes. Separately the gateway **closes a session that is idle for
|
|
62
|
+
15 minutes**.
|
|
63
|
+
|
|
64
|
+
What this addon does about it:
|
|
65
|
+
|
|
66
|
+
- It opens **exactly one** socket per gateway and never a second one (not for commands, not for the rain
|
|
67
|
+
readings). Command, notification and rain traffic share that one session.
|
|
68
|
+
- It sends a state request every **10 minutes** so the idle timer never fires.
|
|
69
|
+
- It enables the gateway's *house status monitor*, so every change (also one made with a remote control) is
|
|
70
|
+
**pushed**; there is no polling loop.
|
|
71
|
+
- When a session ends (the gateway reset it, the network dropped, the password was changed) the reason is logged
|
|
72
|
+
at warning level with the gateway device id, the covers show offline, and a **fresh** session is opened with
|
|
73
|
+
exponential backoff: 2 s, 4 s, 8 s ... capped at 5 minutes. A refused password waits the full 5 minutes
|
|
74
|
+
before the next try, so a wrong password does not hammer the unit.
|
|
75
|
+
|
|
76
|
+
So with Home Assistant connected (1 session) and CamStack (1 session) the gateway is full. A third client
|
|
77
|
+
(for example a phone app on the same network, or a second CamStack hub) will be refused.
|
|
78
|
+
|
|
79
|
+
## Certificate
|
|
80
|
+
|
|
81
|
+
The gateway presents the same self-signed certificate on every unit, and that shared certificate **expired on
|
|
82
|
+
2026-07-12**. The `klf-200-api` library (8.x) accepts only that exact case: the connection is accepted when the
|
|
83
|
+
sole defect is "certificate has expired" **and** the peer's fingerprint equals the pinned VELUX one. Any other
|
|
84
|
+
certificate, expired or not, is rejected. There is no `rejectUnauthorized: false` in this addon.
|
|
85
|
+
|
|
86
|
+
## Cover mapping
|
|
87
|
+
|
|
88
|
+
| KLF-200 actuator | CamStack | Notes |
|
|
89
|
+
| --- | --- | --- |
|
|
90
|
+
| window opener | `cover` (class `window`) | position 0 = closed, 100 = open |
|
|
91
|
+
| roller shutter, swinging shutter, dual shutter | `cover` (`shutter`) | a dual shutter is one cover here |
|
|
92
|
+
| awning, horizontal awning | `cover` (`awning`) | |
|
|
93
|
+
| venetian / external venetian / louvre blind, curtain track | `cover` (`blind`) | no tilt |
|
|
94
|
+
| garage / rolling door opener | `cover` (`garage`) | |
|
|
95
|
+
| gate opener | `cover` (`gate`) | |
|
|
96
|
+
| window opener with rain sensor | extra `flood` sensor ("<name> rain") | role: leak sensor |
|
|
97
|
+
| lights, locks, switches, heating | not exposed | |
|
|
98
|
+
|
|
99
|
+
The wire position runs 0x0000 .. 0xC800 where **0 is fully open**, for every actuator type; CamStack's cover is
|
|
100
|
+
0 = closed .. 100 = open, so `open% = round(100 * (1 - raw / 0xC800))`. A raw value above 0xC800 is a protocol
|
|
101
|
+
marker (target, current, ignore), reported as an unknown position and shown as `stopped`, never `closed`.
|
|
102
|
+
`stop` is sent as the stop marker 0xD200.
|
|
103
|
+
|
|
104
|
+
A cover is identified by the actuator's **serial number**, not by its node id (a node id is only an index that
|
|
105
|
+
the gateway can reuse after a node is removed). A node that reports no serial falls back to its node id.
|
|
106
|
+
|
|
107
|
+
## Rain
|
|
108
|
+
|
|
109
|
+
A window with the integrated rain sensor reports rain as an **opening limitation** (a minimum of 89 % or more).
|
|
110
|
+
The gateway does not push limitation changes, so the addon re-reads it every 5 minutes and each time the window
|
|
111
|
+
stops moving. An unreadable value keeps the previous level.
|
|
112
|
+
|
|
113
|
+
## Known limits
|
|
114
|
+
|
|
115
|
+
- Tilt is not supported (the KLF-200 has no tilt in its cover model).
|
|
116
|
+
- Scenes, groups and the gateway reboot button are not exposed.
|
|
117
|
+
- A dual roller shutter is exposed as one cover (it is two entities in Home Assistant).
|
|
118
|
+
- The vendor library still prints a few lines to `console` itself (a login error text, an expired-certificate
|
|
119
|
+
warning). Those messages never contain the password.
|
package/assets/icon.png
ADDED
|
Binary file
|