Io-homecontrol / velux - something's in the bush


(Mike Bordignon) #81

Further to this, I don’t seem to be seeing this messages in the log (which I was previously seeing):

2017-11-08 00:00:00.014 [DEBUG] [b.binding.velux.handler.VeluxHandler] - handleCommand() activating known scene close.

How can I tell if the velux handler is working/attached/configured properly?


(Seeers) #82

I have the same problem since the update to v2.2


(Patrick Boch) #83

Hi

Have you tried editing the items file (or maybe adding another scene), even if nothing has changed? E.g. open the items file, insert a space, remove it again and save?

This seemed to work with some other issues (I had a problem with miHome binding and there it worked)


(Guenther Schreiner) #84

Mike,
you’ve correctly mentioned the line from the logfile I’ve been looking for: If it does not appear, there seems to be a problem with the thing handling (for now, I cannot determine why the core does not inform the binding about the state changes. Having reviewed the release notes of the new release, there shouldn’t be fundamental changes. I’ll dig deeper into it next week).

Regards,
Guenther


(Patrick Boch) #85

Hi

ok, so I now have a problem as well, after updating to 2.2:
My KLF200 stays offline, and looking at the trace log, it seems obvious why:

2017-12-30 23:30:36.564 [TRACE] [hab.binding.velux.bridge.VeluxBridge] - io() to http://192/api/v1/auth using request {“action”:“login”,“params”:{“password”:“velux123”}}.
2017-12-30 23:30:36.567 [DEBUG] [hab.binding.velux.bridge.VeluxBridge] - io(): Exception occurred during I/O: java.util.concurrent.ExecutionException: java.net.SocketException: Could not connect to /0.0.0.192:80.
2017-12-30 23:30:36.568 [TRACE] [hab.binding.velux.bridge.VeluxBridge] - io(): wait time 128000 msecs.

in PaperUI I added the url correctly: http://192.168.178.xx:80, I even tried creating a .thing file with

