Io-homecontrol / velux - something's in the bush

Good find, yeah that sounds promising… Jan 2018 though, ugh.

Velux has updated their accessory page:
http://www.velux.dk/produkter/velux-integra/integra-tilbehoer

With a bus/knx control system interface,

And a direct push button controller.

ETA unknown.
Price unknown (expected to be not cheap)

Is it the KLF 050 you are referring to?

EDIT: Sorry, after reading you link again, I’m guessing its the KLF 200 you are referring to :slight_smile:
I have one of the KLE 050 for a single window but haven’t had time to hook it up to my IHC system > Openhab yet.

BR Søren

1 Like

looks like KLF200 is available already for about 300 euro, but it seems to be limited to 5 channels and uses dry contacts for input. Not quite the IP gateway we are hoping for…

I’ve gotten my hands on the KLF 200.

The basics

  1. It can be connected to wired ethernet.
  2. It will act as Wifi Access-point for 10 mins after startup (can be changed to disable/always active).
  3. It cannot connecte to another wireless network as a client.
  4. The default IP is 192.168.0.1 for wireless, for cabled network it will fetch an IP using DHCP.
  5. Connecting to http://klf200.velux/ over wireless (as stated in the manual) did not work for me. I had to access it using http://192.168.0.1/

Dry contact inputs

  1. There are 10 inputs. You need to use two inputs for each device if you want to control both up and down.
  2. For each input you can add many devices, but they will have to be of the same type (shutters/windows/blinds).
  3. For each input (up/down) you can make the products go to an absolute position (60 % open). Or you can make it do relative adjustments “open by 10 % from current position”.

Running programs

  1. Programs are created as macros by putting the KLF 200 in recording mode.
  2. With connections you can do the “programming” directly using the webinterface, this is not possible with programs.
  3. You will have to use a KLR 200, or other type of remote, to alter the positions of the devices you want to include in the program. After all windows/blinds has completed their adjustments you can save the program.
  4. You can also run a predefined program from the KLR200. However, it will not register any time-based delays. Hence a “slow wakeup” sequence on the KLR will run all at once when started from the KLF 200.
  5. Programs can be started from the KLF 200.

The not-so-good stuff

  1. I am not able to control a single device directly. It has to be done via programs or by using the dry contacts input.
  2. I am not able to read out the current position of a product.
  3. Since the programs cannot be created using the webinterface, the workaround to create a program dynamically is not an option.
  4. You can however create a connection dynamically. This do does require a relay of some sort to activate the connection later and hence the requested action later.

Some example HTTP POST calls

Authenticate

POST /api/v1/auth HTTP/1.1
Host: 192.168.0.1
Content-Type: application/json;charset=utf-8
Content-Length: 51
Connection: close
{"action":"login","params":{"password":"velux123"}}

Run a program

POST /api/v1/scenes HTTP/1.1
Host: 192.168.0.1
Content-Type: application/json;charset=utf-8
Authorization: Bearer bBbpXgBfTlw9LQwytyH5Cw==
Content-Length: 34
Connection: keep-alive
{"action":"run","params":{"id":2}}

Identify a product

POST /api/v1/products HTTP/1.1
Host: 192.168.0.1
Content-Type: application/json;charset=utf-8
Authorization: Bearer bBbpXgBfTlw9LQwytyH5Cw==
Content-Length: 50
Connection: close
{"action":"identify","params":{"id":5,"time":254}}

Conclusion
I believe (hope) there there are undocumented API-calls under the /api/v1/products that will make it possible to control a device directly. I’ve done some guesswork/bruteforce, but without any success so far.
I have also opened up the device to have a look at the inside. There are no obvious way (at least for me) to extract the firmware. The unit is however firmware-upgradeable via the webinterface. So when anyone get their hands on the firmware it might give us a few clues.

2 Likes

Looks interresting @erlendri although not cheap.

Is there any chance you could upload some screen-dumps of the web interface?

Best regards
spiff42

