[SOLVED] Nikobus rules not triggered

I have a rules file to sync nikobus items with mios items (switches).
The bindings are ok.

Sync rules (example below) do not run, for none of the defined switches. The log gives nothing indicating that the rule is not triggered?
Any help for this would be welcome. All was working on OH1

Below the state of the items in smarthome:

LP_garage (Type=SwitchItem, State=ON, Label=Licht Garage, Category=null, Groups=[gDashboard, GR_Lichten_Alles, Schakelmodule, PresenceSimulationGroup, R_Lichten_Beneden])
LPgarageStatus (Type=SwitchItem, State=OFF, Label=LP_garage Status, Category=null, Groups=[gVera, GDevices, GRoom10])

Rules file (only 2 switches shown):

    rule "Link LPgarageStatus to LP_garage"
    when
       Item LPgarageStatus changed
    then
          if(LP_garage.state != LPgarageStatus.state && SystemStarting.state == OFF) {
             sendCommand(LP_garage,LPgarageStatus.state.toString())
             logDebug("vera", "Vera switch LPgarageStatus has been synced to state " + LPgarageStatus.state.toString() + " with Nikobus switch LP_garage")
    }
    end

rule "Link LP_garage to LPgarageStatus"
when
   Item LP_garage changed
then   if(LP_garage.state != LPgarageStatus.state && SystemStarting.state == OFF) {
         sendCommand(LPgarageStatus,LP_garage.state.toString())
         logDebug("vera", "Nikobus switch LP_garage has been synced to state " + LP_garage.state.toString() + " with Vera switch LPgarageStatus")
}
end

I’m in the same situation: Nikobus Rule not working
Mine was working too in OH1.

Tonight I will test the feedback with 0H2b5

The rules problem has been fixed. more changes are needed to migrate from OH1 to OH2 than indicated in the documentation.
Changes that were needed:

  1. variable defintion changes from

var java.util.concurrent.locks.ReentrantLock lock = new java.util.concurrent.locks.ReentrantLock()

to

var ReentrantLock lock = new ReentrantLock()

  1. Defining the variables globally does not work. All variables need to be in the “then”-block

Rule working in 1.8.3

import org.openhab.core.types.*
import org.openhab.core.library.types.*
import org.openhab.core.library.items.*
import java.util.concurrent.locks.Lock
import java.util.concurrent.locks.ReentrantLock
import org.openhab.model.script.actions.*
import org.openhab.action.squeezebox.*
import org.openhab.model.script.actions.Timer
import org.joda.time.*
import java.lang.Math
import java.util.Calendar
import java.util.Date
import java.util.TimeZone
import java.text.SimpleDateFormat
import org.openhab.core.persistence.*
import org.openhab.core.library.types.PercentType
import org.openhab.core.library.items.SwitchItem
import java.util.HashMap
import java.util.LinkedHashMap
import java.util.ArrayList
import java.util.Map
import org.eclipse.xtext.xbase.lib.*
var java.util.concurrent.locks.ReentrantLock lock  = new java.util.concurrent.locks.ReentrantLock()
rule "Link LPgarageStatus to LP_garage"
when
   Item LPgarageStatus changed
then
   lock.lock()
   try {
      if(LP_garage.state != LPgarageStatus.state && SystemStarting.state == OFF) {
         LP_garage.sendCommand(LPgarageStatus.state.toString())
         logDebug("vera", "Vera switch LPgarageStatus has been synced to state " + LPgarageStatus.state.toString() + " with Nikobus switch LP_garage")
      }
} finally{
   lock.unlock()
}
end

Rule adapted and working in OH2B5

import java.util.concurrent.locks.ReentrantLock
rule “Link LPgarageStatus to LPgarage”
when
Item LPgarageStatus changed
then
var ReentrantLock lock = new ReentrantLock()

   lock.lock()
   try {
      if(LPgarage.state != LPgarageStatus.state && SystemStarting.state == OFF) {
         LPgarage.sendCommand(LPgarageStatus.state.toString())
         logDebug("vera", "Vera switch LPgarageStatus has been synced to state " + LPgarageStatus.state.toString() + " with Nikobus switch LPgarage")
      }
} finally{
   lock.unlock()
}
end