Use Velux Binding in OH 1.x

Hi Guenther,

The above mentioned jar-file.

Hello @viper1705,

just extracted the mentioned addon-library into a separate repository. Pls. try to place this jar file into the addon directory as well. Perhaps this fixes the missing includeā€¦

Hi Guenther,

Ah, we are getting there. Now the binding starts. I restarted openhab to see the serials of the remotes that were added to the KLF200.
I see some entries in the log, which indicate that the binding started correctly. However, I canā€™t see any serials. But I do see what looks like an error message.

Good to hear from you - but the strange thing is that the OH1 does not recognize the library included within the jar you had already installed.

Do you see any log information about Starting velux bridge connection as described in documentation?

BTW there seems to be no items defined ā€¦ therefore the binding stops its refresh cycle. To get rid of this message just place a Velux device into the items file, i.e. querying the bridge status like

String  V_STATUS    "Status [%s]"                   { velux="thing=bridge;channel=status" }

Hi Guenther,

After adding the item in openhab, I do see it in the log, but it still is showing an error it seems:

Pls. increase the level of debugging to trace.

Hi Guenther,

This is the log (the velux part of it), when I start openhab in debugging mode.

veluxopenhab.log (12.2 KB)

Your configuration is alright, the binding runs well - but the underlying OS responds with strange errors.

Could it be that the IP stack cannot connect the Velux bridge at all? Network configuration problem?
Does a ping 172.16.10.134 succeeds? Which kind of Java do you use?

Of course, thanks to google, Iā€™ve found two references (a/b) which indicate a problem with the TLS version. Perhaps adding the definition -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" within the startup script might help.

Especially quoting the remarks, it points to the underlying java ā€¦

Download and install ā€œ(JCE) Unlimited Strength Jurisdiction Policy Filesā€ - JCE Unlimited Strength Jurisdiction Policy Files for JDK/JRE 8 Download - and I can confirm that the problem is solved. The read me file says

Due to import control restrictions of some countries, the version of the JCE policy files that are bundled in the Java Runtime Environment, or JRE(TM), 8 environment allow "strong" but limited cryptography to be used. This download bundle (the one including this README file) provides "unlimited strength" policy files which contain no restrictions on cryptographic strengths.

Hi Guenther,

Unfortunately this hasnā€™t fixed the problem for me. I downloaded and installed the Unlimited Strength Jurisdiction Policy Files, but it had no effect. I then upgraded my java (since I was still using an old version) to the latest version (Orcacle Java version 8 update 201 build 1.8.0_201-b09), and then reapplied the Unlimited Strength files, but no luck. Still the same error messages in the log.

I donā€™t think there is an issue with the network configuration. the KLF200 is connected (through LAN) , and I can ping it. I can also connect to it (from smartphone using the acces point). I also added the -Dhttps.protocols=TLSv1,TLSv1.1,TLSv1.2" to the start.bat, but it doesnā€™t help.

Please increase the Java library debugging level: I would suggest -Djavax.net.debug=all

Did what you asked. The log is not showing anything more, but this is what I see in the console now:

Note that this error message (Connection refused) is new at this point: the KLF seems to be offline, now.

Pls restart the KLF and restart the test again.

Guenther,

Awesome, it works now. The bridge is up and running !!
Strange enough I could still ping it although the connection was failing, but indeed a restart fixed the connection problem.

FYI. To isolate the entries in the log, I used a different openhab version (1.8.3) on a different windows machine, but also there I had to enter gson-2.2.4.jar in the addons folder before the binding would start.

But a big thanks for all your help getting this binding to workā€¦

Sounds great.

But wait - now Iā€™m interested in the recent changes which have led to success?

Guenther,

gson-2.2.4.jar was put in the addons folder which made the velux binding start. But I never managed to connect.
I then upgraded my Java (but this was perhaps not even necessary), and installed the Unlimited Strength Jurisdiction Policy Files. Then I got a different connection error.
And then I restarted the KLF200,
After that the binding finally connected to the bridge.

1 Like

Thanks. This sounds reasonable. Iā€™ll update the documentation accordingly.