New Binding for Caddx alarm panels [NX584, NX8e, ...]

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

Hi @Mark_VG,

on the getActions call you should specify the keypad and not the partition.

Thanks @jossuar

That was it… Don’t think I would have spotted that anytime soon. Have fixed that up. Also had to change the sendKeypadTextMessage - the position has to be a string too.

So my rule is now:

rule "Keypad Message Test"
when
    Item Testing_Switch received command ON
then
    val actions = getActions("caddx","caddx:keypad:e59e4935:Caddx_Alarm_Keypad")
    if (null === actions) {
        logWarn("actions", "Actions not found, check thing ID for bridge")
        return
    }
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode(120)
    logWarn("actions", "Entered Terminal Mode")  
    logWarn("actions", "Sending Message")  
    actions.sendKeypadTextMessage("0","Test Message from Mark")       
end

This results in the following on Keypad

Which only lasts about 60 seconds - so guessing the time comes from the settings on the Thing.

Tried a few combinations for the String - but always the same result.

EDIT (Added Logs from DEBUG):

10:59:49.203 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
10:59:49.207 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
10:59:49.208 [TRACE] [x.internal.handler.CaddxBridgeHandler] - sendCommand(): Attempting to send Command: command - keypad_terminal_mode_request - data: 192,15
10:59:49.209 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
10:59:49.210 [WARN ] [org.openhab.core.model.script.actions] - Sending Message
10:59:49.211 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Text to be displayed on the keypad has not the correct length
10:59:49.211 [WARN ] [org.openhab.core.model.script.actions] - Message Sent
10:59:49.408 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.run(): Nothing expected, Nothing received we continue
10:59:49.408 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.run() Outgoing message: 44
10:59:49.408 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
10:59:49.408 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 0F FE 21
10:59:49.548 [TRACE] [ding.caddx.internal.CaddxCommunicator] - Data receiving from the serial port
10:59:49.548 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.handleAsciiProtocol() Got start byte
10:59:49.548 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.handleAsciiProtocol() Got message length 3
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - Data receiving from the serial port
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.handleAsciiProtocol() Got start byte
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.handleAsciiProtocol() Got message length 3
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - Offering received message
10:59:49.579 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
10:59:49.579 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.run() Message expected. Message received
10:59:49.579 [TRACE] [dx.internal.handler.ThingHandlerPanel] - caddxEventReceived(): Event Received - org.openhab.binding.caddx.internal.CaddxEvent[source=Message: 1d Positive Acknowledge
        Message number: 1d - 29 - ↔
].
10:59:49.579 [TRACE] [ding.caddx.internal.CaddxCommunicator] - CaddxCommunicator.handleAsciiProtocol() Got message 29
10:59:49.600 [TRACE] [ding.caddx.internal.CaddxCommunicator] - Data receiving from the serial port

So even though I am sending a 60 seconds to the terminal mode the binding is not seeing that and the message has to be a specific length (tried sending 32 characters)?

Any suggestions?
Mark

Hi @Mark_VG ,

The messages should be 8 characters long.
Try the following:

actions.sendKeypadTextMessage("0","Test Mes") 
actions.sendKeypadTextMessage("8","sage    ") 

Hi

With this rule:

rule "Keypad Message Test"
when
    Item Testing_Switch received command ON
then
    val actions = getActions("caddx","caddx:keypad:e59e4935:Caddx_Alarm_Keypad")
    if (null === actions) {
        logWarn("actions", "Actions not found, check thing ID for bridge")
        return
    }
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode ()
    logWarn("actions", "Entered Terminal Mode")  
    logWarn("actions", "Sending Message")  
    actions.sendKeypadTextMessage("0","Test Mes") 
    actions.sendKeypadTextMessage("8","sage    ") 
    logWarn("actions", "Message Sent")     
end

This is what I get now:

15:15:13.983 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from ON to OFF
15:15:16.765 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Testing_Switch' received command ON
15:15:16.765 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
15:15:16.765 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
15:15:16.781 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
15:15:16.781 [WARN ] [org.openhab.core.model.script.actions] - Sending Message
15:15:16.781 [ERROR] [.internal.handler.ScriptActionHandler] - Script execution of rule with UID 'keypad_message-1' failed: d != java.lang.String in keypad_message
15:15:16.781 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
15:15:18.655 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
15:15:18.655 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 0F FE 21
15:15:18.832 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:15:18.832 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

