Xyaren / homeassistant-magentatv

Homeassistant Integration for controlling Telekom MagnetaTV Media Receivers
MIT License
5 stars 0 forks source link

Unable to load entity #15

Closed FelixLttks closed 1 year ago

FelixLttks commented 1 year ago

System Health details

System Information

version core-2023.6.3
installation_type Home Assistant OS
dev false
hassio true
docker true
user root
virtualenv false
python_version 3.11.4
os_name Linux
os_version 6.1.21-v8
arch aarch64
timezone Europe/Berlin
config_dir /config
Home Assistant Community Store GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4683 Installed Version | 1.32.1 Stage | running Available Repositories | 1280 Downloaded Repositories | 24
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 10.3 -- | -- update_channel | stable supervisor_version | supervisor-2023.06.2 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 56.4 GB disk_used | 11.8 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Duck DNS (1.15.0), Studio Code Server (5.7.0), ESPHome (2023.6.2), Advanced SSH & Web Terminal (15.0.2), Samba Backup (5.2.0), Mosquitto broker (6.2.1), FTP (4.7.1), PSA Car Controller (v3.0.12)
Dashboards dashboards | 1 -- | -- resources | 16 views | 4 mode | storage
Recorder oldest_recorder_run | 18. Juni 2023 um 19:53 -- | -- current_recorder_run | 28. Juni 2023 um 15:21 estimated_db_size | 569.33 MiB database_engine | sqlite database_version | 3.41.2

Checklist

Describe the issue

When trying to add my receiver (telekom 401), I get the following error: image

The MagentaTV Integration Panel shows the following: image

restarting homeassistant doesnt help :(

Reproduction steps

  1. Installed via HACS
  2. trying to add manual or auto-discovered Device
  3. Add ANID in the UI (Something like 350029010000000293193139)

This screen appears: image

Debug logs

2023-06-28 15:33:50.405 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration google_home 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-06-28 15:33:50.406 WARNING (SyncWorker_1) [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-06-28 15:33:50.406 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration dwains_dashboard 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-06-28 15:33:50.407 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration homematicip_local 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-06-28 15:33:50.407 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration magentatv 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-06-28 15:33:50.408 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration browser_mod 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-06-28 15:33:50.411 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration pyscript 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-06-28 15:33:50.413 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration solax_modbus 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-06-28 15:34:30.439 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547169948368] Error handling message: Unknown error (unknown_error) whv 
2023-06-28 15:34:30.483 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [547169948368] Error handling message: Unknown error (unknown_error) whv 
2023-06-28 15:34:37.063 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that restore_state.RestoreStateData.async_get_instance is deprecated, and not intended to be called by custom components; Pleaserefactor your code to use RestoreEntity instead; restore_state.async_get(hass) can be used in the meantime. Please report issue to the custom integration author for pyscript using this method at custom_components/pyscript/__init__.py, line 83: restore_data = await RestoreStateData.async_get_instance(hass)
2023-06-28 15:34:44.037 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [546914931728] Error handling message: Unknown error (unknown_error) whv from 87.163.61.134 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36 Edg/116.0.0.0)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/browser_mod/connection.py", line 61, in handle_connect
    dev = getBrowser(hass, browserID)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 198, in getBrowser
    browsers[browserID] = BrowserModBrowser(hass, browserID)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/browser_mod/browser.py", line 42, in __init__
    self.update_entities(hass)
  File "/config/custom_components/browser_mod/browser.py", line 71, in update_entities
    _assert_browser_sensor("sensor", "path", "Browser path", icon="mdi:web")
  File "/config/custom_components/browser_mod/browser.py", line 65, in _assert_browser_sensor
    adder = hass.data[DOMAIN][DATA_ADDERS][type]
            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'sensor'
