Somfy Venetian Blinds

Hi,

I’ve already placed my basic question here but since this thread is pretty old I most probably will not get any answer there.

I’m moving from OH1 to OH2 currently and would like to include my Somfy Venetian Blinds. I’ve used a patched binding for OH1 since the code was missing there but the OH2 binding has the necessary commands (UP_LONG, DOWN_LONG) already present in the binding source code. Therefore I expected to implement the necessary things and items pretty straightforward, but failed :frowning:.

I tried to use a Switch to control the blinds but this just leads to a short move (UP_SHORT, DOWN_SHORT). The source code says I would have to use a IncreaseDecreaseType to achieve the desired behaviour. I just have no clue which items I could use to realize this… Any help is appreciated.

Best regards,

Sven

https://docs.openhab.org/configuration/items.html
Only Dimmer (and Color) are IncreaseDecrase type.

Hi, the IncreaseDecreaseType is an ItemCommandType available for Color and Dimmer items. Please see the docs at https://docs.openhab.org/concepts/items.html

Thanks for the quick replies.

I’ve created a Dimmer item with the PaperUI and gave it a try. Unfortunately this also doesn’t work. If I use a Switch the blinds move in small steps up or down. The configuration of the Thing is ok.

In the LogFileViewer it says:

2018-01-12 17:53:17.934 [ome.event.ItemCommandEvent] - Item 'JalousieErker1_VenetianBlind' received command 0

2018-01-12 17:53:17.961 [vent.ItemStateChangedEvent] - JalousieErker1_VenetianBlind changed from NULL to 0

==> /var/log/openhab2/openhab.log <==

2018-01-12 17:53:17.946 [ERROR] [binding.rfxcom.handler.RFXComHandler] - Transmitting error

org.openhab.binding.rfxcom.internal.exceptions.RFXComUnsupportedChannelException: Can't convert 0 to Command

	at org.openhab.binding.rfxcom.internal.messages.RFXComRfyMessage.convertFromState(RFXComRfyMessage.java:208) [229:org.openhab.binding.rfxcom:2.2.0]

	at org.openhab.binding.rfxcom.handler.RFXComHandler.handleCommand(RFXComHandler.java:72) [229:org.openhab.binding.rfxcom:2.2.0]

	at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]

	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.b1]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [109:org.eclipse.smarthome.core:0.10.0.b1]

	at com.sun.proxy.$Proxy130.handleCommand(Unknown Source) [229:org.openhab.binding.rfxcom:2.2.0]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:72) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]

	at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[?:?]

	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.b1]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]

	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) [?:?]

==> /var/log/openhab2/events.log <==

2018-01-12 17:53:18.619 [ome.event.ItemCommandEvent] - Item 'JalousieErker1_VenetianBlind' received command 100

==> /var/log/openhab2/openhab.log <==

2018-01-12 17:53:18.632 [ERROR] [binding.rfxcom.handler.RFXComHandler] - Transmitting error

org.openhab.binding.rfxcom.internal.exceptions.RFXComUnsupportedChannelException: Can't convert 100 to Command

	at org.openhab.binding.rfxcom.internal.messages.RFXComRfyMessage.convertFromState(RFXComRfyMessage.java:208) [229:org.openhab.binding.rfxcom:2.2.0]

	at org.openhab.binding.rfxcom.handler.RFXComHandler.handleCommand(RFXComHandler.java:72) [229:org.openhab.binding.rfxcom:2.2.0]

	at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) ~[?:?]

	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.b1]

	at org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [109:org.eclipse.smarthome.core:0.10.0.b1]

	at com.sun.proxy.$Proxy130.handleCommand(Unknown Source) [229:org.openhab.binding.rfxcom:2.2.0]

	at org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:72) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]

	at org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:49) [116:org.eclipse.smarthome.core.thing:0.10.0.b1]

	at sun.reflect.GeneratedMethodAccessor31.invoke(Unknown Source) ~[?:?]

	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.b1]

	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [109:org.eclipse.smarthome.core:0.10.0.b1]

	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) [?:?]

==> /var/log/openhab2/events.log <==

2018-01-12 17:53:18.634 [vent.ItemStateChangedEvent] - JalousieErker1_VenetianBlind changed from 0 to 100

Sorry, I am out of suggestions… I guess you have already tried the Rollershutter Item type ?

You should be able to do it by linking a dimmer or color item and sending IncreaseDecrease through it. You probably have to use rules though, e.g. when Item A receives ON send INCREASE to Item B (repeat for OFF and DECREASE). A very few Things generate IncreaseDecrease commands natively. It may also be possible to generate them from one of the web GUIs. But you will almost certainly need to use rules to map ON/OFF, OPEN/CLOSED state changes or trigger events to the correct commands to control it.

I used the PaperUI to create the items. The UI only offers item types that are compatible to a certain channel. I think it would be beneficial to be able to use items without the need for an additional rule handling in such simple cases like venetian blinds.

I had a look at the sources and the main question for me was why a IncreaseDecrease type was chosen that in the end does nothing else then DOWN_LONG or UP_LONG. An UpDown Type (Switch) would have been a more natural choice from my point of view as it also triggers an UP and DOWN in the case the binding handles a rollershutter. The result would be the same in the end the blind/rollershutter moves UP or DOWN.