Also not sure how to set the Terminal Mode time?

Thanks
Mark

I don’t like the following line.

And also from the log excerpt I do not see if the

logWarn("actions", "Message Sent")   

has been executed or the rule has been aborted.

Changed rule with more logging:

rule "Keypad Message Test"
when
    Item Testing_Switch received command ON
then
    val actions = getActions("caddx","caddx:keypad:e59e4935:Caddx_Alarm_Keypad")
    if (null === actions) {
        logWarn("actions", "Actions not found, check thing ID for bridge")
        return
    }
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode (120)
    logWarn("actions", "Entered Terminal Mode")  
    logWarn("actions", "Sending Message")  
    actions.sendKeypadTextMessage("0","Test Mes") 
    logWarn("actions", "Message1 Sent")
    actions.sendKeypadTextMessage("8","sage    ")
    logWarn("actions", "Message2 Sent") 
 
end

Logs as follows:


17:50:16.585 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Testing_Switch' received command ON
17:50:16.585 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
17:50:16.616 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
17:50:16.616 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
17:50:16.616 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
17:50:16.616 [WARN ] [org.openhab.core.model.script.actions] - Sending Message
17:50:16.616 [ERROR] [.internal.handler.ScriptActionHandler] - Script execution of rule with UID 'keypad_message-1' failed: d != java.lang.String in keypad_message
17:50:16.940 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Status Message [Zone: 21]
17:50:16.940 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 08 84 14 08 58 13 F0 00 02 07 04
17:50:16.940 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
17:50:16.940 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
17:50:16.940 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'PIR_Cottage_Bedroom_21' changed from OPEN to CLOSED
17:50:17.002 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zones Snapshot Message
17:50:17.002 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 0A 85 01 80 10 80 00 00 00 00 00 A1 26
17:50:17.002 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
17:50:17.002 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
17:50:20.008 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
17:50:20.008 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 0F FE 21
17:50:20.211 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:50:20.211 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

Rule gets aborted before executing command.

Hi @Mark_VG,

I found a character conversion bug. I compiled a new version of the binding.

Can you please try with the below?
binding

Seems better, but still only get the blocks on the display. Logs as follows:

21:05:23.281 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Testing_Switch' received command ON
21:05:23.281 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
21:05:23.281 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
21:05:23.281 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
21:05:23.281 [WARN ] [org.openhab.core.model.script.actions] - Sending Message
21:05:23.281 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:0, 0:84, 1:101, 2:115, 3:116, 4:32, 5:77, 6:101, 7:115
21:05:23.281 [WARN ] [org.openhab.core.model.script.actions] - Message1 Sent
21:05:23.281 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:8, 0:115, 1:97, 2:103, 3:101, 4:32, 5:32, 6:32, 7:32
21:05:23.281 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
21:05:23.281 [WARN ] [org.openhab.core.model.script.actions] - Message2 Sent
21:05:24.707 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
21:05:24.707 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 0F FE 21
21:05:24.848 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
21:05:24.848 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
21:05:24.863 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
21:05:24.879 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 00 54 65 73 74 20 4D 65 73 DF F4
21:05:25.035 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
21:05:25.035 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
21:05:25.067 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
21:05:25.067 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 08 73 61 67 65 20 20 20 20 22 21
21:05:25.240 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
21:05:25.240 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

Sorry, just tested again. Something weird…

I have commented out the sendKeypadTextMessage lines from my rule. So the rule is now:

rule "Keypad Message Test"
when
    Item Testing_Switch received command ON
then
    val actions = getActions("caddx","caddx:keypad:e59e4935:Caddx_Alarm_Keypad")
    if (null === actions) {
        logWarn("actions", "Actions not found, check thing ID for bridge")
        return
    }
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode (120)
    logWarn("actions", "Entered Terminal Mode")  
//    logWarn("actions", "Sending Message")  
//    actions.sendKeypadTextMessage("0","Test Mes") 
//    logWarn("actions", "Message1 Sent")
//    actions.sendKeypadTextMessage("8","sage    ")
//    logWarn("actions", "Message2 Sent") 
 
end

But when the rule runs now the display is as follows:

