mb-software / homeassistant-powerbrain

Custom Component for Homeassistant to integrate cFos Powerbrain devices
MIT License
14 stars 1 forks source link

Since the latest HA update, the slider for power consumption no longer works #88

Closed colseven closed 3 weeks ago

colseven commented 1 month ago

Since the latest HA update, the slider for power consumption no longer works

`homeassistant.components.websocket_api.http.connection Quelle: components/websocket_api/commands.py:241 Integration: Home Assistant WebSocket API (Dokumentation, Probleme) Erstmals aufgetreten: 12. August 2024 um 15:48:04 (9 Vorkommnisse) Zuletzt protokolliert: 07:37:30

[546968833184] Unexpected exception [546788893040] Unexpected exception [547153723744] Unexpected exception [546696327472] Unexpected exception [546915156464] Unexpected exception Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 241, in handle_call_service response = await hass.services.async_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/number/init.py", line 120, in async_set_value await entity.async_set_native_value(native_value) File "/config/custom_components/powerbrain/number.py", line 54, in async_set_native_value await self.hass.async_add_executor_job( File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/powerbrain/powerbrain.py", line 105, in override_current_limit response.raise_for_status() File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.178.160/cnf?cmd=override_device&dev_id=E1&mamps=13000`

Wallbox +/-1 kW: Choose at step 1: choice 1: Error executing script. Unexpected error for call_service at pos 1: 401 Client Error: Unauthorized for url: http://192.168.178.160/cnf?cmd=override_device&dev_id=E1&mamps=15000.0 Wallbox +/-1 kW: Error executing script. Unexpected error for choose at pos 1: 401 Client Error: Unauthorized for url: http://192.168.178.160/cnf?cmd=override_device&dev_id=E1&mamps=15000.0 Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 525, in _async_step await getattr(self, handler)() File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 764, in _async_call_service_step response_data = await self._async_run_long_action( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 727, in _async_run_long_action return await long_task ^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2763, in async_call response_data = await coro ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/core.py", line 2806, in _execute_service return await target(service_call) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 999, in entity_service_call single_response = await _handle_entity_call( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 1071, in _handle_entity_call result = await task ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/number/__init__.py", line 120, in async_set_value await entity.async_set_native_value(native_value) File "/config/custom_components/powerbrain/number.py", line 54, in async_set_native_value await self.hass.async_add_executor_job( File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/powerbrain/powerbrain.py", line 105, in override_current_limit response.raise_for_status() File "/usr/local/lib/python3.12/site-packages/requests/models.py", line 1024, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: http://192.168.178.160/cnf?cmd=override_device&dev_id=E1&mamps=15000

mb-software commented 1 month ago

Hi,

I will check this. But from first sight of the logs it seems unlikely that it was caused by the HA update. Did you maybe also update your Cfos Firmware or anything in the configuration of your cFos charging manager?

colseven commented 4 weeks ago

Yes - i used the new cFos Version 2.2.0.

colseven commented 3 weeks ago

I completely reinstalled and reconfigured homeassistant-powerbrain, now everything is working again. But I still can't explain it.