erikkastelec / hass-WEM-Portal

Custom component for retrieving sensor information from Weishaupt WEM Portal
MIT License
44 stars 9 forks source link

ERROR (MainThread) [custom_components.wemportal] Creating new wemportal api instance #66

Open nagelclan opened 1 year ago

nagelclan commented 1 year ago

home-assistant_2023-05-02T11-59-02.385Z.log

System cannot be started, the following error messages always appear, see appendix

erikkastelec commented 1 year ago
  1. Did the previous version work for you?
  2. Have you checked that your Weishaupt device device is accessible from website or mobile app (is online)?
  3. I see a few other errors about fetching data (ezviz, shelly, skoda). Could this be related? If multiple integrations are failing to fetch data, the problem is likely with your setup and not with this custom component.
aserowy commented 1 year ago

Heho,

i am getting the same error. My setup was running with 1.4.*. After the migration to 1.5.2 i am getting the mentioned behavior. I removed all entities, removed the yaml config, reloaded and reinstalled the integration without success.

Kind regards, and thank you for this integration!

erikkastelec commented 1 year ago

I will implement additional logging and release an updated version for you to test.

aserowy commented 1 year ago

Perfect! Tyvm!

nagelclan commented 1 year ago
  1. Hat die vorherige Version für Sie funktioniert? Nein, ich hab es noch nicht zum laufen gebracht
  2. Haben Sie überprüft, ob Ihr Weishaupt-Gerät über die Website oder mobile App erreichbar ist (online ist)? Ja , online ist die Seite erreichbar
  3. Ich sehe einige andere Fehler beim Abrufen von Daten (ezviz, shelly, skoda). Könnte das zusammenhängen? Wenn mehrere Integrationen keine Daten abrufen können, liegt das Problem wahrscheinlich bei Ihrer Einrichtung und nicht bei dieser benutzerdefinierten Komponente. das liegt daran das dies Komponenten teilweise offline sind
erikkastelec commented 1 year ago

A new version has been released. Please feel free to test it out and send me any log messages you encounter.

aserowy commented 1 year ago

Hi, ty for the update. This is the log the failed attempt produces:

This error originated from a custom integration.

Logger: custom_components.wemportal Source: custom_components/wemportal/wemportalapi.py:142 Integration: Weishaupt WEM Portal (documentation, issues) First occurred: 6:06:24 PM (4 occurrences) Last logged: 6:07:08 PM

