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

Smartshunt not working over ESPhome bluetooth proxy #56

Open
frank8the9tank opened this issue Jun 10, 2024 · 2 comments
Open

Smartshunt not working over ESPhome bluetooth proxy #56

frank8the9tank opened this issue Jun 10, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@frank8the9tank
Copy link

Describe the bug
From a working setup (used the device for 3 months now) , now i have a fault when loading the integration.
Failed to setup.
Removed it, restarted HA en added it again, now it fails to setup, no entities are loaded.

To Reproduce
Steps to reproduce the behavior:
Add the integration the normal way, fill in name, mac and token.

Expected behavior
That it connects over the ESPhome bluetooth proxy, as this has before.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

logs:
Logger: homeassistant.loader
Source: loader.py:1249
First occurred: 18:59:22 (6 occurrences)
Last logged: 21:10:23

Unexpected exception importing platform custom_components.victron_ble.sensor
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1249, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1281, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
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 "/config/custom_components/victron_ble/sensor.py", line 198, in
PassiveBluetoothDataProcessor[Optional[Union[float, int]]]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 384, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 1066, in _generic_class_getitem
_check_generic(cls, params, len(cls.parameters))
File "/usr/local/lib/python3.12/site-packages/typing_extensions.py", line 2947, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2

AND:

Logger: homeassistant.config_entries
Source: config_entries.py:594
First occurred: 18:59:23 (3 occurrences)
Last logged: 21:10:23

Error setting up entry SmartShunt for victron_ble
Error setting up entry Smartshunt for victron_ble
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1249, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1281, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
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 "/config/custom_components/victron_ble/sensor.py", line 198, in
PassiveBluetoothDataProcessor[Optional[Union[float, int]]]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 384, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 1066, in _generic_class_getitem
_check_generic(cls, params, len(cls.parameters))
File "/usr/local/lib/python3.12/site-packages/typing_extensions.py", line 2947, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2

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 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/victron_ble/init.py", line 36, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2031, in async_forward_entry_setups
await integration.async_get_platforms(platforms)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1162, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1150, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1269, in _load_platform
raise ImportError(
ImportError: Exception importing custom_components.victron_ble.sensor

At the moment i have no idea why this is not working, The smart shunt still workings fine with the victron app, also tried updating the firmware. no differance.
Can somebody check this?

@frank8the9tank frank8the9tank added bug Something isn't working help wanted Extra attention is needed labels Jun 10, 2024
@frank8the9tank
Copy link
Author

What i also see is that the auto discover still works.
So if i remove the integration, restart HA, and wait a bit. the Auto discover finds the smart shunt.
But when i press configure the integration fails the setup (i'm still presented with the 3 input fields).

@QuintinSmith334
Copy link

I am having the same issue on my end. 

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 1249, in _load_platform
cache[full_name] = self._import_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1281, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/util/loop.py", line 131, in protected_loop_func
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
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 "/config/custom_components/victron_ble/sensor.py", line 198, in
PassiveBluetoothDataProcessor[Optional[Union[float, int]]]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 384, in inner
return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/typing.py", line 1066, in _generic_class_getitem
_check_generic(cls, params, len(cls.parameters))
File "/usr/local/lib/python3.12/site-packages/typing_extensions.py", line 2947, in _check_generic
raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
TypeError: Too few arguments for <class 'homeassistant.components.bluetooth.passive_update_processor.PassiveBluetoothDataProcessor'>; actual 1, expected at least 2

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 594, in async_setup
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/victron_ble/init.py", line 36, in async_setup_entry
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 2031, in async_forward_entry_setups
await integration.async_get_platforms(platforms)
File "/usr/src/homeassistant/homeassistant/loader.py", line 1162, in async_get_platforms
import_future.result()
File "/usr/src/homeassistant/homeassistant/loader.py", line 1150, in async_get_platforms
platforms.update(self._load_platforms(platform_names))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1075, in _load_platforms
platform_name: self._load_platform(platform_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/loader.py", line 1269, in _load_platform
raise ImportError(
ImportError: Exception importing custom_components.victron_ble.sensor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants