[velux] New OpenHAB2 binding - feedback welcome!

Hi Marcel,

the log output looks as if the gateway recognizes seven devices (three closed windows, two closed shutters and two open shutters) but - you’re right - there might be an issue with the serial numbers.

According to the prefix of the serial numbers, all of them are coming from Velux (original ones!). I have has a similar strange situation when I had deleted and re-learned one shutter. Could you please confirm that you are having seven different active devices? If so, could you please increase the debugging for org.openhab.binding.velux to level DEBUG and org.openhab.binding.velux.bridge.slip.io.SSLconnection to level TRACE ?

Thanks in advance, Guenther

Hi Guenther,

Yes, confirmed. There are 7 different Velux devices active. DEBUG was enabled on binding.velux, but not on SSLconnection. I removed all my configs VELUX related configs in Items and Things, enabled logging and added Velux related items again (without the ones with duplicated serial). Attached, please find the log output with VELUX only lines. It starts ~9:34

Velux.log (246.5 KB)

Hi Guenther,
maybe a simple question, when i installed the binding i did put the jar file in the addons folder and indtalled it via paper ui.
But what is the manual way for uninstalling if the uninstall with paper ui is not working ?

Hello John,

simply remove the jar file from the add-on directory, i.e. on a *nix that is /usr/share/openhab2/addons/org.openhab.binding.velux-1.13.0-SNAPSHOT.jar

After a few seconds the openHAB framework recognizes the removal and eliminates the binding in a safe way on-the-fly without the need of restarting openHAB.

Regards, Guenther

1 Like

Marcel,

thanks for this valuable feedback esp. the log information. Attached you’ll find the significant decoding:
2018-12-31 09:33:50.125 [DEBUG] [ding.velux.bridge.slip.SCgetProducts] - getRequestCommand() returns GW_GET_ALL_NODES_INFORMATION_REQ (0x202).

2018-12-31 09:33:52.128 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 9 bytes: C0 00 05 02 03 00 07 03 C0 
0203 = GW_GET_ALL_NODES_INFORMATION_CFM
Status 		:= OK - Request accepted
TotalNumberOfNodes :=	7

2018-12-31 09:33:52.131 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 00 00 00 00 52 6F 6C 6C 6F 20 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 80 D5 07 00 01 06 53 14 1E 26 11 26 00 C4 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 8F C0 

119dw
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
0204 = GW_GET_ALL_NODES_INFORMATION_NTF
NodeID  	:= 00
Order		:= 00 00
Placement	:= 00
Name		:= Rollo 1
Velocity 	:= 00
NodeTypeSubType := 02 80
ProductGroup	:= D5
ProductType	:= 07
NodeVariation	:= 00
PowerMode	:= 01
BuildNumber	:= 06
SerialNumber	:= 53 14 1E 26 11 26 00 C4
State		:= 00
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.138 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 01 00 01 00 52 6F 6C 6C 6F 20 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 80 D5 07 00 01 06 53 14 1E 26 12 03 02 EC 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 80 C0 
NodeID  	:= 01
SerialNumber	:= 53 14 1E 26 12 03 02 EC
State		:= 05
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.144 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 02 00 02 00 52 6F 6C 6C 6F 20 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 80 D5 07 00 01 06 53 14 1E 26 12 03 02 D6 05 00 00 00 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BB C0 
53 14 1E 26 12 03 02 D6 05 00 00 00 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 BB C0 
NodeID  	:= 02
SerialNumber	:= 53 14 1E 26 12 03 02 D6
State		:= 05
CurrentPosition := 0000
Target		:= 0000

2018-12-31 09:33:52.151 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 03 00 03 00 46 65 6E 73 74 65 72 20 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 01 D5 07 00 01 16 56 24 5C 26 11 2D 00 96 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 01 D8 03 B2 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 49 C0 
NodeID  	:= 03
SerialNumber	:= 56 24 5C 26 11 2D 00 96
State		:= 05
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.158 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 04 00 04 00 46 65 6E 73 74 65 72 20 32 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 01 D5 07 00 01 16 56 24 5C 26 11 2D 00 8A 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 01 D8 03 B2 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 56 C0 
NodeID  	:= 04
SerialNumber	:= 56 24 5C 26 11 2D 00 8A
State		:= 05
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.163 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 05 00 05 00 46 65 6E 73 74 65 72 20 33 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 01 01 D5 07 00 01 16 56 24 5C 26 12 03 00 99 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 01 D8 03 B2 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 69 C0 
56 24 5C 26 12 03 00 99 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 01 D8 03 B2 1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 69 C0 
NodeID  	:= 05
SerialNumber	:= 56 24 5C 26 12 03 00 99
State		:= 05
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.168 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 131 bytes: C0 00 7F 02 04 06 00 06 00 52 6F 6C 6C 6F 20 34 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 80 D5 07 00 01 06 53 14 1E 26 12 0A 09 B4 05 C8 00 C8 00 F7 FF F7 FF F7 FF F7 FF 00 00 4F 02 39 1F 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 DC C0 
NodeID  	:= 06
SerialNumber	:= 53 14 1E 26 12 0A 09 B4
State		:= 05
CurrentPosition := C800
Target		:= C800

