Skip to content

Commit f48d2a4

Browse files
committed
Improve README
1 parent 9a84bcf commit f48d2a4

1 file changed

Lines changed: 34 additions & 10 deletions

File tree

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,11 @@ from pyoverkiz.enums import Server
4444
USERNAME = ""
4545
PASSWORD = ""
4646

47+
4748
async def main() -> None:
48-
async with OverkizClient(USERNAME, PASSWORD, server=SUPPORTED_SERVERS[Server.SOMFY_EUROPE]) as client:
49+
async with OverkizClient(
50+
USERNAME, PASSWORD, server=SUPPORTED_SERVERS[Server.SOMFY_EUROPE]
51+
) as client:
4952
try:
5053
await client.login()
5154
except Exception as exception: # pylint: disable=broad-except
@@ -64,6 +67,7 @@ async def main() -> None:
6467

6568
time.sleep(2)
6669

70+
6771
asyncio.run(main())
6872
```
6973

@@ -80,38 +84,48 @@ from pyoverkiz.enums import Server
8084

8185
USERNAME = ""
8286
PASSWORD = ""
83-
LOCAL_GATEWAY = "gateway-xxxx-xxxx-xxxx.local" # or use the IP address of your gateway
84-
VERIFY_SSL = True # set verify_ssl to False if you don't use the .local hostname
87+
LOCAL_GATEWAY = "gateway-xxxx-xxxx-xxxx.local" # or use the IP address of your gateway
88+
VERIFY_SSL = True # set verify_ssl to False if you don't use the .local hostname
89+
8590

8691
async def main() -> None:
87-
token = "" # you can set the token here for testing purposes, to re-use an earlier generated token
92+
token = "" # you can set the token here for testing purposes, to re-use an earlier generated token
8893

8994
if not token:
9095
# Generate new token via Cloud API
9196
async with OverkizClient(
92-
username=USERNAME, password=PASSWORD, server=SUPPORTED_SERVERS[Server.SOMFY_EUROPE]
97+
username=USERNAME,
98+
password=PASSWORD,
99+
server=SUPPORTED_SERVERS[Server.SOMFY_EUROPE],
93100
) as client:
94-
95101
await client.login()
96102
gateways = await client.get_gateways()
97103

98104
for gateway in gateways:
99105
token = await client.generate_local_token(gateway.id)
100-
await client.activate_local_token(gateway_id=gateway.id, token=token, label="Home Assistant/local-dev")
106+
await client.activate_local_token(
107+
gateway_id=gateway.id, token=token, label="Home Assistant/local-dev"
108+
)
101109
print(f"Token for {gateway.label} ({gateway.id}):")
102110
print(token) # save this token for future use
103111

104112
# Local Connection
105113
session = aiohttp.ClientSession(
106-
connector=aiohttp.TCPConnector(verify_ssl=VERIFY_SSL))
114+
connector=aiohttp.TCPConnector(verify_ssl=VERIFY_SSL)
115+
)
107116

108117
async with OverkizClient(
109-
username="", password="", token=token, session=session, verify_ssl=VERIFY_SSL, server=OverkizServer(
118+
username="",
119+
password="",
120+
token=token,
121+
session=session,
122+
verify_ssl=VERIFY_SSL,
123+
server=OverkizServer(
110124
name="Somfy TaHoma (local)",
111125
endpoint=f"https://{LOCAL_GATEWAY}:8443/enduser-mobile-web/1/enduserAPI/",
112126
manufacturer="Somfy",
113127
configuration_url=None,
114-
)
128+
),
115129
) as client:
116130
await client.login()
117131

@@ -135,9 +149,19 @@ async def main() -> None:
135149

136150
time.sleep(2)
137151

152+
138153
asyncio.run(main())
139154
```
140155

156+
## Projects using pyOverkiz
157+
158+
This package powers the Overkiz integration in [Home Assistant Core](https://www.home-assistant.io/integrations/overkiz/). Other open-source projects and custom automations also leverage pyOverkiz to interact with Overkiz-compatible hubs and devices, including:
159+
160+
- [overkiz2mqtt](https://github.com/RichieB2B/overkiz2mqtt): Bridges Overkiz devices to MQTT for integration with various platforms.
161+
- [mcp-overkiz](https://github.com/phimage/mcp-overkiz): Implements an MCP server to enable communication between Overkiz devices and language models.
162+
- [tahoma](https://github.com/pzim-devdata/tahoma): Command Line Interface (CLI) to control Overkiz devices.
163+
164+
141165
## Contribute
142166

143167
We welcome contributions! To get started with setting up this project for development, follow the steps below.

0 commit comments

Comments
 (0)