Nikobus not aligning with switch item

In my items file I’m combining a nikobus binding, a mios binding and an imperihome binding to 1 switch (see example below). This to sync the state of 1 switch among different systems.
Switch LP_garage “Licht Garage” (Schakelmodule, GR_Lichten_Beneden) { nikobus=“1D5E:1”, mios=“unit:vera,device:35/service/urn:upnp-org:serviceId:SwitchPower1/Status,command:ON|OFF,in:MAP(miosSwitchIn.map)”, imperihab=“room:Beneden,label:Garage,type:DevSwitch” }

When only using the Nikobus binding (below)
Switch LP_garage “Licht Garage” (Schakelmodule, GR_Lichten_Beneden) { nikobus=“1D5E:1”}
all works fine, but when combining I get repeat commands in my log and the system does not always or timely respond to a switch change in one of the different systems (Vera, imperihab, …)

Sample log
2015-10-01 17:26:28.569 [DEBUG] [.n.i.config.ModuleChannelGroup] - Processing nikobus command $1CBC590000000000000074BF5E for module (BC59-1)
2015-10-01 17:36:28.307 [DEBUG] [.o.b.n.i.core.NikobusInterface] - Sending : $1017BC599AD3B2
2015-10-01 17:36:28.350 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=$0517, repeats=1]
2015-10-01 17:36:28.564 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=$1CBC590000000000000074BF5E, repeats=1]
2015-10-01 17:36:28.565 [DEBUG] [.n.i.config.ModuleChannelGroup] - Processing nikobus command $1CBC590000000000000074BF5E for module (BC59-2)
2015-10-01 17:36:31.205 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=#N10A062, repeats=7]
2015-10-01 17:36:37.239 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=#N10A062, repeats=1]
2015-10-01 17:36:37.465 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=#N10A062, repeats=1]
2015-10-01 17:36:38.125 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=#N10A062, repeats=6]
2015-10-01 17:36:40.912 [DEBUG] [b.n.i.c.NikobusCommandReceiver] - Received NikobusCommand [command=#N10A062, repeats=6]

Am I doing something wrong?
Sometimes it works, sometimes it doesn’t. Any timings I need to integrate/change?
The goal I want to reach is switching a openhab switch controls a switch in Nikobus system and Vera system and pressing a physical Nikobus button (or virtual vera switch) syncs state between the other environments and openhab.

Openhab is running on a RPI2 server which is almost not loaded (cpu/mem)
Thanks!
Stefaan

Stefaan,

Do you have the same problem as me with the feedback, or does the feedback keep on working on your system
Memory Leak?

The commands keeps on working, only the feedbacks stops after a couple of hours…

Marc

Indeed same issue probably feedback related.
You think about a memory leak?

I think so, or another problem in openhab, because with the Nikobus software it keep on working…

For me it works as long a nikobus switch item is used standalone. When i sync with mios switch (both when using combined binding or using rules) nikobus starts flipping

  1. your log file is incomplete. It does’t show any of the openHAB bus events (like switch received command ON, etc.). This makes it difficult to troubleshoot.
  2. you only post part of the related config. Do you also have a config for button #N10A062?
  3. What do you mean with repeat commands?
  4. In your config you have:

Switch LP_garage “Licht Garage” (Schakelmodule, GR_Lichten_Beneden) { nikobus=“1D5E:1”, mios=“unit:vera,device:35/service/urn:upnp-org:serviceId:SwitchPower1/Status,command:ON|OFF,in:MAP(miosSwitchIn.map)”, imperihab=“room:Beneden,label:Garage,type:DevSwitch” }

Are you mapping the mios to commands received on the switch? This won’t work. The switch on the module will only receive a ON/OFF command from the switch is activated within openHAB (e.g. using the web UI). If you use the nikobus button to turn on/off the switch, then the configured switch in openHAB will only receive a status update, not a command. When you use other bindings on the same switch, it is possible that they post an command or state update when they received one. This will depend on the binding used.

To synchronise nikobus channel state to other systems, it’s best to set up a rule which listens to the STATE change of the switch and then send the update as a command to a separate switch containing the mios / imperihab config.

Thank you David for the clear explanation!
i do not have buttons configured as items, I immediately command the switch module channels. this works well.
Indeed, I’ve changed the binding config so only Nikobus is mapped to the switch and imperihab and Mios are both mapped to an other switch item. Both related switch items are synced using rules.

I’ll monitor how this goes the coming days.
Btw, are you planning to update the nikobus binding to a openhab v2 native binding?

There is no nikobus binding v2 planned for this year. Hopefully I will get some available time next year.

Thanks for this update Davy!

Davy, just checking are there any plans in the meantime for an OH2 Nikobus binding?

Nothing in the short term, I’m afraid…

OH2 and nikobus not aligning with switch items? Anyone succeeded?

Example config:
Switch LP_GF_Kitchen “Centraal” (GF_Kitchen,light_GF,light_all) { nikobus=“6644:6” }
Switch PB_GF_Keuken_LB “” { nikobus="#N961626:SHORT[6644-1]" }

Log:
When push on ui:
2016-09-03 17:19:56.502 [DEBUG] [kobus.internal.core.NikobusInterface] - Sending : $1E1566440000000000FFFFF1C005
2016-09-03 17:19:56.561 [DEBUG] [internal.core.NikobusCommandReceiver] - Received NikobusCommand [command=$0515, repeats=1]
2016-09-03 17:19:56.752 [DEBUG] [internal.core.NikobusCommandReceiver] - Received NikobusCommand [command=$0EFF664400EC, repeats=1]

When push button
2016-09-03 17:20:56.411 [DEBUG] [internal.core.NikobusCommandReceiver] - Received NikobusCommand [command=#N961626, repeats=3]
2016-09-03 17:20:56.412 [DEBUG] [kobus.internal.core.NikobusInterface] - Sending : $101266444853D1
2016-09-03 17:20:56.455 [DEBUG] [internal.core.NikobusCommandReceiver] - Received NikobusCommand [command=$0512, repeats=1]
2016-09-03 17:20:57.039 [DEBUG] [internal.core.NikobusCommandReceiver] - Received NikobusCommand [command=$1C6644000000000000FF5D92E7, repeats=1]

My configfile:
################################ Nikobus Binding ######################################

Serial Port connected to pc-link. Valid values are e.g. COM1 for Windows and /dev/ttyS0 or

/dev/ttyUSB0 for Linux

serial.port=/dev/ttyUSB0

Directory path where the command cache file should be created.

Optional. Defaults to the users’ home directory.

#cache.location=

Perform a module status query every x seconds (optional, defaults to 600 (10 minutes)).

refresh=100