2018-12-31 09:33:52.173 [TRACE] [g.velux.bridge.slip.io.SSLconnection] - receive() finished after having read 7 bytes: C0 00 03 02 05 04 C0 
0205 = GW_GET_ALL_NODES_INFORMATION_FINISHED_NTF

2018-12-31 09:33:52.174 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Rollo 1" / SOLAR_SLIDER (bridgeIndex=0,serial=53:14:1E:26:11:26:00,position=C800).
2018-12-31 09:33:52.175 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Rollo 2" / SOLAR_SLIDER (bridgeIndex=1,serial=53:14:1E:26:12:03:02,position=C800).
2018-12-31 09:33:52.175 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Rollo 3" / SOLAR_SLIDER (bridgeIndex=2,serial=53:14:1E:26:12:03:02,position=0000).
2018-12-31 09:33:52.175 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Fenster 1" / WINDOW_OPENER (bridgeIndex=3,serial=56:24:5C:26:11:2D:00,position=C800).
2018-12-31 09:33:52.175 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Fenster 2" / WINDOW_OPENER (bridgeIndex=4,serial=56:24:5C:26:11:2D:00,position=C800).
2018-12-31 09:33:52.176 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Fenster 3" / WINDOW_OPENER (bridgeIndex=5,serial=56:24:5C:26:12:03:00,position=C800).
2018-12-31 09:33:52.176 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() storing new product Product "Rollo 4" / SOLAR_SLIDER (bridgeIndex=6,serial=53:14:1E:26:12:0A:09,position=C800).
2018-12-31 09:33:52.176 [DEBUG] [ng.velux.bridge.VeluxBridgeActuators] - getProducts() finally has found products 19138 members: Product "Rollo 1" / SOLAR_SLIDER (bridgeIndex=0,serial=53:14:1E:26:11:26:00,position=C800),Product "Fenster 2" / WINDOW_OPENER (bridgeIndex=4,serial=56:24:5C:26:11:2D:00,position=C800),Product "Rollo 4" / SOLAR_SLIDER (bridgeIndex=6,serial=53:14:1E:26:12:0A:09,position=C800),Product "Rollo 3" / SOLAR_SLIDER (bridgeIndex=2,serial=53:14:1E:26:12:03:02,position=0000),Product "Fenster 3" / WINDOW_OPENER (bridgeIndex=5,serial=56:24:5C:26:12:03:00,position=C800).

And, with this, you should have won a bug bounty: the serial number was decoded as eight bytes bit only seven bytes are passed to the generic openHAB layer. Therefore, you have got duplicate actuators. It’s a simple change … let me see whether I can fix it this year :wink:

Hi Guenther,

Thanks for the feedback. Look forward to test the new version. :grinning:

Cheers Marcel

Marcel,

just finished the QA testing and it can be found at BetaTest-Github-Storage as org.openhab.binding.velux-1.14.0-SNAPSHOT.jar.

Note that you have to adapt your items configuration according to the eight-hex-byte serial numbers.

Now, it’s integrated into PR5690 which waits for review.

Regards, Guenther

2 Likes

Hi Guenther,
thanks for the new version 1.14.0 of velux binding!

i have two questions regarding things and cfg files (firmware version 2.0.0.71)

  • must the interface be configured in \services\velux.cfg or in \services\openhab.cfg?
  • is the file velux.things needed?

Quick question @antares2001: Did you ever solve your problem? I am in exactly the same situation as you. The python script also produces the same output. I’ve rebooted the KLF frequently and I’m positive the password is correct.

yes the problem with the connection to klf200 is solved. i had use the wrong password in the binding. you must use the password thats printed on the klf200, not the weblogin password “velux123”.

But i have another problem since i had install the velux klf200.

this message is show at every system start.

