Nikobus v2

@crnjan quick question. I finally go to migrating my OH2.5 to OH3. How do I configure this Duration and Delay parameters in text file configuration ? I looked at the binding documentation but couldn’t find an example in there.

Found it for those who need it. This is how to configure the delay and duration of a rollershutter output in things file.

    Thing rollershutter-module R1 [ address = "C872" ] {
        Channels:
            State Rollershutter : output-1 "Output 1" [ duration = 45, delay = 10, reverse = "false" ]
            State Rollershutter : output-2 "Output 2" [ duration = 68, delay = 10, reverse = "false" ]
            State Rollershutter : output-3 "Output 3" [ duration = 30, delay = 10, reverse = "false" ]
            State Rollershutter : output-4 "Output 4" [ duration = 32, delay = 10, reverse = "false" ]
            State Rollershutter : output-5 "Output 5" [ duration = 28, delay = 10, reverse = "false" ]
            State Rollershutter : output-6 "Output 6" [ duration = 39, delay = 10, reverse = "false" ]       
    }
2 Likes

Hi @rswennen , since i always used the OH3 Gui i made a card for my rollershutters.
But my “up” or “down” keep powered. So they also conflict with my remote control etc.
Any idea how to use the rollershutter duration in the OH YAML code?

    - component: oh-rollershutter-card
      config:
        item: RollershutterModule1_Output1

I’ll check tonight but if I recall when using the GUI you will find fields in the UI under the rollershutter thing, when going to the channels and then select the respective channel configuration.
So it’s the definition of the channel in the thing you need to change not the configuration of the card.

You can configure it in Rollershutter Module thing:

2 Likes

@crnjan OMG thanks for pointing this to me. Hidden in plaine sight… i feel stupid now…
Just did a test with this setting and it works perfectly!
Thank you

Thx!

Hi, how can i group several rollershutter outputs ?
For example output 1,2,3 in one group and 4,5 in another.
Then control them togeter withu up/stop/down?

In my page i now have:

component: oh-rollershutter-card
config:
  item: R01_O01_Schuif_Links_Achter
  vertical: false
  title: Keuken
slots: null

But if i add an extra item it throws an error.

In file config you do this by making groups but through the UI you should be able to do something similar in the semantic model.

Have a look at Semantic Model | openHAB the very last bullet point at the end is probably what you want to do
“Groups have the option to apply an aggregation function. One can semantically tag these Groups using a Point/Property tag and put the Group into an Equipment or Location. This can be useful in cases where a number of Items are logically controllable as one device, such as three smart bulbs in one lamp.”

1 Like

Maybe just to add - you don’t need a semantic model for this - you can simply create an item with type Group and add items you want to that group … and this is binding agnostic - once you are operating with items it doesn’t matter anymore which binding (if any) item is tight to …

@crnjan I tried this and interestingly I got the following error when trying to do that " openHAB
Error while updating the member list: Method Not Allowed"

have you tried with rollershutters already ?

Just tried it out …

Created an item gGF_Rollershutters

and

using

- component: oh-rollershutter-card
  config:
    item: gGF_Rollershutters

will control all rollershutters within group (up/down/stop) …

Or did you mean something else?

@crjan how would a push button filter trigger and channel trigger be configured in a text file ?

e.g. how would I add a a button trigger with treshold 2000 milisec to below button?

Thing push-button NB_RB_bureaudeurrechts_BP9_C "NB_RB_bureaudeurrechts_BP9_C" [ address = "2548D7", impactedModules = "switch-module:S3:1" ]

One additional question, if a treshold is added a short press or long press event will be added, so would you recommend to include all module in impacted modules that are impacted in the short and long press case (they could be different). The downside of this is if your long press is configured as an all lights off for example all modules will be impacted so every time the button is short pressed the binding will pull query all modules.
Or would you recommend defining 2 separate things with the same address and a different name (for example name_long) with name_long one with a treshold. Assuming the one without treshold would be triggered always (and have impacted modules of short press) and the second thing with same address but _long name and treshold would be riggered when long press happens and have a longer list of impacted modules in this case. (or would that not work).