Tested by swapping sequence of commands:

    logWarn("actions", "Sending Message")  
    actions.sendKeypadTextMessage("0","My test ") 
    logWarn("actions", "Message1 Sent")
    actions.sendKeypadTextMessage("8","message ")
    logWarn("actions", "Message2 Sent") 
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode (120)
    logWarn("actions", "Entered Terminal Mode") 

This displays the correct message.
So the Message has to be there before entering Terminal Mode.

Also, terminal mode only lasts 15 seconds - not the requested 120seconds.

Will carry on with testing - see of I can get a response from panel.

Please let me know if you have any suggestions about the terminal mode timeout?
Appreciate you work.

EDIT: Also not sure how to get the 2nd line to work?

22:03:25.566 [WARN ] [org.openhab.core.model.script.actions] - Sending Messages
22:03:25.566 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:0, 0:77, 1:121, 2:32, 3:116, 4:101, 5:115, 6:116, 7:32
22:03:25.566 [WARN ] [org.openhab.core.model.script.actions] - Message1 Sent
22:03:25.566 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:8, 0:109, 1:101, 2:115, 3:115, 4:97, 5:103, 6:101, 7:32
22:03:25.566 [WARN ] [org.openhab.core.model.script.actions] - Message2 Sent
22:03:25.566 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
22:03:25.566 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:9, 0:32, 1:32, 2:32, 3:32, 4:32, 5:32, 6:32, 7:32
22:03:25.582 [WARN ] [org.openhab.core.model.script.actions] - Message3 Sent
22:03:25.582 [DEBUG] [dx.internal.action.CaddxKeypadActions] - The value for the display location [17] is invalid. Action not executed.
22:03:25.582 [WARN ] [org.openhab.core.model.script.actions] - Message4 Sent
22:03:25.582 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
22:03:25.582 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
22:03:25.582 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode

Hi @Mark_VG,

here is the new binding: binding

An oversight from my part. I had the value 15 hard coded.
Now it should take the value defined for the keypad thing, you just need to put in the rule:

actions.enterTerminalMode ()

without a parameter.

I had put a restriction that the display location should be only one-digit long. (Removed now)
We have to try out some combinations i suppose. Like:

actions.sendKeypadTextMessage("0","My test ") 
actions.sendKeypadTextMessage("17","My test ") 

The value of the display location can be between 0 - 255.
Also, when you do a test, paste also the log lines with the byte sequences, like:

17:50:20.008 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
17:50:20.008 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 0F FE 21
17:50:20.211 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:50:20.211 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

Thanks for helping out with the debugging. :slight_smile:

I have installed the new version:

246 | Active |  80 | 3.1.0.202104030926      | openHAB Add-ons :: Bundles :: Caddx Binding

It looks like the Terminal Mode timeout is now 0. I have it set to 120 on my Thing. Also tried sending a value via teh rule - same result:

15:31:28.626 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Testing_Switch' received command ON
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Sending Messages
15:31:28.641 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:0, 0:77, 1:121, 2:32, 3:116, 4:101, 5:115, 6:116, 7:32
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Message1 Sent
15:31:28.641 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:8, 0:109, 1:101, 2:115, 3:115, 4:97, 5:103, 6:101, 7:32
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Message2 Sent
15:31:28.641 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:9, 0:49, 1:50, 2:51, 3:52, 4:53, 5:54, 6:55, 7:56
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Message3 Sent
15:31:28.641 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:17, 0:49, 1:50, 2:51, 3:52, 4:53, 5:54, 6:55, 7:56
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Message4 Sent
15:31:28.641 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
15:31:28.657 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 0
15:31:28.657 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
15:31:28.657 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
15:31:30.653 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
15:31:30.653 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 00 4D 79 20 74 65 73 74 20 C0 A7
15:31:30.918 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:31:30.918 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
15:31:30.934 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
15:31:30.950 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 08 6D 65 73 73 61 67 65 20 08 01
15:31:31.106 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:31:31.106 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
15:31:31.137 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
15:31:31.137 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 09 31 32 33 34 35 36 37 38 A6 7B
15:31:31.309 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:31:31.309 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
15:31:31.330 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
15:31:31.330 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 11 31 32 33 34 35 36 37 38 AE C3
15:31:31.533 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:31:31.533 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
15:31:31.533 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
15:31:31.533 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 00 EF 12
15:31:31.658 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
15:31:31.658 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

Would it not be more flexible to allow the timeout to be sent via the Rule and either failover to the value on the Thing, or remove the value from the thing entirely?

