Remotec ZRC-90 binding has a '-' minus sign in channel name: 'battery-level' preventing it from being referenced in a rule

  • Platform information:
    • Hardware: Raspberry Pi 4B rev 1.2
    • OS: Rasbian GNU/linux 10 (buster)
    • Java Runtime Environment: Open JDK v11
    • openHAB version: 2.5.4.1 (release build)
  • Issue of the topic: Remotec ZRC-90 16 scene controller with a mis-formatted channel name
  • Please post configurations (if applicable):
    /* ITEM */
    Number ZRC90_SceneController_001_Battery_Number “ZRC90 Battery Number”

this is my first post here. Thank you for making this help accessible. I am getting an error in the log:

2020-06-12 14:48:54.435 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule ‘Remotec ZRC90 Rules’: ‘battery’ is not a member of ‘java.lang.String’; line 34, column 15, length 96

It seems that the minus sign in the channel name ‘battery-level’ is improperly formatted (something other than a letter or an underscore). Its causing ‘battery-level’ to be seen as ‘battery’ by the rule.

No there’s no problem with channel names to have a minus.
Your problem is with your rul, it tells you the exact location. BTW you must not reference channels but items.

1 Like

ok thank you for taking the time to help me. I have followed your advice by updating my rule to reference the item I created in ‘my_items.items’ file and not the thing’s channel itself. I can now access the battery percentage… :slight_smile:

/* ITEM */
Number ZRC90_SceneController_001_Battery_Number “ZRC90_Battery_Number” {channel=“zwave:device:086b8920:node29:battery-level” }

/* RULE */
rule “Remotec ZRC90 Rules”
when
Item ZRC90_SceneController_001_Scene_Number received update
then

val nBatteryPct = ZRC90_SceneController_001_Battery_Number.state
logInfo(“my_ZRC90_rules.rules”, "Battery Percentage: " + nBatteryPct)

end