Open Curo18 opened 1 year ago
if you access the ip and the port in the browser directly, does it work? and does it still work after you try to add it to home-assistant?
I did some troubleshooting and these are the outcomes:
Reset the Vimar Web Server (unplugged and plugged again from power source)
I can reach the Vimar Web Server from the browser
Run the example.py and I got the following:
I cannot reach anymore the Vimar Web Server from the browser. I have to reset it again.
I have quite a large number of devices so most likely is the same issue reported before #62
i thought so as well. there is a MAX_ROWS_PER_REQUEST in vimarlink.py which is currently set to 300. I you can try to lower this. but if I remember correctly it was not about the number, but due to the complexity of the query that the crashed occured. still you could try it
I tried to lower MAX_ROWS_PER_REQUEST but I got the same result. If is not viable to reduce the complexity of the queries, another possible solution could be to export the sql database from the VIMAR WEB SERVER and run the query on it to populate the VimarProject class. Then, the rest of the code to handle the devices should work. The only drawback is that you have to export the sql lite database every time you change something on the Vimar project.
Anyway, thanks for your time!!!
i am afraid the query will need to run regulary (like every HA restart) to initialize current on/off states.
you could try this: there is a get_room_id function which currently does not have a limit. in your log you should see how many rooms it can find. then add a limit to that query (LIMIT 0, 30) and try to do only half of your rooms to see if that would work.
I followed your suggestion and set MAX_ROWS_PER_REQUEST = 5. Same result. In case you want to investigate I have added some extra log data like the name of the function called and the query used by _generate_device_list function. I have attached the log file. example.log
These are the messages showed on the console:
Config ready
Link ready
Project ready
Logged in
Traceback (most recent call last):
File "/home/HomeAssistant/custom_components/vimar/example/example.py", line 201, in
Hi, I have installed HA v.2023.11.2 using docker compose. When I try to add Vimar integration I got:
and looking at the log file I got: ... 2023-11-16 09:54:48.965 INFO (MainThread) [custom_components.vimar.vimarlink.vimarlink] Vimar link initialized 2023-11-16 09:54:55.231 ERROR (SyncWorker_7) [custom_components.vimar.vimarlink.vimarlink] HTTP timeout occurred
Could it be related to docker installation? This is my compose.yml
version: '3'
services: homeassistant: container_name: homeassistant image: "ghcr.io/home-assistant/home-assistant:stable" volumes:
Thanks for your great job!