Hello everyone - is there an updated version of the velux component planned that supports the official api? I have purchased the KLF 200 and upgraded the firmware first to 2.0.0.71 - big mistake because now I am not able to use it via HA. It took me a few hours to figure out what is “wrong”…
The link for the official API and the firmware: https://www.velux.com/api/klf200
I’m no programmer, so I’m of no use here unfortunately…
I am also interested in this. I have the KLF200 and am getting started with HA.
I see this work for openhab
Here is the main Velux site for the new firmware
On that page there are links to the firmware, usage examples and very impressive documentation.
Looks like a major rework of the original firmware though
Hi Julius
Thanks so much for the commit. I look forward to playing with it over the holidays.
I am actually very new to HA. I’ve just installed it and written a handful of automation so far.
I am not sure how to pull your release in.
I installed HA via Hassbian (rather than Hass.io), I assume that wont matter.
I am expecting to just SSH into the Raspberry Pi and do a git pull from some location, but I have been unable to find any instructions. Any pointers would be appreciated
Regards,
Jason
I upgraded to 2.0.0.71 before trying to do anything with my KLF 200. Since then, I can use the web UI when connected to it over wifi but trying to pair anything using my KLI 110 remotes does not work.
Even when I called their US support to walk through adding the skylights without a computer to try it the old fashion way does it work. Any chance the new firmware is not for the US market?
I can ping the unit and I can use the web UI but no way of using to control the skylights so far.
Has anyone in the US gotten the new firmware to work in combination with the KLI 110 remotes?
Hi all, so the new velux support has apparently landed in 0.88.0. Unfortunately, the component still is not properly connecting for me.
I’ve double-and-triple checked the hostname (matches the IP assigned to the KLF200, it pings, LAN port is set to always powered) and password (which I’ve left at the default).
Yet I’m getting the message that “the following components … could not be setup” when HA restarts. I’m running it on hass.io.
Does anyone have a suggestion on how to proceed?
any news on this?
i am waiting to upgrade to 0.88.1 for this reason: still stucked on 0.87.x
I got it working!
My first problem was sort-of PEBKAC. All examples used “velux123” as the password, which is the default web login password. What one actually needs to specify for the API though is the same as the WiFi password. Figuring this out took me way longer than I’m comfortable to admit, and probably downgrade my career level as a software engineer by at least two.
(I’ve submitted PRs for the docs for both HA and pyvlx in case anyone else stumbles over this.)
The second then was reasonably straightforward then - pyvlx bailed out because it didn’t understand the Velux MSL (sun protection awnings) on my windows.
With both, I’ve got all my 18 my blinds and sun screens now fully integrated with HA with a single KLF 200.
hi imb,
thanks for the update.
It is not clear to me what was the problem you had though.
By my understanding i should:
- Close HA
- Upgrade KLF200 firmware
- Update HA
- Restart HA
according to documentation configuration should be:
velux:
host: "192.168.1.23"
password: "VELUX_PASSWORD"
where:
host is KLF200 IP address
password is KLF200 web interface password which, in case you didn’t change it should be “velux123”
is that correct?
Then…what is “MSL (sun protection awnings)”?
In my house I have 3 velux windows:
- 2 with sun protection screens + blinds
- 1 with just sun protection screens
will this be an issue? is that something I have to do specifically?
Also while upgrading to 2.x KLF200 firmware are you loosing all set-up scenes?
…Sorry for the huge number of questions and thanks in advance!
So first, I never had a KLF 200 with an older firmware; mine shipped with the 0.2.0.0.71.0 one. Which is why I couldn’t use earlier HA releases until the new pyvlx was merged. Similarly, I don’t know if this lost set-up scenes or not. I’m not using Velux scenes, I only use HA for this purpose.
(The KLF 200 with the new firmware allows control of all individual products, I’ve got no need to group them on the KLF.)
And no, that is exactly the same mistake I fell for The password to use is not the web interface password (even though all examples use that default), but the more complicated one for the WiFi (e.g., “d937AxHl1” or whatever yours might be set to).
Did prior versions use the different password for the web login? That’d explain why all the examples were misleading …
I have the Velux MSL on all windows (sun protection screens) in addition to the interior blinds, which identify as VERTICAL_EXTERIOR_AWNING type via the API. I had to add support for that to pyvlx. I don’t know whether yours qualify.
If so, you can either pull the new pyvlx from GitHub (the developer already merged my patch) or, so I hope, wait until this gets merged into 0.88.2 or 0.88.3.
So what you call WiFi password like is the password of your WiFi access point??
I doubt it is: I think it is another password which did not exist in 1.x firmware version hence I can’t understand
I will wait until new version of Velux component is merged before upgrading then!
It really is the password Imb described! Use the password that you use to connect to the KLF200 WiFi network. I got it working with that password. The password i used is on a sticker on the bottom of my KLF200.
Of course not the one from my own WiFi, but the one used for configuring the KLF 200. (The web interface is no longer reachable on the LAN port.)
I was wondering. Is there any way to query the velux rain sensor using the new api?
It could be used to control other non velux specific devices. Eg. Awning blinds.
I just upgraded to 0.88 and the Velux Components came up perfectly. Thanks @Julius2342 for the great work.
I notice something a little odd. I have created a cover group like this.
cover:
- platform: group
name: "Family Room Window Shades"
entities:
- cover.family_room_shade_1
- cover.family_room_shade_2
- cover.family_room_shade_3
- cover.family_room_shade_4
- cover.family_room_shade_5
- platform: group
name: "Family Room Skylight Shades"
entities:
- cover.blind_1
- cover.blind_2
- cover.blind_3
- cover.blind_4
- cover.blind_5
- cover.blind_6
- cover.blind_7
Family Room Window Shades are Lutron shades.
Family Room Skylight Shades are the Velux ones.
When I open/close these groups the Lutron shades all move together. But the velux group does one shade at a time, waiting for it to completely close before starting the next one.
But its does not seem to be a velux limitation because I can quickly call each velux shade individually such that they are all closing together.
Any ideas? Should I be setting up the group differently?
I also recognized a similar behaviour. The problem is, that cover.set_position/open/close waits until the cover has reached the position.
May you try to patch the following:
--- a/pyvlx/opening_device.py
+++ b/pyvlx/opening_device.py
@@ -13,9 +13,9 @@ class OpeningDevice(Node):
super().__init__(pyvlx=pyvlx, node_id=node_id, name=name)
self.position = Position()
async def set_position(self, position):
"""Set window to desired position."""
- command_send = CommandSend(pyvlx=self.pyvlx, node_id=self.node_id, parameter=position)
+ command_send = CommandSend(pyvlx=self.pyvlx, wait_for_completion=False, node_id=self.node_id, parameter=position)
await command_send.do_api_call()
if not command_send.success:
raise PyVLXException("Unable to send command")
Yes, that does it.
It works for the shades and the opening windows.
Thanks!
I see a number of references in the source code to the rain sensor.
It seems to be available and loaded into the Window object
class Window(OpeningDevice):
“”“Window object.”“”def __init__(self, pyvlx, node_id, name, rain_sensor=False): """Initialize Window class.""" super().__init__(pyvlx=pyvlx, node_id=node_id, name=name) self.rain_sensor = rain_sensor
But it doesn’t seem to be exported as an attribute on the window entities.
Sorry, that’s the limit of my knowledge
I am still having issues after upgrading my KLF. I am currently on HA 0.88.2.
- I’ve upgraded my Velux to 0.2.0.0.71.0 (my previous version was somewhere in the 0.1… area)
- I’ve changed my password from velux123 to the Wifi password of the device
Unfortunately my Lovelace reports those as a platform that cannot be set up.
My log contains:
Log Details (ERROR)
Fri Mar 01 2019 12:16:39 GMT+0100 (CET)
Can't connect to velux interface: <PyVLXException description="Unable to login" /> Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/homeassistant/components/velux/__init__.py", line 30, in async_setup await hass.data[DATA_VELUX].async_start() File "/usr/local/lib/python3.7/site-packages/homeassistant/components/velux/__init__.py", line 56, in async_start await self.pyvlx.load_scenes() File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 89, 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 72, in send_frame await self.connect() File "/usr/local/lib/python3.7/site-packages/pyvlx/pyvlx.py", line 51, in connect raise PyVLXException("Unable to login") pyvlx.exception.PyVLXException: <PyVLXException description="Unable to login" />
Log Details (ERROR)
Fri Mar 01 2019 12:16:39 GMT+0100 (CET)
Setup failed for velux: Component failed to initialize.
Did my Velux HA Component not update correctly. Is there anything I can to to troubleshoot this?
regards,
Dominique