2023-06-28 15:34:51.534 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for rs @ 192.168.178.137: Error connecting to ('192.168.178.137', 6053): [Errno 113] Connect call failed ('192.168.178.137', 6053)
2023-06-28 15:34:51.537 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for knocksensor @ 192.168.178.141: Error connecting to ('192.168.178.141', 6053): [Errno 113] Connect call failed ('192.168.178.141', 6053)
2023-06-28 15:34:52.261 WARNING (MainThread) [homeassistant.config_entries] Config entry 'Marantz:[M-CR603]' for denonavr integration not ready yet: NetworkError: All connection attempts failed; Retrying in background
2023-06-28 15:35:16.058 WARNING (MainThread) [homeassistant.bootstrap] Waiting on integrations to complete setup: fritz, binary_sensor.fritz
2023-06-28 15:35:17.550 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform fritz is taking over 10 seconds.
2023-06-28 15:35:30.310 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x6713:11:0x0300]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>')]
2023-06-28 15:35:30.334 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x6713:11:0x0008]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>')]
2023-06-28 15:35:30.336 WARNING (MainThread) [homeassistant.components.zha.core.cluster_handlers] [0x6713:11:0x0006]: async_initialize: all attempts have failed: [DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>'), DeliveryError('Request failed after 5 attempts: <Status.MAC_NO_ACK: 233>')]
2023-06-28 15:35:30.536 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.waschkuche_switch_0 (Prio 1)] Registered appliance.
2023-06-28 15:35:30.540 INFO (MainThread) [custom_components.pyscript.file.pv_excess_control.pv_excess_control] [switch.keller_g_01_wallbox (Prio 1)] Registered appliance.
2023-06-28 15:35:31.022 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] num=unknown is not a valid number between 0 and 1000000: could not convert string to float: 'unknown'
2023-06-28 15:35:31.068 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2023-06-28 15:35:34.184 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp
2023-06-28 15:35:35.457 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for rs @ 192.168.178.137: Error connecting to ('192.168.178.137', 6053): [Errno 113] Connect call failed ('192.168.178.137', 6053)
2023-06-28 15:35:35.489 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for knocksensor @ 192.168.178.141: Error connecting to ('192.168.178.141', 6053): [Errno 113] Connect call failed ('192.168.178.141', 6053)
2023-06-28 15:35:40.555 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] num=unknown is not a valid number between 0 and 1000000: could not convert string to float: 'unknown'
2023-06-28 15:35:40.560 ERROR (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Could not update Export/PV history!: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
2023-06-28 15:35:47.266 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp
2023-06-28 15:35:51.646 ERROR (MainThread) [homeassistant.setup] Error during setup of component magentatv
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 286, in _async_setup_component
    result = await task
             ^^^^^^^^^^
  File "/config/custom_components/magentatv/__init__.py", line 66, in async_setup
    config = entry[DOMAIN]
             ~~~~~^^^^^^^^
KeyError: 'magentatv'
2023-06-28 15:36:10.342 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp
2023-06-28 15:36:20.561 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8872]
2023-06-28 15:36:20.562 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9590]
2023-06-28 15:36:20.571 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Home battery charge is sufficient (99.0/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: 9590 W
2023-06-28 15:36:20.572 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Appliance is already switched on.
2023-06-28 15:36:20.576 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Home battery charge is sufficient (99.0/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: 9590 W
2023-06-28 15:36:20.577 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Appliance is already switched on.
2023-06-28 15:36:20.579 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Average Excess Power (9590 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2023-06-28 15:36:20.580 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Average Excess Power (9590 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2023-06-28 15:36:43.426 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp
2023-06-28 15:37:20.561 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] Export History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8872, 8872]
2023-06-28 15:37:20.562 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] PV Excess (PV Power - Load Power) History: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9590, 9588]
2023-06-28 15:37:20.567 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Home battery charge is sufficient (99.0/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: 9588 W
2023-06-28 15:37:20.568 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Appliance is already switched on.
2023-06-28 15:37:20.574 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Home battery charge is sufficient (99.0/100.0 %) OR remaining solar forecast is higher than remaining capacity of home battery. Calculated average excess power based on >> solar power - load power <<: 9588 W
2023-06-28 15:37:20.575 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Appliance is already switched on.
2023-06-28 15:37:20.575 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.keller_g_01_wallbox (Prio 1)] Average Excess Power (9588 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2023-06-28 15:37:20.576 DEBUG (MainThread) [custom_components.pyscript.file.pv_excess_control.on_time] [switch.waschkuche_switch_0 (Prio 1)] Average Excess Power (9588 W) is still greater than minimum excess power (-10 W) - Doing nothing.
2023-06-28 15:37:26.499 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp
2023-06-28 15:38:19.587 ERROR (stream_worker) [homeassistant.components.stream.stream.camera.192_168_178_39] Error from stream worker: Error opening stream (ERRORTYPE_113, Host is unreachable) rtsp://****:****@192.168.178.39:554/ipcam_h264.sdp

Diagnostics dump

No response

Xyaren commented 1 year ago

Hi, Thank you for trying out the integration. As you might habe noticed this project is at a very early stage.

I pushed a fix for this issue. Could you please try it out and report back ?

FelixLttks commented 1 year ago

Thank you. Now everything is working as intended :)