I bought another Velux remote, and took it apart. I figure I can interface it via dry-contacts (using arduino or similar). I took some pictures of the board if anyone’s interested. There’s a TON of test points and it really feels like you should be able to get it to do something useful via them, but I don’t have the time nor skills, I suspect, to reverse-engineer them. So I’ll probably just build something to “press the buttons”, sigh. LMK if you’d like to see pix of the board inside the (multi-device) remote.

@erlendri
I’d also be interested in some screenshots of the web-interface.
On the German website they write something about a setup-tool… do they mean the web-interface or is there any dedicated software tool for the setup process?

I just got my KLF200 today and started integration in openHAB.
Here is a litte sh-script for running the programms defined in the web-interface:

#!/bin/sh
programm=$1
token=$(curl -H “Accept: application/json” -H “Content-Type: application/json;charset=utf-8” -d ‘{“action”:“login”,“params”:{“password”:“velux123”}}’ -s hXXp://192.168.x.x/api/v1/auth | tail -n +2 | jq -r ‘.token’)

curl -H “Content-Type: application/json;charset=utf-8” -H “Authorization: Bearer $token” -d “{"action":"run","params":{ "id":$programm}}” -s hXXp://192.168.x.x/api/v1/scenes

curl -H “Content-Type: application/json;charset=utf-8” -H “Authorization: Bearer $token” -d ‘{“action”:“logout”,“params”:{}}’ -s hXXp://192.168.x.x/api/v1/auth

Integration via rules in openHAB should now be easy.

I didn’t find any SetupTool, but the configuration via the web-interface is really simple.

PS: Since I can only post 2 links as a newbee, replace the XX with tt and replace 192.168.x.x with your IP address.

1 Like

Nice! Does this allow you to open and close it? I have a skylight and would like these functions.

It does allow to open and close windows and rollershutters according to the programs defined.

Here’s two images of the webinterface attached.

The Bash-script can be called:

./veluxAPI.sh 0

where 0 stands for the first programm defined (maybe not according to the list shown in the Webinterface).

You must be shure to be logged out of the webinterface if you want to use the script, since velux only allows 1 user being connected.

Hi all, I’m new and a Domogik user little plugin developper and domodroid maintener.

I bought one for under 200€ in France (klf200). I just received the box and haven’t open it yet. I hope we could all help together with the web API.

I keep looking this topic and inform you if I found something too.

I started to write a python wrapper around the REST API in python: https://github.com/Julius2342/pyvlx

While doing so i also discovered a security flaw: https://gist.github.com/Julius2342/6282ded9f527e762ea50f42c2c439a1a

2 Likes

Where dd you buy it from? I can only find it for EUR 310 which is very expensive. (http://www.dach-shop24.de/Velux%20Interface%20KLF%20200-p-141270-4.html)

http://www.scieriebarthelemy.com/wa_ps_1_5_2_0/index.php?id_product=506&controller=product&id_lang=5

The image was a klf100 docs too but after talking by phone to them the image as been updated.

By the way it works like I wanted opening and closing shutter and windows independently.

Seen at 130 euros at http://www.building-supplies-online.co.uk/velux-klf-100-interface-unit-for-electric-window-klf100.html (URL is cheating)

The doc mentions it can manage 5 devices, which can be seen from the hardware contacts, but there is also mention of an ‘advanced’ mode that would manage 200 devices of 5 different types.

Does anyone know if this is done by just aggregating several devices into one so you operate them all at the same time? Or is there a possibility via the API to individually control more than 5 devices?

I have 6 windows, 6 roller-shutters, and 6 velux spots. I’d like to avoid having to buy 4 KLF200…

Most probably via scenes …

(The device can record scenes which you can then start via REST interface. Every scene may contain several devices which have a type (roller shutters have typeId=2, windows have typeId=4. )).

Is there any more news on operating Velux windows and shutters from openhab? I have 4 windows and 4 shutters. Currently only have the io homecontrol remote controls. Would love to get these suckers on my openhab network.