Skip to content

Commit a5131f2

Browse files
authored
Enable local API support for Rexel (#2128)
## Summary - Add `Server.REXEL` to `SERVERS_WITH_LOCAL_API` in `pyoverkiz/const.py`. - Document the Rexel local API setup in the docs. Rexel Energeasy Connect gateways support the local API and the paste-a-token UX, so they should be eligible for the local-or-cloud choice that consumers gate on this list. ## Docs - Added a **Rexel (local)** tab to the getting-started guide with the EConnect app token-generation steps and the supported gateways (Energeasy Connect Rail Din `48`, V2 `57`, V3 `120`, V3 Rail Din `125`). - The example sets `name`/`manufacturer` for Rexel labeling but keeps the default `server` value, since local token auth is only selected when `server` is not a cloud-mapped server like `Server.REXEL`. - Noted Rexel under **Local Token** authentication in core concepts. ## Notes - No tests reference `SERVERS_WITH_LOCAL_API`, so nothing to update there.
1 parent 20f5ae6 commit a5131f2

5 files changed

Lines changed: 133 additions & 29 deletions

File tree

README.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,47 @@ Full documentation is available at **[imicknl.github.io/python-overkiz-api](http
1616

1717
## Supported hubs
1818

19-
- Atlantic Cozytouch
20-
- Bouygues Flexom
21-
- Brandt Smart Control †
22-
- Hitachi Hi Kumo
23-
- Nexity Eugénie
24-
- Rexel Energeasy Connect ‡
25-
- Sauter Cozytouch
26-
- Simu (LiveIn2)
27-
- Somfy Connexoon IO
28-
- Somfy Connexoon RTS
29-
- Somfy TaHoma
30-
- Somfy TaHoma Switch
31-
- Thermor Cozytouch
19+
| Vendor | Cloud | Local |
20+
| --- | :-: | :-: |
21+
| Atlantic Cozytouch || |
22+
| Bouygues Flexom || |
23+
| Brandt Smart Control † || |
24+
| Hexaom HexaConnect || |
25+
| Hitachi Hi Kumo || |
26+
| Nexity Eugénie || |
27+
| Rexel Energeasy Connect ‡ |||
28+
| Sauter Cozytouch || |
29+
| Simu LiveIn2 || |
30+
| Somfy |||
31+
| Thermor Cozytouch || |
32+
| Ubiwizz || |
33+
34+
Local API availability depends on your specific gateway. See the [Getting started guide](https://imicknl.github.io/python-overkiz-api/getting-started/) for the supported gateways and setup.
3235

3336
_This server's authentication method isn't supported yet. To use it, obtain an access token (by sniffing the original app) and create a local user on the Overkiz API platform._
3437

35-
_Requires OAuth credentials provided by Rexel._
38+
_The cloud API requires OAuth credentials provided by Rexel; the local API uses a token from the EConnect app instead._
39+
40+
### Somfy
41+
42+
| Gateway | Cloud | Local |
43+
| --- | :-: | :-: |
44+
| Connexoon IO |||
45+
| Connexoon RTS |||
46+
| TaHoma v2 |||
47+
| TaHoma Beecon |||
48+
| TaHoma Switch |||
49+
| Connectivity Kit || |
50+
51+
### Rexel Energeasy Connect
52+
53+
| Gateway | Cloud | Local |
54+
| --- | :-: | :-: |
55+
| Energeasy Connect || |
56+
| Energeasy Connect Rail Din |||
57+
| Energeasy Connect V2 |||
58+
| Energeasy Connect V3 |||
59+
| Energeasy Connect V3 Rail Din |||
3660

3761
## Installation
3862

docs/core-concepts.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The library supports multiple authentication methods depending on the server:
8585

8686
- **Username/Password**: Most cloud servers (Somfy, Cozytouch, Hitachi, Nexity)
8787
- **Bearer Token**: Cloud servers with pre-issued tokens
88-
- **Local Token**: Somfy Developer Mode (local gateways)
88+
- **Local Token**: local gateways (Somfy Developer Mode, Rexel Energeasy Connect)
8989
- **OAuth2 with PKCE**: Rexel (Azure AD B2C)
9090

9191
Each server automatically selects the appropriate authentication strategy based on the credentials provided.

docs/getting-started.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,14 @@ Use a cloud server when you want to connect through the vendor’s public API. U
7878

7979
Local authentication requires a token generated via the official mobile app. For details on obtaining a token, refer to [Somfy TaHoma Developer Mode](https://github.com/Somfy-Developer/Somfy-TaHoma-Developer-Mode).
8080

81+
The local API is available on the following gateways:
82+
83+
- Somfy Connexoon IO
84+
- Somfy Connexoon RTS
85+
- Somfy TaHoma v2
86+
- Somfy TaHoma Beecon
87+
- Somfy TaHoma Switch
88+
8189
Use the helper function `create_local_server_config` to create a `Server` with `LocalTokenCredentials` to provide your token.
8290

8391
```python
@@ -273,3 +281,50 @@ Use a cloud server when you want to connect through the vendor’s public API. U
273281
gateway_id="STORED_GATEWAY_ID",
274282
)
275283
```
284+
285+
=== "Rexel (local)"
286+
287+
Rexel Energeasy Connect gateways expose a local API that third-party
288+
software can connect to over your local network. Supported by the following
289+
gateways:
290+
291+
- Energeasy Connect Rail Din (`48`)
292+
- Energeasy Connect V2 (`57`)
293+
- Energeasy Connect V3 (`120`)
294+
- Energeasy Connect V3 Rail Din (`125`)
295+
296+
To obtain a token, enable the local API of your Energeasy Connect Box from
297+
the EConnect mobile app:
298+
299+
1. Open the EConnect app.
300+
2. Go to **Settings** » **My home** » **Maintenance**.
301+
3. Select your gateway » **Local API**.
302+
4. Generate a token to authenticate your API requests.
303+
5. Use the generated token below, and set the host to your gateway PIN code
304+
(e.g. `gateway-xxxx-xxxx-xxxx.local:8443`) or its IP address.
305+
306+
Use the helper function `create_local_server_config` to create a `Server`
307+
with `LocalTokenCredentials` to provide your token.
308+
309+
```python
310+
import asyncio
311+
312+
from pyoverkiz.auth.credentials import LocalTokenCredentials
313+
from pyoverkiz.client import OverkizClient
314+
from pyoverkiz.utils import create_local_server_config
315+
316+
317+
async def main() -> None:
318+
async with OverkizClient(
319+
server=create_local_server_config(
320+
host="gateway-xxxx-xxxx-xxxx.local:8443",
321+
name="Rexel Energeasy Connect (local)",
322+
manufacturer="Rexel",
323+
),
324+
credentials=LocalTokenCredentials("token-from-the-econnect-app"),
325+
verify_ssl=True, # disable if you connect via IP
326+
) as client:
327+
await client.login()
328+
329+
asyncio.run(main())
330+
```

docs/index.md

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,44 @@ pyOverkiz is an async Python library for interacting with Overkiz-based platform
2222

2323
## Supported hubs
2424

25-
- Atlantic Cozytouch
26-
- Bouygues Flexom
27-
- Brandt Smart Control †
28-
- Hitachi Hi Kumo
29-
- Nexity Eugénie
30-
- Rexel Energeasy Connect ‡
31-
- Sauter Cozytouch
32-
- Simu (LiveIn2)
33-
- Somfy Connexoon IO
34-
- Somfy Connexoon RTS
35-
- Somfy TaHoma
36-
- Somfy TaHoma Switch
37-
- Thermor Cozytouch
25+
| Vendor | Cloud | Local |
26+
| --- | :-: | :-: |
27+
| Atlantic Cozytouch || |
28+
| Bouygues Flexom || |
29+
| Brandt Smart Control † || |
30+
| Hexaom HexaConnect || |
31+
| Hitachi Hi Kumo || |
32+
| Nexity Eugénie || |
33+
| Rexel Energeasy Connect ‡ |||
34+
| Sauter Cozytouch || |
35+
| Simu LiveIn2 || |
36+
| Somfy |||
37+
| Thermor Cozytouch || |
38+
| Ubiwizz || |
39+
40+
Local API availability depends on your specific gateway. See the [Getting started guide](getting-started.md) for the supported gateways and setup.
3841

3942
_This server's authentication method isn't supported yet. To use it, obtain an access token (by sniffing the original app) and create a local user on the Overkiz API platform._
4043

41-
_Requires OAuth credentials provided by Rexel._
44+
_The cloud API requires OAuth credentials provided by Rexel; the local API uses a token from the EConnect app instead._
45+
46+
### Somfy
47+
48+
| Gateway | Cloud | Local |
49+
| --- | :-: | :-: |
50+
| Connexoon IO |||
51+
| Connexoon RTS |||
52+
| TaHoma v2 |||
53+
| TaHoma Beecon |||
54+
| TaHoma Switch |||
55+
| Connectivity Kit || |
56+
57+
### Rexel Energeasy Connect
58+
59+
| Gateway | Cloud | Local |
60+
| --- | :-: | :-: |
61+
| Energeasy Connect || |
62+
| Energeasy Connect Rail Din |||
63+
| Energeasy Connect V2 |||
64+
| Energeasy Connect V3 |||
65+
| Energeasy Connect V3 Rail Din |||

pyoverkiz/const.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
Server.SOMFY_EUROPE,
4949
Server.SOMFY_OCEANIA,
5050
Server.SOMFY_AMERICA,
51+
Server.REXEL,
5152
]
5253

5354
SUPPORTED_SERVERS: MappingProxyType[str, ServerConfig] = MappingProxyType(

0 commit comments

Comments
 (0)