[velux] New OpenHAB2 binding - feedback welcome!

Hi Christian @kutzi ,

according to the manual a hard reset should lead back to the default password written on back side of KLF200.

BTW how did you get an update of the software without loosing its configuration? In my cases the KLF200 had lost everything during the upgrade procedure like WLAN settings. Therefore, the upgraded devices suddently appeared with the strange Velux given SSID like Velux_KLF_yxza
After power-up these WLANs stay alive for about 5 minutes - at least in my cases…

Regards, Guenther

Hi Guenther,

I cannot tell you definitely that my config is still the old one. This was only a guess. Since reset is not working and no wifi is there after power on I would say that I have bricked the module and it has not survived the firmware update. I looks like I have to get a new one, unfortunately.

Thanks for your support. Br, Christian

Hi Guenther,

I’m trying to use the velux binding in oh 1, but I’m not succeeding.
I put org.openhab.binding.velux-1.14.0.201903162123.jar in the addons folder, and I entered following in openhab.cfg
velux:bridgeIPAddress=192.168.10.11 (which is the ip of the bridge connected through the lan)
velux:bridgePassword=passwordofmyklf200

But upon starting openhab (normally or in debugging mode), I can’t find anything in the log on this binding. It doesn’t seem to get loaded.

thx

Hi @viper1705,

your configuration entries are alright. My OH1 instance have the entries within /etc/openhab/configurations/openhab.cfg as follows:

############################### Velux Binding #########################################
#
# velux Binding (openHAB1 with firmware v2)
#
velux:bridgeProtocol=slip
velux:bridgeIPAddress=192.168.1.1
velux:bridgeTCPPort=51200
velux:bridgePassword=secret
velux:timeoutMsecs=500
velux:retries=5
velux:refresh=300000

Even with no other configuration, there should be some output like

[INFO ] [.velux.internal.VeluxActivator] - velux binding has been started.
[INFO ] [.b.velux.internal.VeluxBinding] - Active items are: [V_DG_M_W, ..., V_DG_M_S].

For details, pls. take a look into the README.

Regards, Guenther

Hi,

Exactly what I thought as well, even without the config, the binding should at least start. But it doesn’t load. Strange…
Is there another version I can try ? To check if that one would load.

My answer is being placed into the other discussion thread…

Dear Guenther ,

I want to integrate three Velux roof windows so I need to buy a gateway.

It seems that I could either buy a KLF 200 and use your binding, or use the Somfy TaHoma hub & binding.

What do you suggest?

Hello Andrew @AndrewFG,

thanks for your questions. I couldn’t agree more that you’ll need a gateway for configuration and controlling the io-home-controlled devices.
AFAIK there are the two mentioned approaches plus another one from Velux, so called VELUX ACTIVE.

My decision against the TaHoma hub had been the closed-box into-the-cloud approach of Somfy.

Personally I prefer a standalone infrastructure which survives any loss of Internet connectivity: openHAB on a small server with an on-premise gateway (that is a KLF200) without any need of cloud services had suited me. But that are only my $0,05.

Ok. Thanks for the excellent advice Guenther.

Hello Guenther,

I am using your binding in connection with knx and it works fantastic. Thank you for your work.
I have one question: can I also control an integra window, which can be automatically opened and closed? I am thinking about to buy a velux motor unit.

Happy Easter!

1 Like

Hello Guenther,

I bought a KLF200 long time ago, but never got it set up. Then a few days ago I found out about the revolutions that happened with the KLF200 firmware and the binding. Today I decided to give it a go with OpenHab 2.4.

I updated the KLF200 FW to 0.2.0.0.71.0.

Downloaded org.openhab.binding.velux-1.14.0.201903162123.jar and put it in /usr/share/openhab2/addons/.

Created velux.cfg:

bridgeIPAddress=10.15.33.141
bridgeProtocol=slip
bridgeTCPPort=51200
bridgePassword=velux123
timeoutMsecs=15000
retries=15

Got the serial numbers of the two windows and two awning blinds from the log file and created velux.items:

String Velux_Bridge_Firmware        "Firmware [%s]"         { velux="thing=bridge;channel=firmware" }
String Velux_Bridge_Status          "Status [%s]"           { velux="thing=bridge;channel=status" }
String Velux_Bridge_CfgCheck        "Config Check [%s]"     { velux="thing=bridge;channel=check" }

Rollershutter   Velux_DiningTable_WindowL       "Venstre Vindue [%d]"   { velux="thing=actuator;channel=serial#56:36:13:5A:0F:1D:08:74" }
Rollershutter   Velux_DiningTable_WindowR       "Højre Vindue [%d]"     { velux="thing=actuator;channel=serial#56:36:13:5A:0F:1D:08:2C" }
Rollershutter   Velux_DiningTable_MarkiseL      "Venstre Markise [%d]"  { velux="thing=actuator;channel=serial#53:29:0C:5A:10:31:03:B0" }
Rollershutter   Velux_DiningTable_MarkiseR      "Højre Markise [%d]"    { velux="thing=actuator;channel=serial#53:29:0C:5A:10:31:03:4F" }

