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

Add Sensors for extra power meters #120

Open
3 tasks done
kobelka opened this issue Mar 8, 2024 · 7 comments
Open
3 tasks done

Add Sensors for extra power meters #120

kobelka opened this issue Mar 8, 2024 · 7 comments
Labels
enhancement New feature or request

Comments

@kobelka
Copy link

kobelka commented Mar 8, 2024

Checklist

  • I have filled out the template to the best of my ability.
  • This only contains 1 feature request (if you have multiple feature requests, open one feature request for each feature request).
  • This issue is not a duplicate feature request of previous feature requests.

Is your feature request related to a problem? Please describe.

It would be nice if the external power meters are also aviable as the other sensors

Describe the solution you'd like

Add the external power meter, like in https://github.com/rxhan/RSCPGui

Describe alternatives you've considered

nothing

Additional context

No response

Diagnostics dump

No response

@kobelka kobelka added the enhancement New feature or request label Mar 8, 2024
@torbennehmer
Copy link
Owner

Please add a diagnostic dump, can't do without it.

@kobelka
Copy link
Author

kobelka commented Mar 9, 2024

I can´t download it:

image

@torbennehmer
Copy link
Owner

What does the debug log say (enable debug logging for the integration before you try it, there's probably an exception flying around. Normally, the diagnostic dumper should catch this and take care of it, I'm wondering, what's actually going on here.

@wittimagic
Copy link

wittimagic commented Mar 9, 2024

Hmm, had a different integration in the log throwing errors and some devices that can't be loaded because they are offline.
I cleaned up some stuff.

@kobelka I am wondering, why your screenshot shows a .txt file, strange.

Another try:
config_entry-e3dc_rscp-7a29928e2c66dc30bb06b0ae4364c0cf (4).json

@kobelka
Copy link
Author

kobelka commented Mar 9, 2024

@torbennehmer makes no difference...only when I exit debug mode again does the debug log appear.
Here is the last section:

2024-03-09 16:34:27.471 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 250, in get data = await info.config_entry_diagnostics(hass, config_entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/e3dc_rscp/diagnostics.py", line 31, in async_get_config_entry_diagnostics dumper.create_dump() File "/config/custom_components/e3dc_rscp/diagnostics.py", line 56, in create_dump self._redact_private_information(self.result) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 127, in _redact_private_information if isinstance(value, str) and _redact_regex.search(key) is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'int' 2024-03-09 16:34:27.573 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1010, in _update_entity_states await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 963, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1113, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.__async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1052, in __async_calculate_state attr.update(self.state_attributes or {}) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1118, in state_attributes if (value := getattr(self, attr)) is not None: ^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/squeezebox/media_player.py", line 323, in media_content_id urls = [{"url": track["url"]} for track in self._player.playlist] ~~~~~^^^^^^^ KeyError: 'url' 2024-03-09 16:34:30.316 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 250, in get data = await info.config_entry_diagnostics(hass, config_entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/e3dc_rscp/diagnostics.py", line 31, in async_get_config_entry_diagnostics dumper.create_dump() File "/config/custom_components/e3dc_rscp/diagnostics.py", line 56, in create_dump self._redact_private_information(self.result) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 127, in _redact_private_information if isinstance(value, str) and _redact_regex.search(key) is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'int' 2024-03-09 16:34:33.145 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Polling general status information 2024-03-09 16:34:33.200 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Poll power settings 2024-03-09 16:34:33.206 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Polling manual charge information 2024-03-09 16:34:33.265 DEBUG (SyncWorker_24) [custom_components.e3dc_rscp.e3dc_proxy] Failed to query manual charging data, might be related to a recent E3DC API change, ignoring the error, reverting to empty defaults. 2024-03-09 16:34:33.265 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Polling additional powermeters 2024-03-09 16:34:33.289 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Skipping power metrics poll. 2024-03-09 16:34:33.289 DEBUG (MainThread) [custom_components.e3dc_rscp.coordinator] Finished fetching e3dc_rscp data in 0.144 seconds (success: True) 2024-03-09 16:34:35.461 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 250, in get data = await info.config_entry_diagnostics(hass, config_entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/e3dc_rscp/diagnostics.py", line 31, in async_get_config_entry_diagnostics dumper.create_dump() File "/config/custom_components/e3dc_rscp/diagnostics.py", line 56, in create_dump self._redact_private_information(self.result) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 127, in _redact_private_information if isinstance(value, str) and _redact_regex.search(key) is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'int' 2024-03-09 16:34:37.574 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1010, in _update_entity_states await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 963, in async_update_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1113, in _async_write_ha_state state, attr, capabilities, shadowed_attr = self.__async_calculate_state() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1052, in __async_calculate_state attr.update(self.state_attributes or {}) ^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1118, in state_attributes if (value := getattr(self, attr)) is not None: ^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/squeezebox/media_player.py", line 323, in media_content_id urls = [{"url": track["url"]} for track in self._player.playlist] ~~~~~^^^^^^^ KeyError: 'url' 2024-03-09 16:34:38.643 ERROR (MainThread) [aiohttp.server] Error handling request Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/aiohttp/web_protocol.py", line 452, in _handle_request resp = await request_handler(request) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_app.py", line 543, in _handle resp = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.12/site-packages/aiohttp/web_middlewares.py", line 114, in impl return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/security_filter.py", line 91, in security_filter_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/forwarded.py", line 100, in forwarded_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 25, in request_context_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 79, in ban_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 235, in auth_middleware return await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/http/headers.py", line 31, in headers_middleware response = await handler(request) ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/http.py", line 68, in handle result = await handler(request, **request.match_info) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/diagnostics/__init__.py", line 250, in get data = await info.config_entry_diagnostics(hass, config_entry) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/e3dc_rscp/diagnostics.py", line 31, in async_get_config_entry_diagnostics dumper.create_dump() File "/config/custom_components/e3dc_rscp/diagnostics.py", line 56, in create_dump self._redact_private_information(self.result) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 129, in _redact_private_information self._redact_private_information(value) File "/config/custom_components/e3dc_rscp/diagnostics.py", line 127, in _redact_private_information if isinstance(value, str) and _redact_regex.search(key) is not None: ^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: expected string or bytes-like object, got 'int'

@torbennehmer
Copy link
Owner

@kobelka I'll push 3.6.2 shortly, it should contain a fix for the diagnostic dumper handling the error above. Please, next time, paste a log file either as file or at least put it into a code block, so that line breaks are preserved. This took me quite some time to dissect.
Once updated, please attach a diag dump.

@kobelka
Copy link
Author

kobelka commented Apr 4, 2024

Sorry for the late reply i was on vacation...
Now the diag dump works:
config_entry-e3dc_rscp-613cb8e2575b076366b0dc4c1249b110.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants