[velux] New OpenHAB2 binding - feedback welcome!

Same here. 6 actuators in the web interface, none in the binding. A restart looks like this:

2019-06-29 09:27:26.234 [INFO ] [inding.velux.internal.VeluxActivator] - velux binding has been stopped.
2019-06-29 09:28:12.259 [WARN ] [org.apache.felix.fileinstall] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.velux-1.14.0.201903162123.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.velux [191]
2019-06-29 09:29:03.778 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'velux.items'
2019-06-29 09:29:55.598 [INFO ] [inding.velux.internal.VeluxActivator] - velux binding has been started.
2019-06-29 09:30:24.388 [INFO ] [.binding.velux.internal.VeluxBinding] - Active items are: [].
2019-06-29 09:30:24.492 [INFO ] [.binding.velux.internal.VeluxBinding] - velux refresh interval set to 15000 milliseconds.
2019-06-29 09:30:24.508 [INFO ] [.binding.velux.internal.VeluxBinding] - veluxConfig[bridgeProtocol=slip,bridgeIPAddress=192.168.178.22,bridgeTCPPort=51200,bridgePassword=**********,timeoutMsecs=2000,retries=6,refreshMsecs=15000,isBulkRetrievalEnabled=true]
2019-06-29 09:30:24.508 [INFO ] [b.core.service.AbstractActiveService] - velux Refresh Service has been started
2019-06-29 09:30:27.970 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-velux1'
2019-06-29 09:30:39.542 [INFO ] [g.velux.bridge.slip.io.SSLconnection] - Starting velux bridge connection.
2019-06-29 09:30:39.801 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-velux1'
2019-06-29 09:30:46.548 [INFO ] [ab.binding.velux.bridge.slip.SClogin] - velux bridge connection successfully established (login succeeded).
2019-06-29 09:30:50.580 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - Found velux scenes:
2019-06-29 09:30:52.724 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - Found velux actuators:
2019-06-29 09:30:59.594 [INFO ] [.velux.handler.VeluxBridgeHandlerOH1] - velux Bridge is online, now.
2019-06-29 09:31:05.829 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-velux1'

Moreover lots of errors in the log
2019-06-29 19:50:04.807 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-velux1
which seem to be not really accurate, however.

If I try to change thing settings in PaperUI or HABmin (thing has been added by PaperUI), I get messages like

2019-06-29 20:37:32.979 [ERROR] [st.core.internal.thing.ThingResource] - Exception during HTTP PUT request for update config at things/velux:klf200:05ee9343/config java.lang.IllegalStateException: Thing with UID velux:klf200:05ee9343 has no handler attached.

Edit:
I now removed the Velux bridge thing. It seems to be of no real use, and the configuration seems to be doubled in velux.cfg (which is misleadingly called openhab.cfg in the docs).

I also added a new item:

String velux_bridge_products ā€œProdukte [%s]ā€ {velux=ā€œthing=bridge;channel=productsā€}

This item now shows all my installed products as a single-line string. So somehow the connection is established. But there are no usable actuators available.

The docs seem to be misleading sometimes :-/ ā€¦

Edit 2:

Now I restarted openHAB (with removed Velux bridge thing). The actuators are now recognized?!

OK, I got it working. The trick seems to be not to have any thing defined.

However, everything seems to be really slow. E.g. if I set the rollershutters with a ā€œSliderā€ item, the item value is completely unreliable/not updated until a few minutes after the actual movement (slow in itself) has stopped.
Operating several rollershutters in parallel in most cases leads to sequential changes, no parallell operation.
Is there any tuning option?

Hello @nosepull,

sorry for the late answer but other business issues kept me busyā€¦

Some questions to start with: which version do you use (2.4stable?), which UI?
Did the error message

org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.velux [191]

disappear when you have deleted the defined thing? What had been the definition?

BTW the delay between pressing a key or moving a slider is than a second on a pi3b or pi4/4.

Regards, Guenther

Hello @tinusv,
could you please increase the loglevel to trace? At least there should be some informational lines regarding the actuators being found on the KLFā€¦