Also added the items to the sitemap, but it is not really working as expected. Here is a snippet from the log file after stopping openhab, power-cycling the KLF200 and starting openhab again:

2019-04-22 16:21:55.281 [INFO ] [nhab.binding.ihc.internal.IhcBinding] - Connecting to IHC / ELKO LS controller [IP='10.15.128.1' Username='openhab'].
2019-04-22 16:21:57.580 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-04-22 16:21:57.915 [INFO ] [inding.velux.internal.VeluxActivator] - velux binding has been started.
2019-04-22 16:21:58.549 [INFO ] [.binding.velux.internal.VeluxBinding] - Active items are: [].
2019-04-22 16:21:58.559 [INFO ] [.binding.velux.internal.VeluxBinding] - velux refresh interval set to 15000 milliseconds.
2019-04-22 16:21:58.560 [INFO ] [.binding.velux.internal.VeluxBinding] - veluxConfig[bridgeProtocol=slip,bridgeIPAddress=10.15.33.141,bridgeTCPPort=51200,bridgePa
ssword=********,timeoutMsecs=15000,retries=15,refreshMsecs=15000,isBulkRetrievalEnabled=true]
2019-04-22 16:21:58.570 [INFO ] [b.core.service.AbstractActiveService] - velux Refresh Service has been started
2019-04-22 16:22:13.669 [INFO ] [g.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
2019-04-22 16:22:33.460 [INFO ] [ab.binding.velux.bridge.slip.SClogin] - velux bridge connection successfully established (login succeeded).
2019-04-22 16:23:03.488 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - Found velux scenes:
        Scene "Markiser åben" (index 1) with non-silent mode and 0 actions
        Scene "Markiser luk" (index 0) with non-silent mode and 0 actions       .
2019-04-22 16:23:18.505 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 0) is not registered.
2019-04-22 16:23:18.507 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 1) is not registered.
2019-04-22 16:23:18.510 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 2) is not registered.
2019-04-22 16:23:18.513 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 3) is not registered.
2019-04-22 16:23:18.560 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - Found velux actuators:
        Product "Markise 2" / OTHER (bridgeIndex=3,serial=53:29:0C:5A:10:31:03:B0,position=C800)
        Product "Vindue 1" / WINDOW_OPENER (bridgeIndex=0,serial=56:36:13:5A:0F:1D:08:2C,position=0000)
        Product "Vindue 2" / WINDOW_OPENER (bridgeIndex=1,serial=56:36:13:5A:0F:1D:08:74,position=C800)
        Product "Markise 1" / OTHER (bridgeIndex=2,serial=53:29:0C:5A:10:31:03:4F,position=0000)        .
2019-04-22 16:23:33.565 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - velux Bridge is online, now.

After this, I try to activate the rollershutter item in the sitemap, but it doesn’t respond. Then suddenly one of the windows is opening. And about 10 minutes later I see this in the log:

2019-04-22 16:50:46.025 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - handleCommandOnChannel(): updating of item Velux_DiningTable_WindowR (type ACTUATOR_SERIAL) failed.

Also, the bridge-items look like this:

Firmware          -
Status            GW_S_GWM/GW_SS_IDLE
Congif Check      -

Is that expected?
Any suggestions on getting this to work reliably will be most welcome!
Best regards,
Mikkel Holm Olsen

I changed the sitemap items to Slider:

            Frame label="Velux" {
                Default item=Velux_Bridge_Firmware
                Default item=Velux_Bridge_Status
                Default item=Velux_Bridge_CfgCheck

                Slider item=Velux_DiningTable_WindowL
                Slider item=Velux_DiningTable_WindowR
                Slider item=Velux_DiningTable_MarkiseL
                Slider item=Velux_DiningTable_MarkiseR
            }

And changed these in velux.cfg:

timeoutMsecs=2000
retries=5

It is working much better now :slight_smile:

Is there a way to control groups? For instance on my KLR200s I have both windows in a group, and both awning blinds in a group. Since the windows are right next to each other, they are usually controlled simultaneously.

Hi Guenther

I just finally upgraded my KLF200 firmware 02.0.071.0 and now I´m very confused…

Can you tell me, how to find the serials for the velux items? (I have 8 Integra Velux roof windows). But I cant seem to find the serial…
I can enter the web interface using WiFi just fine. In there I can see the scenes AND procuts allright… But where the heck do I find the serials to put into the items?

Second:
Why is there a need of both an velux.cfg and a velux.things file?? It seems to me, this is somekind of mixup or misunderstanding, or??

