Power cycling the KLF200, waiting for it to startup and then restarting HA appears to make no difference as I every time I have tried since updating to 0.104.3 I observe the two connections from HA. I’m planning to do a pcap next to see if I can observe the SSL handshake and see if there is an issue causing the first connection to terminate.
Are you using the velux integration within 0.104.3 or the custom code posted in this thread months ago?
I admit I lost track whether @gibman’s commits made it to a release.
I am using 0.104.3, but still have the custom code from this thread. I do not see the problem you report.
I have occasional problems on restart where Velux does not come up, I would say 90% ok, 10% I need to reboot the Velux. Similar on power cycling everything (i.e. blackout), the system comes up cleanly 90% of the time.
I can see @gibman’s commits in init.py on my HA so it’s part of the release now. Everything was power cycled earlier today and still I’m having the same issue with two connections during start up of HA.
OK - I’ll disable my custom install and rely on the released version and see if I notice a difference.
I’ve been testing for nearly a week now with numerous reboots and the clean 0.104.3 works just as well as the custom code from this thread.
I am also going to purchase some Velux roof Windows with that klf 200 module…
But do you also need a LAN cable connected to it? Or is it optional? Can it also be configured to a WiFi access point?
You’ll need a LAN cable. This is the path HA uses to talk to the KLF 200.
Ok, thnx for info… But what’s the wifi sticker then on the product?
It could be used to connect to klf directly in a web browser and thing’s like that.
But it do not allow API access.
Ah ok, it’s to setup…
Ok thnx for info, looking forward to my velux
Can I use KLF 200 via WiFi and not the LAN port? I don’t see any options to add it to my WiFi. I’m on the latest Velux FW.
Hi,
no you can’t you need to use LAN as far as I know
ok, next month they are about 2 install our 2 new velux with klf 200
just a question, i want to automize it later with HA , but i also have a maze at the inside for the mosquitos… so if you open the covers, can you say like, only open for some xx % only ?
yes you can open by a percentage and HA can control it just as the Velux remote can.
Yes, you can control the percentage. There is a neat card called “Vertical Slider Cover Card”, available in HACS. There you can control the windows and also shutters manually and also have a visual feedback on the state. It is not realtime though, because the KLF seems to report the status only if the movement is finished.
The KLF 200 is quite a crude component. Web access is only available for a certain time after restart, and the connection is sometimes not re-established when HA restarts (I guess the KLF supports only one active connection). I suggest using a smartplug to power the KLF, so in the event the connection is not established you can powercyle it remotely or even automate it.
Ok, good tips! Thnx for this
yes, I’ve tried this, but it doesn’t automatically scale and the skeuomorphic design may clash with other cards visually.
The vertical slider cover card can be used for shutters, blinds, windows, etc. And I had a few emails with the developer - he is very kind and made some quick improvements based on my suggestions
That’s also important indeed
Hi
I just received my KLF 200 and I don’t manage do make it work. I have the error above in logs.
Do you have some idea to help me ?
2020-07-18 00:13:35 WARNING (MainThread) [pyvlx] Connected to: KLF 200: Software version: 0.2.0.0.71.0, hardware version: 6, protocol version: 3.14
ValueError: 378 is not a valid NodeTypeWithSubtype
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/asyncio/sslproto.py", line 545, in data_received
self._app_protocol.data_received(chunk)
File "/usr/local/lib/python3.7/site-packages/pyvlx/connection.py", line 52, in data_received
frame = frame_from_raw(raw)
File "/usr/local/lib/python3.7/site-packages/pyvlx/frame_creation.py", line 40, in frame_from_raw
frame.from_payload(payload)
File "/usr/local/lib/python3.7/site-packages/pyvlx/frames/frame_get_all_nodes_information.py", line 127, in from_payload
self.node_type = NodeTypeWithSubtype(payload[69] * 256 + payload[70])
File "/usr/local/lib/python3.7/enum.py", line 310, in __call__
return cls.__new__(cls, value)
File "/usr/local/lib/python3.7/enum.py", line 564, in __new__
raise exc
File "/usr/local/lib/python3.7/enum.py", line 548, in __new__
result = cls._missing_(value)
File "/usr/local/lib/python3.7/enum.py", line 577, in _missing_
raise ValueError("%r is not a valid %s" % (value, cls.__name__))
ValueError: 378 is not a valid NodeTypeWithSubtype
2020-07-18 00:13:47 ERROR (MainThread) [homeassistant.components.velux] Can't connect to velux interface: <PyVLXException description="Unable to retrieve node information" />
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 31, in async_setup
await hass.data[DATA_VELUX].async_start()
File "/usr/src/homeassistant/homeassistant/components/velux/__init__.py", line 70, in async_start
await self.pyvlx.load_nodes()
File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 83, in load_nodes
await self.nodes.load(node_id)
File "/usr/local/lib/python3.7/site-packages/pyvlx/nodes.py", line 70, in load
await self._load_all_nodes()
File "/usr/local/lib/python3.7/site-packages/pyvlx/nodes.py", line 88, in _load_all_nodes
raise PyVLXException("Unable to retrieve node information")
pyvlx.exception.PyVLXException: <PyVLXException description="Unable to retrieve node information" />
2020-07-18 00:13:47 ERROR (MainThread) [homeassistant.setup] Setup failed for velux: Integration failed to initialize.