I guess something like this should be used in order to add a trigger …

EDIT: Currently only a single button with the same address can be registered. How many modules are we talking about?

Thanks, that works. In my case it’s 4 switch modules and 2 dimmer modules (and 6 rollershutter modules but wouldn’t need to list them as impacted modules). So it would be (4+2) x 2 = 12 x 300ms = almost 4 seconds.

But just realised I could probably play around with a rule that is triggered by the long press event (which works, I tested it) that does some sendcommand(refresh) for all of the outputs of those modules. It’s a bit longer but would only happen when long press is done.

Will post findings.

Changing the binding code to allow multiple buttons with the same address should be pretty easy to do as well … Please let me know … There just wasn’t such a need until now :slight_smile:

hi @crnjan ,
i just tried the Group item and added the rollershutters, this works perfect!

@crjan After having set up the rollershutters in OK I’m now integrating them in Homekit through the homekit addon.

They appear ok in Homekit but when triggering an action in homekit I get errors. It looks like the integer value that is being sent to the rollershutter item causes errors.

The errors I get are as follows

==> /logs/events.log <==

2021-10-01 18:12:44.437 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'NB_R1_04_bureau' received command 0

2021-10-01 18:12:44.438 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'NB_R1_04_bureau' predicted to become 0

2021-10-01 18:12:44.441 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'NB_R1_04_bureau' changed from 100 to 0

==> /logs/openhab.log <==

2021-10-01 18:12:44.444 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.handleCommand()' on 'org.openhab.binding.nikobus.internal.handler.NikobusRollershutterModuleHandler@58d8f9c': Command '0' not supported

java.lang.IllegalArgumentException: Command '0' not supported

	at org.openhab.binding.nikobus.internal.handler.NikobusRollershutterModuleHandler.valueFromCommand(NikobusRollershutterModuleHandler.java:91) ~[?:?]

	at org.openhab.binding.nikobus.internal.handler.NikobusModuleHandler.processWrite(NikobusModuleHandler.java:198) ~[?:?]

	at org.openhab.binding.nikobus.internal.handler.NikobusModuleHandler.handleCommand(NikobusModuleHandler.java:83) ~[?:?]

	at org.openhab.binding.nikobus.internal.handler.NikobusRollershutterModuleHandler.handleCommand(NikobusRollershutterModuleHandler.java:1) ~[?:?]

	at jdk.internal.reflect.GeneratedMethodAccessor133.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]

	at com.sun.proxy.$Proxy597.handleCommand(Unknown Source) [?:?]

	at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]

	at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]

	at jdk.internal.reflect.GeneratedMethodAccessor132.invoke(Unknown Source) ~[?:?]

	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

	at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

	at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]

	at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]

	at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]

	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]

	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]

	at java.lang.Thread.run(Thread.java:829) [?:?]

==> /logs/events.log <==

A status update from Openhab to Homekit does work fine though, i.e. when a rollershutter is opened and closed in OH the status changes in Homekit. Even the position (e.g. 50%) is shown correctly. It just seems like the command from Homekit to the binding doesn’t work.
I also tested sending a command 50 from Nodered and get similar error. So it’s not a homekit specific error but a specific error where the binding doesn’t accept numeric value commands.

Hey! I haven’t played with Homekit, but generally Nikobus rollershutters have no “positioning” - there is no feedback loop, module can only operate with UP/DOWN/STOP, which is what binding supports.

Position part is a binding only thing where based on time we “guess” where the rollershutter is … and that info is readonly, one cannot say “open rollershutters 50%” since, as said, nikobus rollershutter module does not have this kind of information/control.

Would this be a future option of the binding? I’m aware Nikobus rollershutters don’t have any position and don’t provide feedback but the binding position features works absolutely great.

So you can imagine a feature improvement where, when the rollershutter item receives a numeris command (e.g. 50) depending on the position of the binding feature the binding sends an up or down to nikobus.

And ideally an up or down is sent depending on current position (as calculated by the binding) and sends a stop command after x seconds (calculated based on the delta).

I really like the position feature as it’s handled by the binding currently.