2019-02-25 23:35:34.898 [INFO ] [org.openhab.binding.velux           ] - FrameworkEvent INFO - org.openhab.binding.velux

org.osgi.framework.BundleException: The bundle class path entry "lib/gson-2.2.4.jar" could not be found for the bundle "osgi.identity; type="osgi.bundle"; version:Version="1.14.0.201902161749"; osgi.identity="org.openhab.binding.velux""

the response time of the velux actuators is very long. a command call need over 5s to start execution.

does anyone have any idea what that might be?

version 1.14.0 of velux binding
firmware version 2.0.0.71

Hello Marcel @Kellermeister,
the error message mentions a missing library (only used for recent firmware v1.*) which could
be ignored.
Regarding the delay between button press and action, I’d like to review the debug logging. Five seconds are far to long. Could you please share the log file (i.e. by PM) or anonymized within is forum?

The password. That’s printed. On the KLF200. :man_facepalming:

Thank you!

1 Like

Guys,

may I ask you how it works? I have 5 velux (window+shutter) and I would like to manage those via OH. I need to buy a KLF200. But how the KLF200 will connect itself with those velux? May I ask you to have an idea how the flow works?

At this moment I have 5 KLR 200 remote controllers, one for each velux.

thank you
Andrea

1 Like

Hello Andrea,

just put the KLF200 into learning mode (see VELUX INTEGRA®KLF 200 Manual, page 11) and register your five devices step by step.

1 Like

Thanks Guenther,

but can I configure my five devices in the KLF200 wirelessy? I mean, what I’m seeing on internet, you need to have a wired connection between the gateway and devices. But I don’t have, I use the KLR200 remote, one for each device, to manage wirelessy the velux. Do I need to send the configuration on my KLR200 to the KLF200? it can work without any cable?

thanks
Andrea

Andrea,

you can control your devices wirelessly from the KLF 200. The configuration can get copied from the Remote, or you can get the devices learned by the KLF. No need to have wires. I have 3 Windows controlled with OpenHab via KLF200 and the only wiring I have is the Ethernet and power to the KLF.

manual can be found here:
http://dd1.domwebx.com/apps/LPI.nsf/0/0193004F7633CFBF8525815500505357/%24file/454041-2016-10_KLF200_US_notat.pdf

the hardwired connections are in and outputs to the KLF to trigger the device actions. These are not needed when using openHab via the ethernet connection with the binding (I am still using v1 of the binding, but there is not difference on that point)

Achim

1 Like

Question: do we need to have the KLF200 gateway on the same network of the Binding? or a different vlan is supported? Is the Binding using broadcast or multicast addresses?

thanks
Andrea

Andrea,

only IP connectivity in general is needed. Neither same subnet nor broadcast or multicast domain required. The binding can even reside within the cloud with a KLF200 on a local network.

Regards, Guenther

1 Like

Hi there,

as my KLF200 (FW: 0.2.0.0.71.0) got delivered yesterday I’d like to ask you guys the following questions;

  • Is it correct that I can only access the web-interface while connecting to the KLF200’s WIFI (I’m using a static IP for the LAN-interface but when browsing to the desired IP nothing happens?)
  • All of my rollershutters have been recognised during setup-procedure, but if I’d like to actually move them I need to setup a “program”/“scene” first? (So there’s no way to tell the API like “move rollershutter1 to 40%”?)
  • To “learn” the KLF200 a “program”/“scene” I’d need either a KLR200 or a KLR100 (no wiring is required)?
  • As I can’t find any “Velux*” bindings in my PaperUI-Addons I’m assuming that if I want to use it I’ve to manually install > https://github.com/gs4711/org.openhab.binding.velux?

As always many thanks for your time in advance & BR,
Chris

Is it correct that I can only access the web-interface while connecting to the KLF200’s WIFI

Unbelievably and quite annoyingly: Yes!

if I’d like to actually move them I need to setup a “program”/“scene” first?

You do not need a scene/program if you:
a) Wire up your KLF200 and use external actuators (this is what I currently do) or
b) Use the new binding discussed in this thread.

As I can’t find any “Velux*” bindings in my PaperUI-Addons I’m assuming that if I want to use it I’ve to manually install

Yes. Put the 1.14 binding jar in your addons folder and use the .things, .items and .cfg files from this thread. Be aware that the KLF200 swithes off the API after 15min of inactivity. So - very annoyingly - you need either physical access or access to its WiFi hotspot to reboot it.

Hope that hepls,
Jens