Bridge velux:klf200:home [ bridgeURL=“http://192.168.178.xx” ]

Still it apparently only reads the first three digits. Anywhere I else I could possibly change the wrong value? It must be stored somewhere, right?

Thx
Patrick


(Mike Bordignon) #86

Thanks, please let me know how you get on. Same behaviour occurs on 2.3.0.


(Pierre Olivier Bonnet) #87

Hello,

I writed some php code in order to create connections in the KLF200. My idea is to create connections on the fly and to use an IP relay to activate the KLF ports in order to pilot my somfy shutter and then to destroy the virtual connection.

I think it may work and enable to pilot more than 8 devices with the KLF.

By using connections rather than scenes we can stop the shutter when we want, we don’t have to wait for the end of a scene and we don’t have to create a lot of scene/case.

PO


(Seeers) #88

Hi, maybe there is a new version on https://updates2.velux.com/
Version 0.1.1.0.44.0


(Guenther Schreiner) #89

Yes, there is a new firmware version available. But please be aware that the firmware upgrade wipes out any existing connections and programs on the KLF200.

BTW it took more than one hour :open_mouth: to pass the three steps for upgrade.

And, last but not least, there is no additional functionality visible. I’d love release notes :thinking:.


(Domi) #90

Hi Everybody,

please give some help. I am not able to start my velux scene through OH. I am new to OH and i cant understand what’s the relationship from scene and thing… Log always tells me “[b.binding.velux.handler.VeluxHandler] - handleCommand() cannot activate unknown scene: .”

I recorded a simple scene with my KLR200 which closes all Blinds of my Windows named “Roll_All_Cl”.
This is also shown in KLF200 as “Roll_All_Cl” and i can start the scene using the Velux UI. In Paper UI it shows me 2 Velux Scenes detected but no Products. Velux Scene Information is Online with “velux:scene:1b1de6ae:Zuhause:ACTION”.

Group:Switch:OR(ON, OFF) Dachfenster "PushButton"

Switch  V_DG_M_R_CLOSED "Velux Rolläden ZU"  (Dachfenster)         { channel="velux:scene:1b1de6ae:Zuhause:ACTION#Roll_All_Cl" }
/**
 * This is a rules to simulate the push button behaviour...
 */
rule "PushButton of group Dachfenster"
    when
        Item Dachfenster changed
    then
        // waiting a second.
            Thread::sleep(1000)
        // Foreach-Switch-is-ON
        Dachfenster.allMembers.filter( s | s.state == ON).forEach[i|
            // switching OFF
                sendCommand(i, OFF)
        ]
    end
sitemap velux label="Velux Environment"
{
    Frame label="Velux Shutter and Window" {

        
        Switch  item=V_DG_M_R_CLOSED label=Test
    }

and my velux.things

Bridge velux:klf200:1b1de6ae   [ bridgeURL="http://192.168.xx.xx:80", bridgePassword="velux123", timeoutMsecs=2000, retries=10 ] {
 Thing scene Zuhause     [TTL=-1  ]
}

Thank you.


(Seeers) #91

as a workaround i wrote a small script to run scenes with the exec binding: https://github.com/seeers/Velux-KLF200-CURL-script


(Antares2001) #92

Hello,

sorry if I’m asking perhaps a wrong question, but does this stuff with Velux influence at all the chances of being able to control Somfy io-homecontrol devices like roller shutters?

Thanks.


(Guenther Schreiner) #93

Kristoffer,

sorry for late followup: I was still wondering about the mentioned id (“3”). Could it be that you have got some Velux blinds ?

Regards, Guenther


(Guenther Schreiner) #94

Patrick,

unfortunatelly I cannot reproduce the issue you have described. Does
the logfile show another new value if you change the url in the paper-ui?

Regards, Guenther


(Kristoffer Ernest) #95

Hi Guenther,

Yes, i have multiple Velux blinds. Mount on the outside of the window.

BR, Kristoffer


(Marc Todts) #96

Hello,

I’m new to OpenHAB. As a beginner I would like to make my first steps with our velux shutters.
The first problem I encounter is how I should configure the KLF 200 : as a repeater of as interface ?
And if it should be as an interface, is that possible via the webpage of the KLF 200 ?
Many thanks for your replies.

Cheers,

Marc


(Tobias Isenberg) #97

Before investing in the KLF 200, could someone who uses it please confirm
(1) that it allows me to control Somfy io-Homecontrol roller-shutters,
(2) that this control is possible via the wireless io protocol,
(3) that I will be able to learn these function on the KLF 200 using the regular wireless remote controls (SOMFY SMOOVE ORIGIN IO),
(4) that I will be able to control the roller-shutters both independently (e.g., kitchen open or living room close) as well as using the scenes (e.g., all open or all close), and
(5) that the current binding works with the current OpenHAB 2.2.

I am apologizing if these questions are answered elsewhere, but I have not been able to find definitive answers.

Thanks a lot in advance!


(Guenther Schreiner) #98

Mike, tried to reproduce your problems - but in vain - it works fine for me with 2.3.0 / snapshots.
Could you please share more details? Here are some infos of my well working setup:

openhab> bundle:list |grep open

188 | Active | 90 | 2.3.0.201802152302 | openHAB Core
189 | Active | 80 | 2.3.0.201802152302 | openHAB Karaf Integration
191 | Resolved | 80 | 2.3.0.201802152302 | openHAB Sound Support, Hosts: 125
192 | Active | 80 | 2.3.0.201802152302 | openHAB Dashboard UI
203 | Active | 80 | 2.3.0.201802152302 | openHAB 1.x Compatibility Layer

openhab> bundle:list | grep elux
 10 | Active   |  80 | 2.3.0.201802142040     | Velux Binding

openhab> smarthome:things list

velux:klf200:home (Type=Bridge, Status=ONLINE, Label=Velux KLF200, Bridge=null)
velux:scene:home:windowClosed (Type=Thing, Status=ONLINE, Label=Velux Szene, Bridge=velux:klf200:home)
velux:scene:home:windowUnlocked (Type=Thing, Status=ONLINE, Label=Velux Szene, Bridge=velux:klf200:home)
velux:scene:home:windowOpened (Type=Thing, Status=ONLINE, Label=Velux Szene, Bridge=velux:klf200:home)
velux:scene:home:unknownScene (Type=Thing, Status=ONLINE, Label=Velux Szene, Bridge=velux:klf200:home)
openhab> smarthome:items list

velux_klf200_home_scenes (Type=StringItem, State=4_members:Scene"V_DG_Window_Mitte_005"(index_3)with_non-silent_mode_and_1_actions,Scene"V_DG_Window_Mitte_000"(index_1)with_non-silent_mode_and_1_actions,Scene"V_DG_Window_Mitte_100"(index_2)with_non-silent_mode_and_1_actions,Scene"V_DG_Window_Mitte_010"(index_0)_with_non-silent_mode_and_1_actions, Label=Identifizierte Szenen, Category=Bridge)
velux_klf200_home_STATUS (Type=StringItem, State=NULL, Label=Status, Category=Bridge)
gV (Type=GroupItem, BaseType=SwitchItem, Members=4, State=NULL, Label=PushButton, Category=null)
V_BRIDGE_STATUS (Type=StringItem, State=IDLE, Label=Velux Bridge Status, Category=null)
V_BRIDGE_FIRMWARE (Type=StringItem, State=0.1.1.0.44.0, Label=Velux Bridge Firmware version, Category=null)
V_BRIDGE_IPADDRESS (Type=StringItem, State=192.168.45.2, Label=Velux Bridge IP Address, Category=null)
V_BRIDGE_SUBNETMASK (Type=StringItem, State=255.255.255.0, Label=Velux Bridge IP Subnet Mask, Category=null)
V_BRIDGE_DEFAULTGW (Type=StringItem, State=192.168.45.1, Label=Velux Bridge Default Gateway, Category=null)
V_BRIDGE_DHCP (Type=StringItem, State=NULL, Label=Velux Bridge DHCP Enabled, Category=null)
V_BRIDGE_WLANSSID (Type=StringItem, State=VELUX_KLF_1834C, Label=Velux Bridge SSID, Category=null)
V_BRIDGE_WLANPASSWD (Type=StringItem, State=secret, Label=Velux Bridge WLAN Password, Category=null)
V_BRIDGE_DETECTION (Type=SwitchItem, State=NULL, Label=Velux Bridge Detection mode, Category=null, Groups=[gV])
V_DG_M_W_OPEN (Type=SwitchItem, State=NULL, Label=Velux DG Window open, Category=null, Groups=[gV])
V_DG_M_W_UNLOCKED (Type=SwitchItem, State=NULL, Label=Velux DG Window a little open, Category=null, Groups=[gV])
V_DG_M_W_CLOSED (Type=SwitchItem, State=NULL, Label=Velux DG Window closed, Category=null, Groups=[gV])

 openhab> smarthome:send V_DG_M_W_OPENED ON
Command has been sent successfully.
openhab> smarthome:send V_DG_M_W_CLOSED ON
    Command has been sent successfully.

Best regards, Guenther


(Mike Bordignon) #99

I think I’ve got more problems than just the binding. The HTTP service on my KLF200 now won’t stay up for more than 43 hours - after some time it dies with connection refused (can ping it but no http). I upgraded the firmware to 0.1.1.0.44.0, that may have been why.

What firmware version are you on? Your Velux binding, is it part of openhab2-addons or did you install it manually?


(Mike Bordignon) #100

I’ve upgraded to 2.3.0 (and 2.3.0 snapshot of velux binding) and now I’m getting this error:

2018-02-26 14:55:58.902 [DEBUG] [org.openhab.binding.velux           ] - BundleEvent STARTED - org.openhab.binding.velux
2018-02-26 14:55:58.907 [ERROR] [org.openhab.binding.velux           ] - [binding.velux] Cannot register Component
org.osgi.service.component.ComponentException: The component name 'binding.velux' has already been registered by Bundle 242 (org.openhab.binding.velux) as Component of Class org.openhab.binding.velux.internal.VeluxHandlerFactory
	at org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:222) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.BundleComponentActivator.loadDescriptor(BundleComponentActivator.java:448) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialize(BundleComponentActivator.java:315) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:268) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:388) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:265) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:254) [42:org.apache.felix.scr:2.0.12]
	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:227) [42:org.apache.felix.scr:2.0.12]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [?:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [?:?]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [?:?]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [?:?]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:903) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:156) [?:?]
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [?:?]
	at org.eclipse.osgi.container.Module.start(Module.java:467) [?:?]
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) [?:?]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1253) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1225) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:512) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:361) [8:org.apache.felix.fileinstall:3.5.8]
	at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:312) [8:org.apache.felix.fileinstall:3.5.8]
