-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
I have a ziggo connect box, which after a while has stopped working properly.
Debugging it from my remote home assistant installation, I stumbled across some weird data while debugging;
In [2]: from connect_box import ConnectBox
In [3]: import aiohttp
In [4]: async def create():
...: session = aiohttp.ClientSession()
...: return ConnectBox(session, "[REDACTED]", "192.168.178.1")
...:
In [5]: import logging
In [6]: logging.basicConfig(level=logging.DEBUG)
In [7]: box = await create()
In [9]: await box.async_initialize_token()
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[9], line 1
----> 1 await box.async_initialize_token()
File ~/.venv/lib/python3.12/site-packages/connect_box/__init__.py:506, in ConnectBox.async_initialize_token(self)
504 async def async_initialize_token(self) -> None:
505 """Get the token first."""
--> 506 await self._async_initialize_valid_token()
507 await self._async_do_login_with_password(CMD_LOGIN)
File ~/.venv/lib/python3.12/site-packages/connect_box/__init__.py:519, in ConnectBox._async_initialize_valid_token(self)
513 async with self._session.get(
514 f"http://{self.host}/common_page/login.html",
515 headers=self.headers,
516 timeout=10,
517 ) as response:
518 await response.read()
--> 519 self.token = response.cookies["sessionToken"].value
521 except (asyncio.TimeoutError, aiohttp.ClientError) as err:
522 _LOGGER.error("Can not load login page from %s: %s", self.host, err)
KeyError: 'sessionToken'
In [10]: async with box._session.get(
...: f"http://{box.host}/common_page/login.html",
...: headers=box.headers,
...: timeout=10,
...: ) as response:
...: await response.read()
...: r = response
...:
In [11]: r
Out[11]:
<ClientResponse(http://192.168.178.1/common_page/login.html) [404 Not Found]>
<CIMultiDictProxy('Content-Type': 'text/html', 'Content-Length': '341', 'Date': 'Mon, 03 Mar 2025 11:14:51 GMT', 'Server': 'lighttpd/1.4.63')>
It returns a 404, which I hadn't seen before.
curl confirms this, with it 404ing on the login sub-page, while it returns a whole new page on /
This is the login page i'm getting, after a spinner;
In "administration", and the information section, i get the following;
Connect Box informatie
De onderstaande informatie geeft de Connect Box status weer.
Conform standaard specificaties : DOCSIS 3.0
Hardware versie : 5.01
Software versie : LG-RDK_CH7465LG-NCIP-6.18-2406.2-NOSH
MAC-adres : [REDACTED]
Serienummer Connect Box : [REDACTED]
Beschikbaarheid : 83day(s)7h:38m:4s
Netwerk toegang : Toegang tot internet
Metadata
Metadata
Assignees
Labels
No labels
