Ziggo connectbox NL not working

Hello,

I try to install the device_tracker component upc_connect. I am having a Ziggo connectbox NL.
In the documenation i read that this connect box is working with upc_connect.

But it is not working. I get the folowing error:

2019-01-26 11:20:36 ERROR (MainThread) [homeassistant.components.device_tracker] Error setting up platform upc_connectnk
Traceback (most recent call last):
File “/srv/homeassistant/homeassistant_venv/lib/python3.5/site-packages/homeassistant/components/device_tracker/init.py”, line 173, in async_setup_platform
hass, {DOMAIN: p_config})
File “/home/homeassistant/.homeassistant/custom_components/device_tracker/upc_connectnk.py”, line 37, in async_get_scanner
success_init = await scanner.async_initialize_token()
File “/home/homeassistant/.homeassistant/custom_components/device_tracker/upc_connectnk.py”, line 101, in async_initialize_token
self.token = response.cookies[‘sessionToken’].value
KeyError: ‘sessionToken’

My configuration.yaml:

device_tracker:
  platform: upc_connect
  host:     192.168.178.1

I also tried it with a password like this:

device_tracker:
  platform: upc_connect
  host:     192.168.178.1
  password: ********

Please help.

device_tracker:
  - platform: upc_connect
    host: 192.168.178.1
    username: !secret router_username
    password: !secret router_password
    track_new_devices: false

Add admin as username!

thank you sholofly.

I tested this but no succes.

When i manually log on to the connectbox i only have to enter a password.

I had the same issue.

Error setting up platform upc_connect
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/__init__.py", line 173, in async_setup_platform
    hass, {DOMAIN: p_config})
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/upc_connect.py", line 37, in async_get_scanner
    success_init = await scanner.async_initialize_token()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/device_tracker/upc_connect.py", line 98, in async_initialize_token
    self.token = response.cookies['sessionToken'].value
KeyError: 'sessionToken'

Anyone already got this component working?? :slight_smile:

I got the feeling this component is broken, I tried with / without password and nothing changes. Always seeing the same error about the ‘sessionToken’.

    self.token = response.cookies['sessionToken'].value
KeyError: 'sessionToken'```

Any luck with this ?

Yes, here too it seems broken.
Today I updated my Hass.io from version 0.93.1 to 0.96.2. In the older version I got a warning, but it worked:

Your configuration contains extra keys that the platform does not support (but were silently accepted before 0.88). Please find and remove the following.This will become a breaking change.

- [password].  (See /config/configuration.yaml, line 65). 
Offending data: {"platform": "upc_connect", "password": ******, "host": "<redacted>", "new_device_defaults": "<redacted>"}"

In the newer version the warning became an error message and it also did not function anymore. I had to revert back to the previous version.
My configuration file does indeed contain a password. I tried without it, but that simply doesn’t work. To me it also makes sense that this component needs a password, although the documentation does indeed not mention a password.

How can this be solved? What actions should be taken? This is obviously wrong!

Related topic:

Please ignore my previous message.
I now commented out the password in the configuration file and the device tracker still worked. After testing that for a while I updated Home Assistant and every still seems to work fine. I have no clue why in the past I was unable to make it work without a password.

I still do not have a solution and are not using this component.

Any solution for this?

The following entry in the configuration.yaml file worked for me:

device_tracker:
  - platform: upc_connect
    host: 192.168.178.1
    interval_seconds: 10
    consider_home: 180

I’m using the ziggo connectbox NL, apparently the username and password are not required (strange since I would expect it to be secure). Would be nice if anyone knows the reason and can shad a light on it.

I tried your configuration.yaml setup and get the following error:


2019-08-29 11:31:52 ERROR (MainThread) 
[homeassistant.components.device_tracker] Error setting up platform legacy
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/device_tracker/setup.py", line 61, in async_setup_legacy
    hass, {DOMAIN: self.config}
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/upc_connect/device_tracker.py", line 33, in async_get_scanner
    success_init = await scanner.async_initialize_token()
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/components/upc_connect/device_tracker.py", line 97, in async_initialize_token
    self.token = response.cookies["sessionToken"].value

So this is not working for me (HA 0.97.2)

That’s strange since I’m using Hass.io 0.97.2, same version without any issues.

I have the same issue with the Unitymedia connect box. Just checked the log:

[homeassistant.components.upc_connect.device_tracker] Receive http code 302

I’m getting same error as @k45t for last 14 days

[homeassistant.components.upc_connect.device_tracker] Receive http code 302

It looks like these routers now require authentication to get the list of connected devices. There is a python library here which you can use to test your router. (This library’s code seems very same to one in homeassistant btw.) Still gives me 302

I have also the same issue with the Unitymedia Box
Any solutions yet?

I’m also running into the KeyError: 'sessionToken' issue with my Ziggo Connect Box.

In my case it’s caused because my particular Connect Box / router (ARRIS TG2492LG) doesn’t work with the python library used by the upc_connect device_tracker. This Connect Box / router runs incompatible software.

It should be possible to make an device_tracker for this particular router. I already figured out which calls are required to login and retrieve the connected devices. But sadly I don’t have enough time at this moment to add a new device_tracker myself…

If someone wants to make the device_tracker for this particular Ziggo Connect Box I can provide the calls and information to retrieve the connected devices.

Other problem is after you successfull logged in to the modem with HA to discover, you cannot login twice to change settings in your modem (via browser --> http://192.168.178.1/common_page/login.html) , because HA is already logged in and it’s unpossible to login 2 times… see here for more people with same problems and little info

I’m also running into the KeyError: 'sessionToken' issue with my Ziggo Connect Box.

In my case it’s caused because my particular Connect Box / router (ARRIS TG2492LG) doesn’t work with the python library used by the upc_connect device_tracker. This Connect Box / router runs incompatible software.

I’ve created an integration that should work with this Ziggo Connectbox: Arris TG2492LG - Home Assistant