Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDL21 not working - after HA-core 2024.4.4 - using ser2net #116324

Closed
Foxdelmar opened this issue Apr 28, 2024 · 9 comments
Closed

EDL21 not working - after HA-core 2024.4.4 - using ser2net #116324

Foxdelmar opened this issue Apr 28, 2024 · 9 comments

Comments

@Foxdelmar
Copy link

Foxdelmar commented Apr 28, 2024

The problem

Hi,
i am using EDL21 for a long time and it works well.

I use HA on a raspberry pi and a separate raspberry in the same network next to my power distribution box (Stromkasten). The additional raspberry uses the Weidmann Elektronik "IR Schreib/Lesekopf USB (Optokopf)". Two of them. The supply the data via Ser2Net as described in the EDL21 Addon Wiki.

A few month ago i configured it via configurations.yaml:
#  - platform: edl21
#    name: Hausstrom
#    serial_port: socket://192.168.178.76:2001
#  - platform: edl21
#    name: Wärmepumpe
#    serial_port: socket://192.168.178.76:2002

After the upgrade to core-2024.4.4 it stopped worked. After the rollback core-2024.3.3 it worked again.

Maybe it wasn't tested with an USB via ser2net?
What should I type in adding a "new Hub"? how should my adress should be formed?
socket://192.168.178.76:2001
192.168.178.76:2001
//192.168.178.76:2001

Anyone else with the same problem?
Maybe the wiki needs to be edited?

What version of Home Assistant Core has the issue?

core-2024.4.4

What was the last working version of Home Assistant Core?

core-2024.3.3

What type of installation are you running?

Home Assistant Core

Integration causing the issue

EDL21

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

#  - platform: edl21
#    name: Hausstrom
#    serial_port: socket://192.168.178.76:2001
#  - platform: edl21
#    name: Wärmepumpe
#    serial_port: socket://192.168.178.76:2002

this worked.

Anything in the logs that might be useful for us?

No response

Additional information

No response

@home-assistant
Copy link

@thecode
Copy link
Member

thecode commented Apr 28, 2024

I am not using EDL21 but please not that according to the docs it is configured via the UI and not via YAML.

@Foxdelmar
Copy link
Author

I deleted the YAML, did the Core 2024.4.4 update again und tried to add the adress using the UI:
grafik

I tried all the three paths, that i wrote down in my first comment but got errors:
socket://192.168.178.76:2001
192.168.178.76:2001
//192.168.178.76:2001

grafik

Error No 1.:

Logger: homeassistant.loader
Quelle: loader.py:1232
Erstmals aufgetreten: 13:12:47 (10 Vorkommnisse)
Zuletzt protokolliert: 13:14:54

Unexpected exception importing platform homeassistant.components.edl21.sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1232, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/edl21/sensor.py", line 9, in
from sml import SmlGetListResponse
File "/usr/local/lib/python3.12/site-packages/sml/init.py", line 32, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

Error No 2.:

Logger: homeassistant.config_entries
Quelle: config_entries.py:551
Erstmals aufgetreten: 13:12:47 (5 Vorkommnisse)
Zuletzt protokolliert: 13:14:54

Error setting up entry Hausstrom for edl21
Error setting up entry Smart Meter for edl21
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1232, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1264, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/init.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1387, in _gcd_import
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/edl21/sensor.py", line 9, in
from sml import SmlGetListResponse
File "/usr/local/lib/python3.12/site-packages/sml/init.py", line 32, in
import bitstring
File "/usr/local/lib/python3.12/site-packages/bitstring/init.py", line 197, in
DtypeDefinition('uintle', Bits._setuintle, Bits._getuintle, int, False, uint_bits2chars,
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 275, in init
if self.allowed_lengths:
^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/bitstring/dtypes.py", line 244, in len
return len(self.value)
^^^^^^^^^^^^^^^
OverflowError: Python int too large to convert to C ssize_t

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 551, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/edl21/init.py", line 12, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(config_entry, PLATFORMS)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 1860, in async_forward_entry_setups
await integration.async_get_platforms(platforms)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1145, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1133, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1060, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1252, in _load_platform
raise ImportError(
ImportError: Exception importing homeassistant.components.edl21.sensor

@kwerdenker
Copy link

I have the same issue with the same errors as above. I setup my meters via the UI, so I don't think the way of configuration matters for the error.

@thecode
Copy link
Member

thecode commented Apr 28, 2024

I have the same issue with the same errors as above. I setup my meters via the UI, so I don't think the way of configuration matters for the error.

I was only noting that since @Foxdelmar migrated from an older version there is no point trying to edit the YAML as he mentioned in the post since it is not relevant anymore. I do understand there is an error, but I am not using this integration so it will have to wait for someone who has experience with this integration

@mib1185
Copy link
Contributor

mib1185 commented Apr 28, 2024

Maybe it wasn't tested with an USB via ser2net? What should I type in adding a "new Hub"? how should my adress should be formed? socket://192.168.178.76:2001 192.168.178.76:2001 //192.168.178.76:2001

Anyone else with the same problem? Maybe the wiki needs to be edited?

Hi @Foxdelmar

This sounds like a request for support?
We use GitHub for tracking issues with Home Assistant Core itself, not for providing support.
If you are in need of support, you should try our Community Forum or join our Discord chat server.

btw the yaml based configuration is already gone since ha-core 2023.6.0

Thanks! 👍

@joostlek
Copy link
Member

It looks like edl21 has some library issues, #116369 is a clearer issue so I think we can close this one in favor of that issue.

@bdraco
Copy link
Member

bdraco commented Apr 29, 2024

Duplicate of #116369

@bdraco bdraco marked this as a duplicate of #116369 Apr 29, 2024
@bdraco bdraco closed this as not planned Won't fix, can't repro, duplicate, stale Apr 29, 2024
@Foxdelmar
Copy link
Author

Thanks for analyzing my problem.

I havent used den configuration.yaml anymore. I only wrote down how it was configured month ago. So no request for support but an issue. Thanks for helping me out.

With the newest version core-2024.5.1 and core-2024.5.2 it works again. :)

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

No branches or pull requests

6 participants