# the actual fix.
for node in self.pyvlx.nodes:
_LOGGER.info("stopping node: " + str(node))
await node.stop(wait_for_completion=False)
it seems sending a stop command to a velux device makes it report its actual correct state.
Luckily this is only done once at component start up
I would have gone deeper into the pyvlx sources but as stated above I couldn’t make it connect at all. So my programming adventure ends with editing the files outside of pyvlx.
I’m almost sure a better fix is available within the pyvlx package itself.
Can someone with a working KLF200 [Firmware 2.0.0.71] confirm if WebGui is responding from LAN port? I had two boxes i upgraded and only can connect to native Wifi ?
I impossible to trace the error if i dont know if the box i broken or this is normal behavior
@gibman I do have the rebooting issue you reported.
I am trying your patch, but I don’t see any improvement
I do see messages in the HA log telling me I have the custom velux component.
I just realized that the sliders for the non window specific velux devices within hass.io does not correspond with how it’s rendered in the official Velux touch remote.
Ive uploaded an example of my kitchen blinds/windows as seen from the velux remote control point of view as well as the corresponding view as seen in hass.io.
the current physical state of the window is : Fully closed (shut)
the current physical state of the blind is : Fully open, light is entering the room
Now my OCD is severely triggered.
Also regarding the arrow buttons for the covers on the hass.io UI:
Looking it at the velux remote control manual for the KLR100 model we have:
Arrow Key Up:
OPEN/UP
Arrow Key Down:
CLOSE/DOWN
The buttons seems to be correct for both windows and blinds
How it should work:
The blinds (gardin køkken 1) should be position: 0 for the blinds fully open
The blinds (gardin køkken 1) should be position: 100 for the blinds fully closed
the windows scenario seems to get it right, so no changes needed there.
also, shutters, awning blinds are also wrong.
so we just need a small fix to inverse the order of the position for these cover types.
Hmm, I dont see the KLF200 showing me anything relevant about the open / close state.
Even using just the KLF200 I open and close the blind on the skylight and it show the same thing either way (and I note this is a single blind not a group which could be more complicated).
Earlier in this thread there is comment about being unable to restart HA with the new Velux code.
I am still using the custom component from gibman.
I had this again just now; only it not only failed to restart HA, it wouldnt start even after power cycling the Raspberry Pi. I never had that before. I’ve always been able to power cycle to get HA back up.
=> I had to power cycle the KLF200 to get it HA going again.
Here is another image of one blind being operated from open / 0 to half closed / 49.
You are right… the klf200 does not maintain the status of the bottom slider as well as the digit /49. As long as the blind is being operated the status and digit are shown. Once its in place its hidden.
But it does seem like from the point of view of the velux remote that 100 indicates a fully closed blind and 0 being open.
Its reversed on the cover component within hass.io.
I did a few changes locally in covers.py for the velux component and was able to reverse the slider making it corresponding with the velux remote. But sadly this reversed the buttoms also.
So the arrow down button would close the blind / blinds going down. And vice versa for the up button.
Just getting back to this thread and I have picked up velux_patch2. Thanks @gibman.
For your reference, when I ran the first patch I was running 0.88.1 on Hasbian (this install died with a flash card failure).
I had been running a clean 0.93.2 without too many reboot problems, but then I got one today and came back to this thread. I installed the updated patch and rebooted and I immediately got the failure below.
I don’t think its worth tracking down (for now at least). It cleared up after rebooting the KLF, so something in the original failure may have been the root cause.
BTW - What do you use to extract the rar? I’ve been using windows and some snarky extractor and moving the files over SAMBA. Is there a unix utility I can use on hassio to extract rar?
2019-06-16 14:42:54 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for velux which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you do experience issues with Home Assistant.
2019-06-16 14:43:02 ERROR (MainThread) [homeassistant.components.device_tracker] Unable to load /config/known_devices.yaml: Config file not found: /config/known_devices.yaml
2019-06-16 14:44:01 ERROR (MainThread) [homeassistant.setup] Error during setup of component velux
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/setup.py”, line 153, in _async_setup_component
hass, processed_config)
File “/config/custom_components/velux/init.py”, line 35, in async_setup
await hass.data[DATA_VELUX].async_start()
File “/config/custom_components/velux/init.py”, line 70, in async_start
await self.pyvlx.load_scenes()
File “/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py”, line 87, in load_scenes
await self.scenes.load()
File “/usr/local/lib/python3.7/site-packages/pyvlx/scenes.py”, line 51, in load
await get_scene_list.do_api_call()
File “/usr/local/lib/python3.7/site-packages/pyvlx/api_event.py”, line 22, in do_api_call
await self.send_frame()
File “/usr/local/lib/python3.7/site-packages/pyvlx/api_event.py”, line 34, in send_frame
await self.pyvlx.send_frame(self.request_frame())
File “/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py”, line 70, in send_frame
await self.connect()
File “/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py”, line 45, in connect
await self.connection.connect()
File “/usr/local/lib/python3.7/site-packages/pyvlx/connection.py”, line 89, in connect
ssl=self.create_ssl_context())
File “uvloop/loop.pyx”, line 1945, in create_connection
File “uvloop/loop.pyx”, line 1942, in uvloop.loop.Loop.create_connection
ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection
2019-06-16 14:44:32 ERROR (MainThread) [frontend.js.latest.201905140] http://192.168.2.240:8123/frontend_latest/chunk.8abe6b9573af3d1ad82d.js:2875:1345 Uncaught TypeError: Cannot read property ‘isOff’ of undefined
2019-06-16 14:44:32 ERROR (MainThread) [frontend.js.latest.201905140] http://192.168.2.240:8123/frontend_latest/chunk.8abe6b9573af3d1ad82d.js:2875:1345 Uncaught TypeError: Cannot read property ‘isOff’ of undefined
2019-06-16 14:47:26 ERROR (MainThread) [homeassistant.components.hassio.handler] Timeout on /homeassistant/restart request
I received this error trace on a reboot today, and I needed to restart the Velux hub.
2019-07-06 19:42:58 ERROR (MainThread) [homeassistant.setup] Error during setup of component velux
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/homeassistant/setup.py", line 153, in _async_setup_component
hass, processed_config)
File "/config/custom_components/velux/__init__.py", line 35, in async_setup
await hass.data[DATA_VELUX].async_start()
File "/config/custom_components/velux/__init__.py", line 70, in async_start
await self.pyvlx.load_scenes()
File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 87, in load_scenes
await self.scenes.load()
File "/usr/local/lib/python3.7/site-packages/pyvlx/scenes.py", line 51, in load
await get_scene_list.do_api_call()
File "/usr/local/lib/python3.7/site-packages/pyvlx/api_event.py", line 22, in do_api_call
await self.send_frame()
File "/usr/local/lib/python3.7/site-packages/pyvlx/api_event.py", line 34, in send_frame
await self.pyvlx.send_frame(self.request_frame())
File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 70, in send_frame
await self.connect()
File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 45, in connect
await self.connection.connect()
File "/usr/local/lib/python3.7/site-packages/pyvlx/connection.py", line 89, in connect
ssl=self.create_ssl_context())
File "uvloop/loop.pyx", line 1945, in create_connection
File "uvloop/loop.pyx", line 1942, in uvloop.loop.Loop.create_connection
ConnectionAbortedError: SSL handshake is taking longer than 60.0 seconds: aborting the connection