h4de5 / home-assistant-vimar

VIMAR by-me integration into home-assistant.io
GNU General Public License v3.0
43 stars 6 forks source link

Large vimar project cannot be loaded, crashes vimar server #62

Open Lelloxd opened 1 year ago

Lelloxd commented 1 year ago

I'm trying to load the integration but it shows the attached logs and after it tries to establish the connection with the webserver this one becomes unavailable: it's stuck on loading if I try to access it from my browser and need to manually shut it down and back on in order for it to work.

2023-05-06 01:20:18.586 WARNING (SyncWorker_4) [homeassistant.loader] We found a custom integration vimar 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-05-06 01:20:18.597 WARNING (SyncWorker_4) [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-05-06 01:20:44.529 DEBUG (MainThread) [custom_components.vimar] Configuration from yaml already imported: you can remove from yaml 2023-05-06 01:20:44.720 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 01:20:44.721 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 01:21:14.723 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 30.002 seconds (success: False) 2023-05-06 01:21:14.724 WARNING (MainThread) [homeassistant.config_entries] Config entry '192.168.1.90' for vimar integration not ready yet; Retrying in background 2023-05-06 01:21:14.814 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 01:21:14.814 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 01:21:15.210 ERROR (SyncWorker_3) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred 2023-05-06 01:21:44.817 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 30.003 seconds (success: False) 2023-05-06 01:21:45.420 ERROR (SyncWorker_2) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred 2023-05-06 01:21:55.136 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 01:21:55.137 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 01:22:25.139 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 30.002 seconds (success: False) 2023-05-06 01:22:25.486 ERROR (SyncWorker_5) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred 2023-05-06 01:22:45.571 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 01:22:45.572 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 01:23:15.575 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 30.003 seconds (success: False) 2023-05-06 01:23:15.901 ERROR (SyncWorker_6) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred

Setup

h4de5 commented 1 year ago

are you sure your vimar web server is reachable at 192.168.1.90? do you have placed the web server's certificate into your config directory manualy? or what was your configuration?

Lelloxd commented 1 year ago
image

My config is the following: vimar: username: ha password: '*******' host: 192.168.1.90 schema: https port: 443 timeout: 60 The 'ha' user has every permisson possibile on the vimar webserver.

I rebooted everything and this are the complete server log with fresh started hassio and vimar webserver: 2023-05-06 11:15:56.922 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration vimar 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-05-06 11:15:56.934 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-05-06 11:16:20.760 DEBUG (MainThread) [custom_components.vimar] Configuration from yaml already imported: you can remove from yaml 2023-05-06 11:16:21.511 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 11:16:21.512 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 11:16:28.320 INFO (SyncWorker_1) [custom_components.vimar.vimarlink.vimarlink] Vimar login ok 2023-05-06 11:16:28.321 DEBUG (SyncWorker_1) [custom_components.vimar.vimarlink.vimarlink] Got a new Vimar Session id: 64561aeaf2b61 2023-05-06 11:16:28.325 DEBUG (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] get_remote_devices started - from 0 to 300 2023-05-06 11:16:28.947 DEBUG (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] get_main_groups start 2023-05-06 11:16:29.279 DEBUG (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] get_room_ids ends - payload: [{'id': '49856', 'name': 'HALL PIANO TERRA'}, {'id': '49862', 'name': 'CUCINA'}, {'id': '49873', 'name': 'CUCINA EST'}, {'id': '49879', 'name': 'SALOTTO 01'}, {'id': '49885', 'name': 'SALOTTO 02'}, {'id': '49891', 'name': 'ATRIO SUPERIORE'}, {'id': '49897', 'name': 'STUDIO'}, {'id': '49903', 'name': 'SCALE'}, {'id': '49909', 'name': 'CAMERA MATRIMONIALE'}, {'id': '49915', 'name': 'BAGNO SUD'}, {'id': '49921', 'name': 'BAGNO EST'}, {'id': '49927', 'name': 'GARAGE NORD'}, {'id': '49933', 'name': 'CAMERETTA SUD'}, {'id': '49939', 'name': 'CAMERETTA EST'}, {'id': '49945', 'name': 'CAMERETTA NORD'}, {'id': '49956', 'name': 'BAGNO INFERIORE'}, {'id': '49971', 'name': 'SALOTTO'}, {'id': '49984', 'name': 'BAGNO NORD'}, {'id': '49988', 'name': 'LAVANDERIA'}, {'id': '49992', 'name': 'CUCINA 01'}, {'id': '49996', 'name': 'CUCINA PIANO'}, {'id': '50000', 'name': 'CUCINA 02'}, {'id': '50004', 'name': 'CUCINA ESTERNO'}, {'id': '50008', 'name': 'LAVANDERIA ESTERNO'}, {'id': '50012', 'name': 'INGRESSO ESTERNO'}, {'id': '50019', 'name': 'ATRIO'}, {'id': '50026', 'name': 'CUCINA NORD'}, {'id': '50033', 'name': 'SALOTTO INFERIORE'}, {'id': '50037', 'name': 'INGRESSO INFERIORE'}, {'id': '50041', 'name': 'GARAGE'}, {'id': '50045', 'name': 'GARAGE ESTERNO'}, {'id': '50049', 'name': 'VANO TECNICO'}, {'id': '50056', 'name': 'GUARDAROBA'}, {'id': '50073', 'name': 'CAMERA MATRIMONIALE ESTERNO'}, {'id': '50080', 'name': 'GIARDINO SUPERIORE'}, {'id': '50085', 'name': 'GIARDINO INFERIORE'}, {'id': '50089', 'name': 'GIARDINO 01'}, {'id': '50096', 'name': 'NAVATA'}, {'id': '50103', 'name': 'INGRESSO'}, {'id': '50107', 'name': 'GIARDINO EST'}, {'id': '50111', 'name': 'ENTRATA'}, {'id': '50115', 'name': 'PISCINA ESTERNO'}, {'id': '50130', 'name': 'ENTRATA ESTERNO'}, {'id': '50135', 'name': 'INTERNO'}, {'id': '50205', 'name': 'CUCINA PIANO TERRA'}, {'id': '50232', 'name': 'BAGNO INTERNO'}, {'id': '62410', 'name': 'CAMERA NORD'}] 2023-05-06 11:16:29.279 INFO (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] get_room_ids ends - found 47 rooms 2023-05-06 11:16:29.283 DEBUG (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] get_room_devices started - from 0 to 300 2023-05-06 11:16:58.326 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 36.813 seconds (success: False) 2023-05-06 11:16:58.327 WARNING (MainThread) [homeassistant.config_entries] Config entry '192.168.1.90' for vimar integration not ready yet; Retrying in background 2023-05-06 11:16:58.431 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 11:16:58.432 DEBUG (MainThread) [custom_components.vimar] Updating coordinator.. 2023-05-06 11:16:59.587 ERROR (SyncWorker_4) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred 2023-05-06 11:16:59.633 ERROR (MainThread) [homeassistant.components.hassio.handler] /discovery return code 500 2023-05-06 11:16:59.661 ERROR (MainThread) [homeassistant.components.hassio.discovery] Can't read discover info: 2023-05-06 11:17:28.435 DEBUG (MainThread) [custom_components.vimar] Finished fetching vimar data in 30.003 seconds (success: False) 2023-05-06 11:17:29.029 ERROR (SyncWorker_0) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred 2023-05-06 11:17:38.517 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-05-06 11:17:38.518 DEBUG (MainThread) [custom_components.vimar] Updating coordinator..

Lelloxd commented 1 year ago

what's weird is that after I try to connect via your integration to the vimar webserver it starts not responding to its webpage and eventually throws a 502: bad gateway error.

h4de5 commented 1 year ago

yeah i see. the server is reachable but it seems your vimar project is pretty large: "found 47 rooms" i have not tested it with such a large setup. it is possible that after the rooms are retrieved it tries to read all devices in that rooms and the webserver cannot handle everything in one query and therefore restarts.

there is currently no option to read devices in groups, so the only way would be to limit the user to certain rooms to check if the integration is working correctly - if this is even possible from vimar's permission model.