nickknissen / hass-monta

Monta Home Assistant custom component
MIT License
26 stars 4 forks source link

Unexpected error when stopping charge from homeassistant #42

Closed AndersV209 closed 11 months ago

AndersV209 commented 11 months ago

System Health details

System Information

version core-2023.12.0
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.6
os_name Linux
os_version 6.1.63-haos
arch x86_64
timezone Europe/Copenhagen
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4855 Installed Version | 1.33.0 Stage | running Available Repositories | 1347 Downloaded Repositories | 22
Home Assistant Cloud logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | ok
Home Assistant Supervisor host_os | Home Assistant OS 11.2 -- | -- update_channel | stable supervisor_version | supervisor-2023.11.6 agent_version | 1.6.0 docker_version | 24.0.7 disk_total | 219.4 GB disk_used | 42.6 GB healthy | true supported | true board | generic-x86-64 supervisor_api | ok version_api | ok installed_addons | UniFi Network Application (3.0.0), Studio Code Server (5.14.2), Zigbee2MQTT (1.34.0-1), Mosquitto broker (6.4.0), InfluxDB (4.8.0), Grafana (9.1.1), ESPHome (2023.11.6), Home Assistant Google Drive Backup (0.112.1), Let's Encrypt (5.0.5), Samba share (12.2.0), Cloudflared (4.2.11)
Dashboards dashboards | 2 -- | -- resources | 13 views | 12 mode | storage
Recorder oldest_recorder_run | 29. november 2023 kl. 19.24 -- | -- current_recorder_run | 8. december 2023 kl. 17.25 estimated_db_size | 1007.28 MiB database_engine | sqlite database_version | 3.41.2

Checklist

Describe the issue

jeg er de seneste par dage begyndt at opleve at jeg ikke kan stoppe monta opladning via homeassistant længere, hverken via automationer eller manuelt, der kommer en ukendt fejl. og besked "error fetching information" jeg kan fint starte opladningen på samme start/stop entitet men ikke stoppe.

jeg har forsøgt at slette integration og opsætte den igen uden held.

Reproduction steps

1.stop en aktiv session fra enheds siden i home assistant 2.her kommer fejlen 3.opladning ikke stoppet. ...

Debug logs

2023-12-08 18:04:31.486 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration moonraker which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.488 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration truenas which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.489 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration nordpool which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.491 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration energidataservice which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.492 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration volkswagen_we_connect_id which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.493 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration monta which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.495 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration fuelprices_dk which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.496 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration volkswagencarnet which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.497 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:31.498 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration ocpp which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-12-08 18:04:42.231 ERROR (MainThread) [homeassistant.components.automation] Automation with alias 'Golf GTE ingen strøm ' failed to setup actions and has been disabled: Unknown device 'd28a423861f74e7f69a12830ef01900d'
2023-12-08 18:04:59.469 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for gas-maler @ 192.168.10.202: Error connecting to ('192.168.10.202', 6053): [Errno 113] Connect call failed ('192.168.10.202', 6053) (SocketAPIError)
2023-12-08 18:05:11.699 WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.elpris_forskel (<class 'homeassistant.components.template.sensor.SensorTemplate'>) is using native unit of measurement 'DKK/kWh' which is not a valid unit for the device class ('energy') it is using; expected one of ['MWh', 'MJ', 'GJ', 'Wh', 'kWh']; Please update your configuration if your entity is manually configured, otherwise create a bug report at https://github.com/home-assistant/core/issues?q=is%3Aopen+is%3Aissue+label%3A%22integration%3A+template%22
2023-12-08 18:05:11.811 WARNING (MainThread) [homeassistant.components.homeassistant.triggers.numeric_state] Error initializing 'Bil opladt notification' trigger: In 'numeric_state' condition: unknown entity sensor.golf_7_gte_battery_level
2023-12-08 18:05:19.748 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.rogalarm_stue_smoke_density (None) cannot be converted to the unit of previously compiled statistics (). Generation of long term statistics will be suppressed unless the unit changes back to  or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2023-12-08 18:05:19.749 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.rogalarm_kokken_smoke_density (None) cannot be converted to the unit of previously compiled statistics (). Generation of long term statistics will be suppressed unless the unit changes back to  or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2023-12-08 18:05:19.749 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.rogalarm_3dprinter_rum_smoke_density (None) cannot be converted to the unit of previously compiled statistics (). Generation of long term statistics will be suppressed unless the unit changes back to  or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2023-12-08 18:05:37.828 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140591798533056] Error fetching information
Traceback (most recent call last):
  File "/config/custom_components/monta/api.py", line 246, in _api_wrapper
    response.raise_for_status()
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client_reqrep.py", line 1059, in raise_for_status
    raise ClientResponseError(
aiohttp.client_exceptions.ClientResponseError: 400, message='Bad Request', url=URL('https://public-api.monta.com/api/v1/charges/6873537/stop')

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

Traceback (most recent call last):
  File "/config/custom_components/monta/coordinator.py", line 60, in async_stop_charge
    return await self.client.async_stop_charge(charges[0]["id"])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/monta/api.py", line 155, in async_stop_charge
    response = await self._api_wrapper(
               ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/monta/api.py", line 262, in _api_wrapper
    raise MontaApiClientCommunicationError(
custom_components.monta.api.MontaApiClientCommunicationError: Error fetching information

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

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 238, in handle_call_service
    response = await hass.services.async_call(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2067, in async_call
    response_data = await coro
                    ^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/core.py", line 2104, in _execute_service
    return await target(service_call)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 272, in handle_service
    return await service.entity_service_call(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 878, in entity_service_call
    single_response = await _handle_entity_call(
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 948, in _handle_entity_call
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/monta/switch.py", line 87, in async_turn_off
    await self.coordinator.async_stop_charge(self.charge_point_id)
  File "/config/custom_components/monta/coordinator.py", line 64, in async_stop_charge
    raise UpdateFailed(exception) from exception
homeassistant.helpers.update_coordinator.UpdateFailed: Error fetching information

Diagnostics dump

No response

nickknissen commented 11 months ago

Jeg oplever desværre det samme, det kunne godt tyde på at der er lidt problemer hos Monta. Der er også andre der har ligende problemer: https://docs.public-api.monta.com/discuss/6576efdea8f5d80023f9fcfa

AndersV209 commented 11 months ago

Det er ikke længere et problem, så det har nok været monta som var problemet