pawlizio / my_velux

Custom component of velux integration for Home Assistant
32 stars 9 forks source link

Setup failed when no internet connection is available #54

Open 0BanZai0 opened 2 months ago

0BanZai0 commented 2 months ago

Hi, Im struggling to get this component running. I have a working Default-Velux KLF200 integration up and running.

I really need some of the great additions of this CC for my switches and automations.

My problem: I'm getting an error on startup of HA:

"Logger: homeassistant.setup Quelle: setup.py:269 Erstmals aufgetreten: 07:57:56 (1 Vorkommnisse) Zuletzt protokolliert: 07:57:56

Setup failed for custom integration 'velux': Requirements for velux not found: lgit+https://github.com/pawlizio/pyvlx.git@fire-forgot-issue#pyvIx==0.3.23]."

My analysis shows that I need an internet connection to initialize the CC. I have no internet in my new home that is under construction right now. That's why I brought my HA server and the KLF200 to my old home with a working internet connection. Here the startup was without any errors and I was able to see the addition entities and stuff.

But when I brought back the devices to my internetless place this morning, I got the same error again.

TLDR: do I need to have an internet connection every time I start the Velux custom component?

Thx for your help!

0BanZai0 commented 2 months ago

I think I've narrowed this issue down to the manifest.json with my basic understanding of software development..

In this line, it seems to initialize an intstallation of the PyVLX library every time the integration is started: "requirements": ["git+https://github.com/pawlizio/pyvlx.git@fire-forgot-issue#pyvlx==0.3.23"],

Is there any way to implement this library offline within the my_velux solution?

pawlizio commented 2 months ago

I just now blocked my homeassistant on my router and then restarted homeassistant. Actually I had no issue to connect to KLF200.

Once pyvlx is installed, so after setup with internet connection, I don't think it is necessary if you then remove the internet. But probably you should not only install the custom_component, but also setup a first connection with your KLF when the internet is present in order to fully setup the custom_component. Probably the requirement libraries are only installed during setup via Integrations page. I do not know how HA is handling this. But afterwards you can move both devices to your location without internet.

Does your HA server support Wifi? Have you tried to build up access point using your mobile?