Thanks @jossuar
Pity about your fixes only going ion to 3.1. Will continue with the manual version till then.
I have managed to create the Keypad thing and got it online - have to restart the binding to bring it online.
UID: caddx:keypad:<REDACT>:Caddx_Alarm_Keypad
label: Caddx Alarm Keypad
thingTypeUID: caddx:keypad
configuration:
keypadAddress: 192
terminalModeSeconds: 60
bridgeUID: caddx:bridge:<REDACT>
The Keypad Thing lets you define the “Terminal Mode Seconds” which I have set to 60.
I have created the following rule:
rule "Keypad Message Test"
when
Item Testing_Switch received command ON
then
val actions = getActions("caddx","caddx:partition:<REDACT>:partition1")
if (null === actions) {
logWarn("actions", "Actions not found, check thing ID for bridge")
return
}
logWarn("actions", "Sending Text")
actions.enterTerminalMode(60)
logWarn("actions", "Entered Terminal Mode")
actions.sendKeypadTextMessage(0, "Test Message from Mark")
end
But get the error:
22:40:01.013 [WARN ] [org.openhab.core.model.script.actions] - Sending Text
22:40:01.074 [ERROR] [.internal.handler.ScriptActionHandler] - Script execution of rule with UID 'keypad_message-1' failed: class org.openhab.binding.caddx.internal.action.CaddxPartitionActions cannot be cast to class org.openhab.binding.caddx.internal.action.CaddxKeypadActions (org.openhab.binding.caddx.internal.action.CaddxPartitionActions and org.openhab.binding.caddx.internal.action.CaddxKeypadActions are in unnamed module of loader org.eclipse.osgi.internal.loader.EquinoxClassLoader @1a26bf2f) in keypad_message
So guessing something wrong with my syntax? Seems to be failing on actions.enterTerminalMode(60). I have tried with actions.enterTerminalMode() as well.
My panel_keypad_terminal_mode_request shows as ON.
Any ideas on what I may be doing wrong?
Thanks
Mark