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

Sorry, that was the limit of my knowledge. I have a NX8e, so a bit different.

FYI, I worked it out.
Very strange, but I have to set the NX-584 to ASCII. The bridge thing in openhab is set to Binary.
That way it works!!! Everything is online now.

1 Like

That is great. What version of OH are you running? As I mentioned above I seem to have an issue with THINGS coming online after a restart - required Bridge Thing to be disabled and re-enabled.

Currently I’m using OH 3.2.0 running in docker on an Intel NUC running Ubuntu 22.04.1 server.
I had some issues with the latest OH 3.3.0 version and my Sonos speakers. They became randomly disconnected. And all of a sudden the volume was set to the maximum… Never have that with the 3.2.0 version.

I have no problems with the CADDX Bridge Thing running OH 3.2.0 after restarting the Docker container. It comes automatic ‘ONLINE’ without any problem.
As you mentioned above: Input field for number/free text for openHAB UIs
Do you have the code working in openhab3? I would like to enter the code also before ARMING/DISARMING the alarm. Thanks in advance!

Georgios fixed it a while back and had been fine till i upgraded to 3.3.

I am hoping he will see my post above snd take a look again.

Take a look at:

This allows entering PIN etc.

Hello @Mark_VG,

yes, I’m still here. It’s vacation period currently. :slight_smile:

I haven’t upgraded, and do not experience the issue.
Yes, a log would be helpful. Thanks

Thanks Georgios.
Hope you enjoy you holidays. Would really appreciate if you can look when you get a chance. Seems to be similar to when you fixed last time.

Attached are the openhab.log file as well as a Caddx DEBUG log. I can send the TRACE if it will be better?
openhab.log (6.6 KB)
caddx.log (181.4 KB)

I restarted openHAB and the THINGS were as follows:

Disabled and re-enabled the Bridge Thing and got:


Thanks
Mark

Hi @Mark_VG,

Looks like a timing issue.
The bridge requests on initialization the state of all the zones, partitions, etc. The problem is (probably) that the binding is not yet ready e.g. Not all zones/partitions/etc have been yet loaded.

I’ll need some time to update my dev environment and look into it. Will keep you posted.

1 Like

Hi Georgios

Also seeing this on a restart:

14:00:25.717 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.initialize()' on 'org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler@37b7d31a': For input string: "15.0"
java.lang.NumberFormatException: For input string: "15.0"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
        at java.lang.Integer.valueOf(Integer.java:957) ~[?:?]
        at java.lang.Integer.decode(Integer.java:1436) ~[?:?]
        at org.openhab.binding.caddx.internal.CaddxMessage.<init>(CaddxMessage.java:111) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.sendCommand(CaddxBridgeHandler.java:258) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.lambda$0(CaddxBridgeHandler.java:165) ~[?:?]
        at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.initialize(CaddxBridgeHandler.java:165) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]
14:00:25.743 [ERROR] [.core.thing.internal.ThingManagerImpl] - Exception occurred while initializing handler of thing 'caddx:bridge:e59e4935': For input string: "15.0"
java.lang.NumberFormatException: For input string: "15.0"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
        at java.lang.Integer.parseInt(Integer.java:652) ~[?:?]
        at java.lang.Integer.valueOf(Integer.java:957) ~[?:?]
        at java.lang.Integer.decode(Integer.java:1436) ~[?:?]
        at org.openhab.binding.caddx.internal.CaddxMessage.<init>(CaddxMessage.java:111) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.sendCommand(CaddxBridgeHandler.java:258) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.lambda$0(CaddxBridgeHandler.java:165) ~[?:?]
        at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603) ~[?:?]
        at org.openhab.binding.caddx.internal.handler.CaddxBridgeHandler.initialize(CaddxBridgeHandler.java:165) ~[?:?]
        at jdk.internal.reflect.GeneratedMethodAccessor99.invoke(Unknown Source) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
        at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
        at java.lang.Thread.run(Thread.java:829) [?:?]

M

Hi @Mark_VG,

Please run the following and send me the debug log.
latest jar

Unfortunately, I could not test it. Hopefully it is working. :slight_smile:

Also send me the full log with the error, so that i can have some context.
Thanks

Hi Georgios

Thanks for looking into this.

Appears to be something missing?

07:36:28.437 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/C:/openHAB/addons/org.openhab.binding.caddx-3.4.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.caddx [274]
  Unresolved requirement: Import-Package: org.openhab.core.io.transport.serial

        at org.eclipse.osgi.container.Module.start(Module.java:463) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:445) ~[org.eclipse.osgi-3.17.200.jar:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:520) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [bundleFile:3.7.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [bundleFile:3.7.4]

Do I need something else in ADDONS as well?

Attached is a full debug log of starting with the New JAR and then reverting to the original and then restrting the BRIDGE THING. This includes the error I mentioned.
caddx.log (392.3 KB)

Hi @Mark_VG,

you also need the serial feature. Try the following on the console
feature:install openhab-transport-serial

Thank you. Will do that.
Does that survive an openHAB restart?
Just want to be sure i get you the logs you need on restart.

EDIT: Attached are the logs. Had to restart the Bridge Thing to get the zones etc online
caddx.log (290.0 KB)

The difference i see is that on the 1st run the zones have a .0 at the end.
childHandlerInitialized. Zone 20.0

After the restart we get
childHandlerInitialized. Zone 20

I don’t know why that happens. Will look into it.
How did you configure the binding?

Thank you.

Everything is configured via GUI.

Hi @Mark_VG can you try the following jar:

latest jar

Thanks Georgios. Thant seem sot have worked. The THINGS initialize and then stay OFFLINE for a while, then all come ONLINE.
Will monitor for a day or two and then confirm.
Thanks so much for looking at it.

Mark, please send the caddx.log so that i can confirm that it behaves as intended.
Also can you check that you do not get anymore the NumberFormat exception.
Thanks

Good Morning.

No problem. Log as follows:
caddx.log (99.3 KB)

The Number Format Exception seemed to be cured in your previous fix too.