Third:
if the WLan password should be used in the velux.cfg, When/where is the LAN interfaced use at all?

I cant say I get any errors. This is the log I get, when I restart the binding (1.14 from marts 2019).

2019-04-22 22:38:19.143 [INFO ] [inding.velux.internal.VeluxActivator] - velux binding has been started.
2019-04-22 22:38:19.242 [INFO ] [.binding.velux.internal.VeluxBinding] - Active items are: [].
2019-04-22 22:38:19.250 [INFO ] [.binding.velux.internal.VeluxBinding] - velux refresh interval set to 15000 milliseconds.
2019-04-22 22:38:19.269 [INFO ] [.binding.velux.internal.VeluxBinding] - veluxConfig[bridgeProtocol=slip,bridgeIPAddress=10.4.28.252,bridgeTCPPort=51200,bridgePassword=**********,timeoutMsecs=15000,retries=15,refreshMsecs=15000,isBulkRetrievalEnabled=true]
2019-04-22 22:38:19.269 [INFO ] [b.core.service.AbstractActiveService] - velux Refresh Service has been started

But a few seconds after I restart the binding, I get this:

2019-04-22 22:38:32.215 [INFO ] [b.core.service.AbstractActiveService] - velux Refresh Service has been shut down

Is this because I not have any active items?

Btw I´m using openhab 2.5M1 is it correct to use the 1.14 jar?? I previously used the 2.4snapshot?

Hello Mikkel,

thank you the feedback and the detailled extracts of the startup log. In fact, most entries look fine, but we’ll have to dig into the following lines:

2019-04-22 16:23:18.505 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 0) is not registered.
2019-04-22 16:23:18.507 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 1) is not registered.
2019-04-22 16:23:18.510 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 2) is not registered.
2019-04-22 16:23:18.513 [WARN ] [g.velux.things.VeluxExistingProducts] - update() failed as actuator (with index 3) is not registered.

Could you please check the definition of the gateway items? The output within the sitemap should look like:

Best regards, Guenther

Hello Kim,

let’s try to clarify the situtation with the v2 firmware:

  • the connectivity of the bridge is only possible on the LAN interface
  • with the password printed on the backside of the KLF200.
  • The webinterface is only available for a period of time after reboot on the WLAN (if not configured to stay always on).

As soon as the binding gets in contact with the KLF200, it will print (in fact, log with priority INFO) the found scenes and products, which can be used as items in addition to the basic bridge items which are described within the README).

Regards, Guenther

with the password printed on the backside of the KLF200

This is strange, because I initially tried with the “random” password printed on the back of the KLF200, but I got login-error. Then I tried “velux123” and that is working (as seen in my velux.cfg shown above)

I have these in velux.items:

String Velux_Bridge_Firmware        "Firmware [%s]"         { velux="thing=bridge;channel=firmware" }
String Velux_Bridge_Status          "Status [%s]"           { velux="thing=bridge;channel=status" }
String Velux_Bridge_CfgCheck        "Config Check [%s]"     { velux="thing=bridge;channel=check" }

And this in the sitemap:

            Frame label="Velux" {
                Default item=Velux_Bridge_Firmware
                Default item=Velux_Bridge_Status
                Default item=Velux_Bridge_CfgCheck

                Slider item=Velux_DiningTable_WindowL
                Slider item=Velux_DiningTable_WindowR
                Slider item=Velux_DiningTable_MarkiseL
                Slider item=Velux_DiningTable_MarkiseR
            }

But I still get something sensible for the bridge status:

Hi Guenther…
As stated above. I tried with both passwords (Web and WiFi (printed on the back)). None of them worked…I havn´t tried with “velux123” though… Hmm…

Second… I am unsure which binding version I should be using.
I´m running openhab 2.5 Milestone 1. I previously was using a 2.4snapshot binding from August 2018. But when reading above, the 1.14 seems to be alot newer, as it´s printed Marts 2019.
The KLF200 is updated to firmware 2
So which binding should I use?

Right now Im trying @mfk . It connects fine, however, it cant locate my 8 roof windows correctly, (it receives their states, but they are not visible in PaperUI), and it only finds 3 sceenes (our of 20 scenes). So it´s pretty useless.

Third…
When using your binding, I find it very confusing how to set it up… Why is there a need of both a .cfg and a .things file?

The binding of August 2018 does only contain the JSON-based connectivity which is deprecated with firmware version 2. For the newest firmware the newest OH1 binding runs under OH2 as well. It will be available as OH2 binding as soon as the recent changes are integrated within the OH1 distribution (two PRs are still unconfirmed).

Personally I can only help with this above mentioned binding…
In a parallel discussion, the person shared with us that the default password was the clue to get in contact with the bridge …

Cheers, Guenther

Ofcouse… Reason why I mentioned the other binding was to tell you, I can connect fine using that binding. I guess the password beeing used is the same in both bindings…