Thanks in advance, Guenther

Hello @lukqw,

thanks for the log output with level TRACE. What is the result if you manually access the URL
http://10.3.0.26:80/api/v1/auth with your webbrowser (hopefully residing within the same LAN)?

The Connection refused error message sound strange to me.

Rgds, Guenther

[quote=ā€œNosepull, post:225, topic:32926ā€]

One additional question:

Did the message

2019-06-29 19:50:04.807 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-velux1

disappear now?

Thanks Guenther for the answer!

Iā€™m providing you with full logs so you can maybe understand the error.

openhab.log (162.5 KB)

When I try to access the link http://10.3.0.26:80/api/v1/auth I get ERR_EMPTY_RESPONSE

itā€™s in the same LAN

Hi @antares2001,

Regarding the password behaviour: There seems to be different approaches depending on the hardware revision: some users sent a feedback that the default password works, other (as you) that only the wifi password is valid. Iā€™m not sure how to deal with it.

The Somfy issue is critical to me as Iā€™d like to integrate any io-homecontrol devices. Therefore, Iā€™ve prepared a special jar-revision with in depth logging about the klf-internal datastructures (avoiding product type UNDEFTYPE) and - probably with the help of Velux engineers - weā€™ll come to a conclusion.

Thanks for your patience and support. Regards, Guenther

@gs4711
Another question:
Can I view the state my rollershutters are at currently? Like 100% or 0% for open/closed. Because on my Sitemap I canā€™t see any and Iā€™m not sure thatā€™s because of the errors in the Logs.

Hello @gs4711,

thanks for your reply. Iā€™ll have a look to post more logs eventually when I get back to the system. Iā€™m currently very time pressed, so I canā€™t do it immediately.

I figured I might be able to stick with Control Somfy io or Velux windows with KLF 200 and HTTP binding for the moment, until the issue with Somfy is solved in the binding.

Thanks, @antares2001. Does this software tool report other serial numbers?

Hello @lukqw,

no and yes. With the firmware v1 you will only have the possibility to use the (predefined) scenes w/o any status responses. After upgrading the KLF to firmware version v2, any fine-granular control of the actuators is possible. Additionally OH will get feedback from the io-homecontrol devices about their status: Even manual control by the remote controls will be recognized and reported back to the OH UI.

Greetings, Guenther

Alright thank you for your response @gs4711!

Did you have time yet to check out my logs over at post #234 ?

@gs4711 - looks like I can just use the names I set up in the KLF 200. I donā€™t see any serial numbers, just device IDs 0, 1, 2, ā€¦

That project is just a kind of http-wrapper to talk to pyvlx (installable via pip) which does all the magic talking to the KLF. Yet, it made the setup very convenient for me by just using the http="ā€¦" in item definition to control my devices. Reports also back device status changes @lukqw asks for.

Yep. Trying to check the reason for the empty request - itā€™s a little bit tricky as I havenā€™t got any v1 KLF in access to verify the handshakeā€¦
The request should contain {"action":"getDeviceStatus","params":{}} as body part.

@gs4711 did you have time to look at the above? I have simular problems, specially when operating more than once device at the same time, (I have 8 Velux windows).
I know you mentioned that during the summe, youĀ“ll have a change for the state report timingā€¦ But does this involve the problems with handling more than one device at the same time?

Hi @Kim_Andersen,
the issue with parallel activation is still open. This will be addresses as soon as the activation problems with OH2 and paperUi are fixed: There seems to be a bug within the compat1x layer as the complete configuration handover from GUI to binding is stuck in the middle.

Nevertheless the point mentioned by @nosepull

[ā€¦] updated until a few minutes after [ā€¦]

is fixed with the v1.14-release (PR integrated at the 16th of June): The state reporting is now done asynchronously via the KLF HouseMonitoringService within seconds after actuator changes.

Hi @Nosepull,

do you have a clue (any pointers appreciated) where the name openhab-binding-velux1 is originated? AFAIK this keyword is nowhere included in the available binding code (so far released!).

Great!!
Will the 1.14 .jar be available?