File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77LOG : Final = logging .getLogger (__package__ )
88DEFAULT_STATE_FILE : Final = "hilo_state.yaml"
99REQUEST_RETRY : Final = 9
10- PYHILO_VERSION : Final = "2025.10.02 "
10+ PYHILO_VERSION : Final = "2025.11.01 "
1111# TODO: Find a way to keep previous line in sync with pyproject.toml automatically
1212
1313CONTENT_TYPE_FORM : Final = "application/x-www-form-urlencoded"
Original file line number Diff line number Diff line change 11import asyncio
22import logging
3+ import ssl
34from typing import Any , Dict , List , Optional
45
56from gql import Client , gql
@@ -552,11 +553,17 @@ async def subscribe_to_device_updated(
552553
553554 # Setting log level to suppress keepalive messages on gql transport
554555 logging .getLogger ("gql.transport.websockets" ).setLevel (logging .WARNING )
556+
557+ #
558+ loop = asyncio .get_event_loop ()
559+ ssl_context = await loop .run_in_executor (None , ssl .create_default_context )
560+
555561 while True : # Loop to reconnect if the connection is lost
556562 LOG .debug ("subscribe_to_device_updated while true" )
557563 access_token = await self ._get_access_token ()
558564 transport = WebsocketsTransport (
559- url = f"wss://platform.hiloenergie.com/api/digital-twin/v3/graphql?access_token={ access_token } "
565+ url = f"wss://platform.hiloenergie.com/api/digital-twin/v3/graphql?access_token={ access_token } " ,
566+ ssl = ssl_context ,
560567 )
561568 client = Client (transport = transport , fetch_schema_from_transport = True )
562569 query = gql (self .SUBSCRIPTION_DEVICE_UPDATED )
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ exclude = ".venv/.*"
4040
4141[tool .poetry ]
4242name = " python-hilo"
43- version = " 2025.10.2 "
43+ version = " 2025.11.1 "
4444description = " A Python3, async interface to the Hilo API"
4545readme = " README.md"
4646authors = [" David Vallee Delisle <me@dvd.dev>" ]
You can’t perform that action at this time.
0 commit comments