[velux] New OpenHAB2 binding - feedback welcome!

Agree, that would be awesome.

I have not been able to get silent mode to work at all (directly from KLF200 web interface). The speed and sound is always the same. So I suspect there are different Velux products. My windows are from 2006-2007.

Hello Jonas,

please note that the configuration keywords are wrong: check with README @ https://github.com/gs4711/org.openhab.binding.velux

 tcpPort instead of bridgeTCPPort

 password instead of bridgePassword

Regards, Guenther

Hello Guenther, In the readme there is mentioned bridgeTCPPort under: https://github.com/gs4711/org.openhab.binding.velux#things
Is that a mistake?

I configured the the bridge with the paper UI. It gave me these 4 in the log:
Product “Rolladen Essen” / ROLLER_SHUTTER (bridgeIndex=0,serial=56:32:14:5A:12:0E:01:97,position=F7FF)

Product “Essen” / WINDOW_OPENER (bridgeIndex=1,serial=56:36:13:5A:12:4B:02:F9,position=F7FF)

Product “Rollladen KĂŒche” / ROLLER_SHUTTER (bridgeIndex=2,serial=56:32:14:5A:12:0E:01:A7,position=F7FF)

Product “KĂŒche” / WINDOW_OPENER (bridgeIndex=3,serial=56:36:13:5A:12:11:2C:A3,position=F7FF)

Do I understand that correctly, they do not appear as things? Do I need to create them manually?

Thanks, @Epoc, for the mentioned typo (the replacement of bridgeTCPPort by tcpPort was suggested by reviewer - and I missed to adapt the sample).

When using paperUI, you can activate Configuration->System-> Item Linking->SimpleModeOn so that links and their according items are automatically created for new Things.

I currently have all Windows and shutters defined as individual actuators in the KLF200 and grouped them in my .items file:

Rollershutter	                    Windows_FF_Bed_right	    "Window"			(gWindows_Bed)                              {channel="velux:window:4d14cadc:Fenster_Osten_rechts:position"}
Rollershutter	                    Windows_FF_Bed_left		    "Window"			(gWindows_Bed)                              {channel="velux:window:4d14cadc:Fenster_Osten_links:position"}
Rollershutter                       Window_FF_Office		    "Window"			(FF_Office, gWindows_West)                  {channel="velux:window:4d14cadc:Fenster_Treppe:position"}
Rollershutter	                    Window_FF_Child_East	    "Window East"		(FF_Kids, gWindows_East, gWindows_Kids)      {channel="velux:window:4d14cadc:Fenster_Osten_oben:position"}
Rollershutter	                    Window_FF_Child_West	    "Window West"       (FF_Kids, gWindows_West, gWindows_Kids)      {channel="velux:window:4d14cadc:Fenster_Westen_oben:position"}
Group:Rollershutter:OR(UP, DOWN) 	gWindows_All		        "All Windows"		
Group:Rollershutter:OR(UP, DOWN) 	gWindows_East		        "Windows East"      (gWindows_All)
Group:Rollershutter:OR(UP, DOWN) 	gWindows_West   		    "Windows West"      (gWindows_All)
Group:Rollershutter:OR(UP, DOWN)	gWindows_Kids   		    "Windows Kids"	    					
Group:Rollershutter:OR(UP, DOWN)    gWindows_Bed                "Windows Bedroom"   (FF_Bed, gWindows_East)  

In my sitemap they are listed like this:

Switch		item=Window_FF_Child_East		label="Window East"			icon=Window

This works fine (though I have the suspicion that the grouping is a cause for delayed start of movement) but I would like to change to a slider for control as this would also show me the current state of my windows and rollershutters.

Slider		item=gWindows_Bed				label="Bedroom windows"		icon=Window

This works (but 100% means closed) to control individual actuators but grouped items seem to only switch to either 0 or 100. Is there a way around this behaviour?
I guess the easiest way would be to create scenes within the KLF200 to group the actuators and then control them as a single item in OpenHAB. I was hoping to do all this within OpenHAB as it is more flexible and easier to access. Any opinion?
Finally, can I create new scenes in the KLF200 and then these new things show up in the PaperUI? Can I copy actuators from another KLR200 to my KLF200 without deleting existing actuators there?

Thanks!

Hello again,
I have another problem, after power cycle the KLF200 the connection is not reastablished because of no authentication.
Is the a way OH sends the password. Now, I have to stop OH and restart it.