No problem at all.

Bit worried about getting the response back from the Keypad to the keypad_key_pressed (string) Item. While in terminal Mode (before this version) - the system seems to go in to “Expansion Trouble” if you try press a key. It then takes some fiddling to clear the error and back to normal operation., Have not tested much though, Just tried to press some numbers to see if the Item got updated.

Also BTW, when chnaging setting on the Keypad Thing - the binding has to be restarted to bring the Thing online. As soon as you edit it it goes OFFLINE.

Hi @Mark_VG,

here is a new binding :slight_smile: binding

The configuration value was not read correctly. This should be fixed now.

Yes.
When i designed the binding, i did not even know what half of the settings meant. Now that I have a better understanding, this part can be redefined.

Don’t get that far.
Let’s first get the display working. Did you get anything in the 2nd line of the display?

If not try with: 0, 8 for the first line (working) and 16, 24 for the 2nd line. If the message is displayed, the keypad actions can be changed to sendFirstLine and sendSecondLine and the splitting to eight characters will be done from the binding. That way it would be easier to write the rules.

Because the terminalModeSeconds were send as 0? Let’s try again. [Sorry for the trouble]

Noted. Will look into it together with the rest of the online/offline handling.

Looks better:

17:34:59.199 [INFO ] [openhab.event.ItemCommandEvent       ] - Item 'Testing_Switch' received command ON
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Sending Messages
17:34:59.261 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:0, 0:77, 1:121, 2:32, 3:116, 4:101, 5:115, 6:116, 7:32
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Message1 Sent
17:34:59.261 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:8, 0:109, 1:101, 2:115, 3:115, 4:97, 5:103, 6:101, 7:32
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Message2 Sent
17:34:59.261 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:16, 0:49, 1:50, 2:51, 3:52, 4:53, 5:54, 6:55, 7:56
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Message3 Sent
17:34:59.261 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - keypad Address: 192, display location:24, 0:56, 1:55, 2:54, 3:53, 4:52, 5:51, 6:50, 7:49
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Message4 Sent
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Entering Terminal Mode
17:34:59.261 [DEBUG] [x.internal.handler.ThingHandlerKeypad] - Address: 192, Seconds: 90
17:34:59.261 [WARN ] [org.openhab.core.model.script.actions] - Entered Terminal Mode
17:34:59.292 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Testing_Switch' changed from OFF to ON
17:34:59.873 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
17:34:59.873 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 00 4D 79 20 74 65 73 74 20 C0 A7
17:35:00.082 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:35:00.082 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
17:35:00.098 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
17:35:00.114 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 08 6D 65 73 73 61 67 65 20 08 01
17:35:00.286 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:35:00.286 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
17:35:00.301 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
17:35:00.317 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 10 31 32 33 34 35 36 37 38 AD BA
17:35:00.489 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:35:00.489 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
17:35:00.519 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Send Keypad Text Message
17:35:00.519 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 0C 2B C0 00 18 38 37 36 35 34 33 32 31 B5 57
17:35:00.686 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:35:00.686 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F
17:35:00.686 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Keypad Terminal Mode Request
17:35:00.686 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 03 2C C0 5A 4A 6C
17:35:00.832 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Positive Acknowledge
17:35:00.832 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 01 1D 1E 1F

My Keypad Thing is set with a 90 second timeout.