Creating new wemportal api instance Traceback (most recent call last): File "/config/custom_components/wemportal/wemportalapi.py", line 384, in get_data "Modules": [ File "/config/custom_components/wemportal/wemportalapi.py", line 390, in for parameter in module["parameters"].keys() KeyError: 'parameters'

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

Traceback (most recent call last): File "/config/custom_components/wemportal/wemportalapi.py", line 99, in fetch_data self.get_data() File "/config/custom_components/wemportal/wemportalapi.py", line 399, in get_data raise WemPortalError(DATA_GATHERING_ERROR) from exc custom_components.wemportal.exceptions.WemPortalError: An error occurred while gathering data.This issue should resolve by itself. If this problem persists,open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues

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

Traceback (most recent call last): File "/config/custom_components/wemportal/coordinator.py", line 47, in _async_update_data x = await self.hass.async_add_executor_job(self.api.fetch_data) File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/wemportal/wemportalapi.py", line 142, in fetch_data raise WemPortalError from exc custom_components.wemportal.exceptions.WemPortalError

erikkastelec commented 1 year ago

Can you turn on the debug logging (instructions are at the bottom of README) and include the debug log that should be printed out before this error.

aserowy commented 1 year ago

Heho,

i extracted the part which fails again, and again, and... :D

2023-05-07 19:05:41.735 WARNING (MainThread) [custom_components.wemportal] Creating new wemportal api instance File "/config/custom_components/wemportal/wemportalapi.py", line 384, in get_data File "/config/custom_components/wemportal/wemportalapi.py", line 390, in File "/config/custom_components/wemportal/wemportalapi.py", line 99, in fetch_data File "/config/custom_components/wemportal/wemportalapi.py", line 399, in get_data raise WemPortalError(DATA_GATHERING_ERROR) from exc custom_components.wemportal.exceptions.WemPortalError: An error occurred while gathering data.This issue should resolve by itself. If this problem persists,open an issue at https://github.com/erikkastelec/hass-WEM-Portal/issues File "/config/custom_components/wemportal/coordinator.py", line 47, in _async_update_data File "/config/custom_components/wemportal/wemportalapi.py", line 142, in fetch_data raise WemPortalError from exc custom_components.wemportal.exceptions.WemPortalError 2023-05-07 19:05:41.738 DEBUG (MainThread) [custom_components.wemportal] Finished fetching WemPortal update data in 0.414 seconds (success: False) 2023-05-07 19:07:02.028 DEBUG (SyncWorker_9) [custom_components.wemportal] Fetching api device data 2023-05-07 19:07:02.296 DEBUG (SyncWorker_9) [custom_components.wemportal] Fetching fresh api data 2023-05-07 19:07:02.300 DEBUG (SyncWorker_9) [custom_components.wemportal] {(0, 9): {'Index': 0, 'Type': 9, 'Name': 'Gerät 0'}, (0, 10): {'Index': 0, 'Type': 10, 'Name': 'GROUND0'}, (0, 1): {'Index': 0, 'Type': 1, 'Name': 'SYSTEM0'}, (0, 2): {'Index': 0, 'Type': 2, 'Name': 'HZK0'}, (0, 3): {'Index': 0, 'Type': 3, 'Name': 'WW0'}, (0, 6): {'Index': 0, 'Type': 6, 'Name': 'GATEWAY0'}, (0, 5): {'Index': 0, 'Type': 5, 'Name': 'TERMINAL0'}, (0, 7): {'Index': 0, 'Type': 7, 'Name': 'WE0'}, (1, 9): {'Index': 1, 'Type': 9, 'Name': 'Gerät 0'}, (1, 10): {'Index': 1, 'Type': 10, 'Name': 'GroundModule'}}

FYI: There are no other debug logs regarding the integration.

nagelclan commented 1 year ago

here the aktuell Log home-assistant_2023-05-07T17-11-50.990Z.log

erikkastelec commented 1 year ago

@aserowy you should get something like this when the integration starts/new api is created. Maybe you need to click load full logs button at the bottom of the logs page in Home Assistant.

2023-05-07 17:13:22.543 DEBUG (SyncWorker_1) [custom_components.wemportal] Fetching api parameters data for device 2496
2023-05-07 17:13:22.544 DEBUG (SyncWorker_1) [custom_components.wemportal] {2496: {'ConnectionStatus': 0}}
2023-05-07 17:13:22.802 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [], 'Status': 0, 'Message': None, 'DetailMessages': None}
2023-05-07 17:13:23.127 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [], 'Status': 0, 'Message': None, 'DetailMessages': None}
2023-05-07 17:13:23.379 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [], 'Status': 0, 'Message': None, 'DetailMessages': None}
2023-05-07 17:13:23.675 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [{'ParameterID': 'Außentemperatur', 'Name': 'Außentemperatur', 'DataType': -1, 'MinValue': 0.0, 'MaxValue': 0.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': False, 'EnumValues': None}, {'ParameterID': 'Vorlauftemperatur', 'Name': 'Vorlauftemperatur', 'DataType': -1, 'MinValue': 0.0, 'MaxValue': 0.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': False, 'EnumValues': None}, {'ParameterID': 'Leistung', 'Name': 'Leistungsabgabe', 'DataType': -1, 'MinValue': 0.0, 'MaxValue': 0.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': False, 'EnumValues': None}], 'Status': 0, 'Message': None, 'DetailMessages': None}
2023-05-07 17:13:24.176 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [{'ParameterID': 'WW-Push', 'Name': 'Nachladung', 'DataType': 1, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': [{'Value': 0, 'Name': 'off'}, {'Value': 5, 'Name': '5'}, {'Value': 10, 'Name': '10'}, {'Value': 15, 'Name': '15'}, {'Value': 20, 'Name': '20'}, {'Value': 25, 'Name': '25'}, {'Value': 30, 'Name': '30'}, {'Value': 35, 'Name': '35'}, {'Value': 40, 'Name': '40'}, {'Value': 45, 'Name': '45'}, {'Value': 50, 'Name': '50'}, {'Value': 55, 'Name': '55'}, {'Value': 60, 'Name': '60'}, {'Value': 65, 'Name': '65'}, {'Value': 70, 'Name': '70'}, {'Value': 75, 'Name': '75'}, {'Value': 80, 'Name': '80'}, {'Value': 85, 'Name': '85'}, {'Value': 90, 'Name': '90'}, {'Value': 95, 'Name': '95'}, {'Value': 100, 'Name': '100'}, {'Value': 105, 'Name': '105'}, {'Value': 110, 'Name': '110'}, {'Value': 115, 'Name': '115'}, {'Value': 120, 'Name': '120'}, {'Value': 125, 'Name': '125'}, {'Value': 130, 'Name': '130'}, {'Value': 135, 'Name': '135'}, {'Value': 140, 'Name': '140'}, {'Value': 145, 'Name': '145'}, {'Value': 150, 'Name': '150'}, {'Value': 155, 'Name': '155'}, {'Value': 160, 'Name': '160'}, {'Value': 165, 'Name': '165'}, {'Value': 170, 'Name': '170'}, {'Value': 175, 'Name': '175'}, {'Value': 180, 'Name': '180'}, {'Value': 185, 'Name': '185'}, {'Value': 190, 'Name': '190'}, {'Value': 195, 'Name': '195'}, {'Value': 200, 'Name': '200'}, {'Value': 205, 'Name': '205'}, {'Value': 210, 'Name': '210'}, {'Value': 215, 'Name': '215'}, {'Value': 220, 'Name': '220'}, {'Value': 225, 'Name': '225'}, {'Value': 230, 'Name': '230'}, {'Value': 235, 'Name': '235'}, {'Value': 240, 'Name': '240'}]}, {'ParameterID': 'WW-Programm', 'Name': 'WW-Programm', 'DataType': 2, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'NormalWW', 'Name': 'WW  Normal', 'DataType': -1, 'MinValue': 5.0, 'MaxValue': 60.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'AbsenkWW', 'Name': 'WW  Absenk', 'DataType': -1, 'MinValue': 5.0, 'MaxValue': 60.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Warmwassertemperatur', 'Name': 'Warmwassertemperatur', 'DataType': -1, 'MinValue': 0.0, 'MaxValue': 0.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': False, 'EnumValues': None}], 'Status': 0, 'Message': None, 'DetailMessages': None}
2023-05-07 17:13:24.447 DEBUG (SyncWorker_1) [custom_components.wemportal] {'Parameters': [{'ParameterID': 'Heizprogramm1', 'Name': 'Heizprogramm1', 'DataType': 2, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'U_Beginn', 'Name': 'U_Beginn', 'DataType': 2, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'U_Ende', 'Name': 'U_Ende', 'DataType': 2, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Raumtemperatur', 'Name': 'HK 1 Raumtemperatur', 'DataType': -1, 'MinValue': 0.0, 'MaxValue': 0.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': False, 'EnumValues': None}, {'ParameterID': 'AktRaumSoll', 'Name': 'HK 1 Raumsoll', 'DataType': -1, 'MinValue': 16.0, 'MaxValue': 28.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Komfort', 'Name': 'HK1 Raum Komfort', 'DataType': -1, 'MinValue': 21.0, 'MaxValue': 28.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Absenk', 'Name': 'HK 1 Raum Absenk', 'DataType': -1, 'MinValue': 16.0, 'MaxValue': 21.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Normal', 'Name': 'HK 1 Raum Normal', 'DataType': -1, 'MinValue': 16.0, 'MaxValue': 22.0, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': None}, {'ParameterID': 'Betriebsart', 'Name': 'Systembetriebsart', 'DataType': 1, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': [{'Value': 1, 'Name': 'heating'}, {'Value': 3, 'Name': 'summer'}, {'Value': 4, 'Name': 'standby'}, {'Value': 0, 'Name': 'automatic'}, {'Value': 2, 'Name': 'cooling'}, {'Value': 5, 'Name': '2.  WEZ'}]}, {'ParameterID': 'PP_Funktion', 'Name': 'Party/Pause', 'DataType': 1, 'MinValue': None, 'MaxValue': None, 'DefaultValue': '', 'IsReadable': True, 'IsWriteable': True, 'EnumValues': [{'Value': 1, 'Name': 'break time  12.0 h'}, {'Value': 2, 'Name': 'break time  11.5 h'}, {'Value': 3, 'Name': 'break time  11.0 h'}, {'Value': 4, 'Name': 'break time  10.5 h'}, {'Value': 5, 'Name': 'break time  10.0 h'}, {'Value': 6, 'Name': 'break time  9.5 h'}, {'Value': 7, 'Name': 'break time  9.0 h'}, {'Value': 8, 'Name': 'break time  8.5 h'}, {'Value': 9, 'Name': 'break time  8.0 h'}, {'Value': 10, 'Name': 'break time  7.5 h'}, {'Value': 11, 'Name': 'break time  7.0 h'}, {'Value': 12, 'Name': 'break time  6.5 h'}, {'Value': 13, 'Name': 'break time  6.0 h'}, {'Value': 14, 'Name': 'break time  5.5 h'}, {'Value': 15, 'Name': 'break time  5.0 h'}, {'Value': 16, 'Name': 'break time  4.5 h'}, {'Value': 17, 'Name': 'break time  4.0 h'}, {'Value': 18, 'Name': 'break time  3.5 h'}, {'Value': 19, 'Name': 'break time  3.0 h'}, {'Value': 20, 'Name': 'break time  2.5 h'}, {'Value': 21, 'Name': 'break time  2.0 h'}, {'Value': 22, 'Name': 'break time  1.5 h'}, {'Value': 23, 'Name': 'break time  1.0 h'}, {'Value': 24, 'Name': 'break time  0.5 h'}, {'Value': 25, 'Name': 'automatic'}, {'Value': 26, 'Name': 'party  0.5 h'}, {'Value': 27, 'Name': 'party  1.0 h'}, {'Value': 28, 'Name': 'party  1.5 h'}, {'Value': 29, 'Name': 'party  2.0 h'}, {'Value': 30, 'Name': 'party  2.5 h'}, {'Value': 31, 'Name': 'party  3.0 h'}, {'Value': 32, 'Name': 'party  3.5 h'}, {'Value': 33, 'Name': 'party  4.0 h'}, {'Value': 34, 'Name': 'party  4.5 h'}, {'Value': 35, 'Name': 'party  5.0 h'}, {'Value': 36, 'Name': 'party  5.5 h'}, {'Value': 37, 'Name': 'party  6.0 h'}, {'Value': 38, 'Name': 'party  6.5 h'}, {'Value': 39, 'Name': 'party  7.0 h'}, {'Value': 40, 'Name': 'party  7.5 h'}, {'Value': 41, 'Name': 'party  8.0 h'}, {'Value': 42, 'Name': 'party  8.5 h'}, {'Value': 43, 'Name': 'party  9.0 h'}, {'Value': 44, 'Name': 'party  9.5 h'}, {'Value': 45, 'Name': 'party  10.0 h'}, {'Value': 46, 'Name': 'party  10.5 h'}, {'Value': 47, 'Name': 'party  11.0 h'}, {'Value': 48, 'Name': 'party  11.5 h'}, {'Value': 49, 'Name': 'party  12.0 h'}]}], 'Status': 0, 'Message': None, 'DetailMessages': None}
erikkastelec commented 1 year ago

here the aktuell Log home-assistant_2023-05-07T17-11-50.990Z.log

@nagelclan I released a new version with more logging related to your issue. Please update. Sorry for the inconvenience

nagelclan commented 1 year ago

I installed 1.5.4, here is the current log file home-assistant_2023-05-07T17-50-31.656Z.log

erikkastelec commented 1 year ago

New version is available for testing

nagelclan commented 1 year ago

Now i have 1.5.5 here is the current log file home-assistant_2023-05-08T04-37-52.810Z.log

erikkastelec commented 1 year ago

New release is available

nagelclan commented 1 year ago

Now i have 1.5.6 here is the current log file home-assistant_2023-05-08T09-56-32.224Z.log

erikkastelec commented 1 year ago

Version 1.5.7 is out

nagelclan commented 1 year ago

home-assistant_2023-05-08T12-18-30.086Z.log 1.5.7

nagelclan commented 1 year ago

Now i have 1.5.8 here is the current log file home-assistant_2023-05-12T05-35-54.690Z.log

nagelclan commented 1 year ago

now the access works, I changed from API to WEB, and now have access to the data THX