2018-02-26 14:55:59.018 [DEBUG] [org.openhab.binding.velux           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.velux, component.id=248, service.id=412, service.bundleid=242, service.scope=bundle} - org.openhab.binding.velux
2018-02-26 14:55:59.022 [DEBUG] [org.openhab.binding.velux           ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=413, service.bundleid=242, service.scope=singleton} - org.openhab.binding.velux

When stopping the binding:

2018-02-26 14:58:11.581 [DEBUG] [org.openhab.binding.velux           ] - BundleEvent STOPPING - org.openhab.binding.velux
2018-02-26 14:58:11.584 [DEBUG] [org.openhab.binding.velux           ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={component.name=binding.velux, component.id=248, service.id=412, service.bundleid=242, service.scope=bundle} - org.openhab.binding.velux
2018-02-26 14:58:11.591 [DEBUG] [ing.velux.handler.VeluxBridgeHandler] - bridgeCommunicate(deauthenticate / logout) called.
2018-02-26 14:58:11.593 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.dispose()' on 'org.openhab.binding.velux.handler.VeluxBridgeHandler@708eff63': null
java.lang.NullPointerException: null
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeLogin(VeluxBridgeHandler.java:344) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeCommunicate(VeluxBridgeHandler.java:455) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeLogout(VeluxBridgeHandler.java:367) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.dispose(VeluxBridgeHandler.java:160) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.201802191927]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.201802191927]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-02-26 14:58:11.595 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while disposing handler of thing 'velux:klf200:home': null
java.lang.NullPointerException: null
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeLogin(VeluxBridgeHandler.java:344) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeCommunicate(VeluxBridgeHandler.java:455) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.bridgeLogout(VeluxBridgeHandler.java:367) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at org.openhab.binding.velux.handler.VeluxBridgeHandler.dispose(VeluxBridgeHandler.java:160) [242:org.openhab.binding.velux:2.3.0.201802142040]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [109:org.eclipse.smarthome.core:0.10.0.201802191927]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.201802191927]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-02-26 14:58:11.597 [DEBUG] [org.openhab.binding.velux           ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=413, service.bundleid=242, service.scope=singleton} - org.openhab.binding.velux
2018-02-26 14:58:11.630 [DEBUG] [org.openhab.binding.velux           ] - BundleEvent STOPPED - org.openhab.binding.velux