Current Rule (had the starting positions all wrong (might be better to let the binding break it up?:

rule "Keypad Message Test"
when
    Item Testing_Switch received command ON
then
    val actions = getActions("caddx","caddx:keypad:e59e4935:Caddx_Alarm_Keypad")
    if (null === actions) {
        logWarn("actions", "Actions not found, check thing ID for bridge")
        return
    }
 
    logWarn("actions", "Sending Messages")  
    actions.sendKeypadTextMessage("0","My test ") 
    logWarn("actions", "Message1 Sent")
    actions.sendKeypadTextMessage("8","message ")
    logWarn("actions", "Message2 Sent") 
    actions.sendKeypadTextMessage("16","12345678") 
    logWarn("actions", "Message3 Sent")
    actions.sendKeypadTextMessage("24","87654321")
    logWarn("actions", "Message4 Sent")     
    logWarn("actions", "Entering Terminal Mode")
    actions.enterTerminalMode ()
    logWarn("actions", "Entered Terminal Mode")      
end

Should we continue this offline (Maybe PM?)

Will test some longer and later positions as per your request above and get back to you shortly.

Yes, this seems to be working now that I have the positions correct - had to write it out to get them right (thanks for the hint)

Are you going to restrict to two lines?

Don’t think so - but happy to test. I tried it when the Terminal Mode was still set top 15 seconds.

Hi @jossuar

Hope you well.

I have been working on a Graphical Widget, which will allow partition selection inside the widget and then arming, disarming, bypassing, etc. Still a work in progress but getting quite near to being able to share… Just quite time consuming as I am really not a programmer/coder by any stretch of the imagination. I have however got most of what I planned working, just cleaning up and adding some details. Will also then have to work on the layout (won’t be a responsive widget), so fixed size etc.

On another note…

How difficult would it be to implement some of the System Status channels related to Power of the system?

These do not appear to be in your implementation. Not sure if you had planned to add them at a later stage?

I would like to include these in my system for monitoring issues with the alarm system. In South Africa we have “load shedding”, so power can get switched off for various time slots when there is a shortage of power in the country.

Thanks
Mark

EDIT:

I just posted this:

Hi @Mark_VG,

should be easy to add these channels. I’m currently on vacation and cannot access my installation. Will be back next week.

1 Like

Hi @jossuar,

I had some delay in upgrading my ‘production’ instance to OH3 due several other important things :wink:

Now, I upgraded to OH3.0.2 and have Caddx Binding 3.1.0.202104031452 running.

Unfortunately, I think the problem with the zones interpretation on the expander cards (>zone8) is not yet solved in this version.

These are the results when adding zone 30:

21:15:07.216 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Zone Status Request [Zone: 30]
21:15:07.218 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 02 24 1D 43 6B
21:15:07.256 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Status Message [Zone: 30]
21:15:07.257 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 08 04 1D 01 58 13 F0 00 00 86 13
21:15:07.261 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Zone Name Request
21:15:07.263 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 02 23 1D 42 69
21:15:07.537 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Name Message
21:15:07.538 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 12 03 1D 50 49 52 20 6B 61 6E 74 6F 6F 72 20 20 20 20 20 DF A7

This is the result when hitting the zone:

21:09:16.741 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Status Message [Zone: 6]
21:09:16.743 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 08 84 05 01 01 05 C4 00 00 5D FC
21:09:16.748 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:16.750 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
21:09:16.782 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zones Snapshot Message
21:09:16.784 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 0A 85 01 00 10 00 00 00 00 10 00 B0 3F
21:09:16.799 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:16.801 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
21:09:19.092 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Status Message [Zone: 6]
21:09:19.094 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 08 84 05 01 01 05 C4 00 00 5D FC
21:09:19.097 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:19.099 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
21:09:19.133 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zones Snapshot Message
21:09:19.135 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 0A 85 01 00 10 00 00 00 00 00 00 A0 1F
21:09:19.152 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:19.154 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
21:09:20.541 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zone Status Message [Zone: 6]
21:09:20.542 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 08 84 05 01 01 05 C4 00 00 5D FC
21:09:20.545 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:20.546 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F
21:09:20.602 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: Zones Snapshot Message
21:09:20.603 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - <-: 7E 0A 85 01 00 10 00 00 00 00 10 00 B0 3F
21:09:20.620 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: Positive Acknowledge
21:09:20.621 [DEBUG] [ding.caddx.internal.CaddxCommunicator] - ->: 7E 01 1D 1E 1F

Can you (or someone else ofcourse :slight_smile: ) maybe track back what is going wrong?

Thank you very much for a reply!

Johan.

Hi @Jo0p,

the problem is clear from the log.

  • When the binding sends a “Zone Status Request” for Zone 30 your panel responds with “Zone Status Message” for Zone 30. Correct.
  • When the Zone 30 is triggered your panel sends a “Zone Status Message” for Zone 6. Incorrect.
  • When the Zone 30 is triggered your panel sends a “Zone Snapshot Message” with correct information for Zone 30. Correct.

With the current binding you should see Zone 6 changing when Zone 30 is triggered.

The solution is to ignore via a configuration the 2nd type of messages and handle only the 3rd type. I’m already half way through with the porting of the changes i had done in the past for the 2.5 binding.
Will inform when ready for testing.

Hi @jossuar,

Thank you for the update, I can’t hardly wait :slight_smile:
Good luck with your work!