2019-09-20 17:49:37.522 [INFO ] [g.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
2019-09-20 17:49:43.132 [WARN ] [ng.velux.bridge.slip.SlipVeluxBridge] - bridgeDirectCommunicate(): received GW_ERROR_NTF (Not authenticated), aborting.
2019-09-20 17:49:44.156 [WARN ] [ng.velux.bridge.slip.SlipVeluxBridge] - bridgeDirectCommunicate(): method io() raised an error: null.
2019-09-20 17:49:44.160 [INFO ] [ing.velux.handler.VeluxBridgeHandler] - handleCommand(): updating of item velux:window:388157aa:B_ro:position (type velux:window/position) failed.
2019-09-20 17:49:44.170 [WARN ] [ng.velux.bridge.slip.SlipVeluxBridge] - io(): raised an error during sending: Connection closed by remote host.
2019-09-20 17:49:44.173 [INFO ] [g.velux.bridge.slip.io.SSLconnection] - Shutting down Velux bridge connection.
2019-09-20 17:49:44.176 [WARN ] [ng.velux.bridge.slip.SlipVeluxBridge] - bridgeDirectCommunicate(): method io() raised an error: Unexpected I/O exception..
2019-09-20 17:49:44.179 [INFO ] [ing.velux.handler.VeluxBridgeHandler] - handleCommand(): updating of item velux:klf200:388157aa:status (type velux:klf200/status) failed.
2019-09-20 17:49:44.187 [INFO ] [g.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.

Thanks again,
Ingo

Thanks, it works now. Great work!

Hello Ingo,

normally the binding resets the connection about the (n) retries. Manually you should be able to enforce a restart by switching the Channel reload to ON.

Regards, Guenther


 it looks like 


22:03:34.443 [INFO ] [b.binding.velux.internal.VeluxBinding] - veluxConfig[protocol=slip,ipAddress=192.168.1.1,tcpPort=51200,password=********,timeoutMsecs=1000,retries=5,refreshMsecs=10000,isBulkRetrievalEnabled=true,isSequentialEnforced=false,isProtocolTraceEnabled=true]
22:03:34.448 [INFO ] [ing.velux.bridge.slip.SlipVeluxBridge] - Sending command GW_PASSWORD_ENTER_REQ.
22:03:34.451 [INFO ] [ng.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
22:03:34.484 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): raised a non-recoverable error during connection setup: Connection refused (Connection refused).
22:03:34.610 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): Exception occurred during I/O: Connection refused (Connection refused).
22:03:35.622 [INFO ] [ng.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
22:03:35.644 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): raised a non-recoverable error during connection setup: Connection refused (Connection refused).
22:03:35.645 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): Exception occurred during I/O: Connection refused (Connection refused).
22:03:37.648 [INFO ] [ng.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
22:03:37.673 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): raised a non-recoverable error during connection setup: Connection refused (Connection refused).
22:03:37.675 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): Exception occurred during I/O: Connection refused (Connection refused).
22:03:41.681 [INFO ] [ng.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
22:03:41.707 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): raised a non-recoverable error during connection setup: Connection refused (Connection refused).
22:03:41.707 [WARN ] [ing.velux.bridge.slip.SlipVeluxBridge] - io(): Exception occurred during I/O: Connection refused (Connection refused).
22:03:49.712 [INFO ] [ng.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
22:03:54.922 [INFO ] [ing.velux.bridge.slip.SlipVeluxBridge] - Received answer GW_PASSWORD_ENTER_CFM.
22:03:54.925 [INFO ] [hab.binding.velux.bridge.slip.SClogin] - velux bridge connection successfully established (login succeeded).

Hello Guenther,

It’s been a while since I got your binding working, and I see that a lot has happened in this thread since then. Yesterday I downloaded the latest org.openhab.binding.velux-2.5.0-SNAPSHOT.jar and installed it instead of the 1.14 I was using previously.

I also managed to add another IO-Homecontrol product to my KLF200. This is a door lock for my terrace door (Old version of SecuYou, the newer ones use bluetooth, and are not quite as suitable for home automation).

The product is found by the binding, but has no serial number:

2019-09-21 13:47:09.071 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - Found velux actuators:
        Product "Blind_N" / OTHER (bridgeIndex=3,serial=53:29:0C:5A:10:31:03:B0,position=0000)
        Product "DoorLock" / UNDEFTYPE (bridgeIndex=4,serial=00:00:00:00:00:00:00:00,position=C800)
        Product "Window_N" / WINDOW_OPENER (bridgeIndex=0,serial=56:36:13:5A:0F:1D:08:2C,position=BA00)
        Product "Window_S" / WINDOW_OPENER (bridgeIndex=1,serial=56:36:13:5A:0F:1D:08:74,position=BA00)
        Product "Blind_S" / OTHER (bridgeIndex=2,serial=53:29:0C:5A:10:31:03:4F,position=0000)  .

Should I be able to just specify “DoorLock” as the serial number?

O.K., I had a look around, but did not find how to "switching the Channel reload to ON".
Can you please point me in the right direction,
Ingo

Following up on this issue with groups I wanted to try setting up groups via the KLR200 and then import them to the KLF200 so I would only have to deal with single items in OpenHAB. Unfortunately the only thing imported to the KLF200 are the individual actuators. Is there a way to create groups in the KLF200?
Really could need some help here.
Thanks,
Jonas

Hello Jonas,

yes, the KLF200 is able to deal with groups of similar actuators. Unfortunatelly a creation of those groups is only possible via the SLIP protocol; there is no way via the web GUI. Of course, this will be an enhancement as soon as the initial binding is included in the distribution. What about using scenes?
Regards, Guenther

What exactly are scenes and how do I create them. Are those what is referred to in the KLF200 web UI as Programs?

Hello Jonas,

a Velux scene is a set of actuator settings which normally are defined by the Velux KLF WebGUI.

At the WebGUI, you’ll have to put the KLF into the learning mode, move the shutters by the remote controls into the desired position, and terminate the learning mode by pressing save. This leads to an archieved set of positions available under a unique name.

This, of course, should be described within the Velux manuals 


Regards, Guenther

So with a scene I could move a defined set of actuators to a single predefined position but not to any position? Seems a bit limited to manually control actuators.
Playing with the SLIP protocol is probably nothing for the inexperienced.
I wish Velux had put a bit more effort into the KLF200. The GUI is really limited, access via its own WLAN is strange, an why does it not copy defined groups from a KLR200?
Thanks so much for your efforts to making this a very useful tool!

Hello @gs4711,
to Point 5:

Is it definitifly not possible to read the rain sensor state or not yet included? Do you have any information about this from the velux guys?
Would be a killer feature for my smart home setup.

Best regards and wish a nice sunday!

Johannes

Hello Johannes,

it is a fact that the Velux rain sensors does not have a separate io-homecontrol device identifier. I’ll hopefully come back with an answer whether it can be evaluated indirectly via the addressed window.

Regards, Guenther

I seem to have found a solution using a slider with groups:
items:

Group:Dimmer:AVG    gShutters_Bed               "Shutters Bedroom"      (gShutters_East)                                             

sitemap:

Slider		item=gShutters_Bed				label="Bedroom shutters"	icon=Rollershutter

However, and I don’t know if this is connected, it sometimes takes really long for the actuators to react. Here is a log of a case where it first did not react at all and then took about a minute.
I get lost in the TRACE log and would really like to know how I can troubleshoot this.

Many thanks,
Jonas

The Roofwindows were working, but now some are not or not allways. The response time is very long (60s).
On some windows I get warnings and they even don’t move. But not every time I try, sometimes the move.

2019-09-22 17:34:32.351 [WARN ] [ding.velux.bridge.slip.SCgetProducts] - Gateway response GW_ACTIVATION_LOG_UPDATED_NTF (1286) cannot be handled at this point of interaction.

2019-09-22 17:35:42.527 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_CFM (515) cannot be handled at this point of interaction.

2019-09-22 17:35:42.608 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_NTF (516) cannot be handled at this point of interaction.

2019-09-22 17:35:42.655 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_NTF (516) cannot be handled at this point of interaction.

2019-09-22 17:35:42.675 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_NTF (516) cannot be handled at this point of interaction.

2019-09-22 17:35:42.689 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_NTF (516) cannot be handled at this point of interaction.

2019-09-22 17:35:42.704 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_NTF (516) cannot be handled at this point of interaction.

2019-09-22 17:35:42.707 [WARN ] [nding.velux.bridge.slip.SCgetProduct] - Gateway response GW_GET_ALL_NODES_INFORMATION_FINISHED_NTF (517) cannot be handled at this point of interaction.

I removed the windows from the KLF200 konfiguration and also from the OH .items
Then putting them back in the OH konfug via the “inbox”. Same result, sometimes it works, sometimes not.
Do you have any suggestions?
Thanks,
Ingo