Skip to content
This repository has been archived by the owner on Aug 12, 2024. It is now read-only.

Error while adding a new (first) WallBox #12

Open
JoostvdB94 opened this issue Jun 12, 2023 · 9 comments
Open

Error while adding a new (first) WallBox #12

JoostvdB94 opened this issue Jun 12, 2023 · 9 comments

Comments

@JoostvdB94
Copy link

Following the HACS installation instructions, I get the following error:

Unexpected error creating device
Traceback (most recent call last):
  File "/config/custom_components/alfen_wallbox/config_flow.py", line 42, in _create_device
    await device.init()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 42, in init
    await self.async_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 64, in async_update
    await self._do_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 77, in _do_update
    self._status = AlfenStatus(response_json, self._status)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alfen_wallbox/alfen.py", line 136, in __init__
    for prop in response['properties']:
                ~~~~~~~~^^^^^^^^^^^^^^
KeyError: 'properties'

As this seems like an technical error, this seems like a bug.
In any authentication case I would expect a nice user friendly error specifying that the credentials were not correct.

@pyrocumulus
Copy link

pyrocumulus commented Jul 3, 2023

I have the same error, also when adding the integration for the first time. I tried a couple of times so I'm certain that the credentials are correct (they work in ACE Service Installer and MyEve) so it must be something in the integration itself.

@pyrocumulus
Copy link

I figured it out. The credentials were in fact, not correct. The username should just be 'admin' not the ID of the charger itself (which is what I was using).

I agree with the fact that the error message could be more helpful though.

@leeyuentuen
Copy link

my bad, i'll take a look on wrong authentication to get a better error message

Emacee pushed a commit to Emacee/alfen_wallbox that referenced this issue Aug 13, 2023
add ocpp category data, enable/disable socket1, enable/disable network (ethernet and gprs)
@JoostvdB94
Copy link
Author

I can now see a better log message in the logs.
It looks like the port 443 cannot be accessed. Is it possible to disable TLS and connect on a non-encrypted port?

@leeyuentuen
Copy link

leeyuentuen commented Oct 12, 2023

i think you are using the fork of mine? can you open the issue on my fork (to get better view which version)
https://github.com/leeyuentuen/alfen_wallbox/issues

could it be the same issue here: leeyuentuen#75
with the discussion here leeyuentuen#73
over firmware lower than v5 without authentication?

@markusfocke
Copy link

Looks like I am running into the same issue here.
I had the wallbox connected to HA with your custom integration. Everything was running great. After changing the hardware and moving from container based HA to HAOS the integration did not work anymore.
I deleted it and reinstalled it.

Now I run into the problem of "Unexpected error creating device."
Any idea what I am doing wrong?

HAOS Version: 2023.10.5
Supervisor 2023.11.0
Wallbox Alfen Eve Single Pro
Firmware: 6.5.0.-4217 (Was 6.1 before, same Problem)
Dynamic "Lastmanagement" set protocol on Energy Management System, Mode "Steckdose" (Plug)

Wallbox is accessible with Service Installer and MyEve app.

Log file shows:

Logger: custom_components.alfen_wallbox.config_flow
Source: custom_components/alfen_wallbox/config_flow.py:42
Integration: alfen_wallbox ([documentation](https://github.com/egnerfl/alfen_wallbox))
First occurred: 12:41:08 PM (4 occurrences)
Last logged: 12:46:45 PM

Unexpected error creating device
Traceback (most recent call last):
  File "/config/custom_components/alfen_wallbox/config_flow.py", line 42, in _create_device
    await device.init()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 41, in init
    await self.async_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 63, in async_update
    await self._do_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 74, in _do_update
    self._status = AlfenStatus(response_json, self._status)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alfen_wallbox/alfen.py", line 133, in __init__
    for prop in response['properties']:
                ~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable 


@markusfocke
Copy link

Looks like I am running into the same issue here. I had the wallbox connected to HA with your custom integration. Everything was running great. After changing the hardware and moving from container based HA to HAOS the integration did not work anymore. I deleted it and reinstalled it.

Now I run into the problem of "Unexpected error creating device." Any idea what I am doing wrong?

HAOS Version: 2023.10.5 Supervisor 2023.11.0 Wallbox Alfen Eve Single Pro Firmware: 6.5.0.-4217 (Was 6.1 before, same Problem) Dynamic "Lastmanagement" set protocol on Energy Management System, Mode "Steckdose" (Plug)

Wallbox is accessible with Service Installer and MyEve app.

Log file shows:

Logger: custom_components.alfen_wallbox.config_flow
Source: custom_components/alfen_wallbox/config_flow.py:42
Integration: alfen_wallbox ([documentation](https://github.com/egnerfl/alfen_wallbox))
First occurred: 12:41:08 PM (4 occurrences)
Last logged: 12:46:45 PM

Unexpected error creating device
Traceback (most recent call last):
  File "/config/custom_components/alfen_wallbox/config_flow.py", line 42, in _create_device
    await device.init()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 41, in init
    await self.async_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 63, in async_update
    await self._do_update()
  File "/config/custom_components/alfen_wallbox/alfen.py", line 74, in _do_update
    self._status = AlfenStatus(response_json, self._status)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/alfen_wallbox/alfen.py", line 133, in __init__
    for prop in response['properties']:
                ~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable 

I also checked the right login credentials

  • ip address with http:// and without
  • "admin" and my login name for service installer (seen the thread for this, admin is right)
  • password works in myeve app and in service installer

@on4amg
Copy link

on4amg commented Mar 5, 2024

I have exactly the same issue - HA fully up to date, I can login normally via app and ACE Service Installer

This error originated from a custom integration.

Logger: custom_components.alfen_wallbox.config_flow
Source: custom_components/alfen_wallbox/config_flow.py:42
Integration: Alfen Wallbox (documentation)
First occurred: 15:48:48 (2 occurrences)
Last logged: 15:58:37

Unexpected error creating device
Traceback (most recent call last):
File "/config/custom_components/alfen_wallbox/config_flow.py", line 42, in _create_device
await device.init()
File "/config/custom_components/alfen_wallbox/alfen.py", line 42, in init
await self.async_update()
File "/config/custom_components/alfen_wallbox/alfen.py", line 64, in async_update
await self._do_update()
File "/config/custom_components/alfen_wallbox/alfen.py", line 93, in _do_update
self._status = AlfenStatus(response_json, self._status)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/alfen_wallbox/alfen.py", line 205, in init
for prop in response["properties"]:
~~~~~~~~^^^^^^^^^^^^^^
TypeError: 'NoneType' object is not subscriptable

@markusfocke
Copy link

I did not manage to get it working. Had to delete the custom repo. Afterwards I installed this version: https://github.com/leeyuentuen/alfen_wallbox
Works now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants