Digiplex/EVO alarm system integration using PRT3 module

Hi

Is there perhaps a how to or something similar?

Need all help for this pls

Tinus

Hi, all you need to start playing with the binding is described in a README.md file which is a part of my github repository (see the link in the first post). If you have any specific question or problem that is not covered there, please ask here. I would be happy to help.

I’m glad that someone finally is interested in my binding and hopefully will start using it. Till now I almost lost hope and actually believed that I’m the only one with a need of such integration ;).

Hoping for some feedback and maybe I can finally have a motivation to tidy up remaining TODOs and prepare it to be merged with the official repository.

Cheers,
Robert

1 Like

Hi Robert. I’m new to OH (from Vera) and have managed to install most on the bindings I need. The last one is for my Paradox EVO alarm system - so I was very excited to see your binding. But how do I install it? It doesn’t appear in the list of available bindings in PaperUI.

Hi,

It’s not a part of an official distribution so you have to install it manually, following the guidelines from this page: https://www.openhab.org/docs/configuration/addons.html#through-manually-provided-add-ons. You can find a link to a jar file in the posts above.
I still consider it to be in ‘alpha’ stage, but I guess if there are already people using it and not reporting any problems I may be willing to spend some time to tidy things up and prepare pull request to the official repo.

Hoping for any feedback!
Cheers,
Robert

So, I got this installed and it was working great. Congrats!

But then I had to do a fresh install of Openhabian on my RPi 3B+ (long story). I reinstalled Openhabian and copied the jar file into the addons directory like I did last time… but it no longer loads into OH2.

My log shows the following error:
2018-12-31 15:52:28.235 [WARN ] [org.apache.felix.fileinstall ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.digiplex-2.3.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.digiplex [213]
2018-12-31 15:53:32.034 [ERROR] [org.openhab.binding.digiplex ] - FrameworkEvent ERROR - org.openhab.binding.digiplex

Any idea what i’m doing wrong?

I’m not sure if it’s relevant but I’m using addons.cfg to load my other bindings rather than PaperUI.

Not sure really…

Maybe something around serial port setup? See Setting the EXTRA_JAVA_OPTS on OH2
Maybe changing logging level to DEBUG will give you some hints:
https://www.openhab.org/docs/administration/logging.html

Cheers,
Robert

Hi Robert,

I installed your module and it looks like communicate (status online). But when I try to run auto discovery (Configuration > Things, “+” Digiplex/EVO Binding), module send 104 request but without answer and after 16th-20th sended command some communication error occured and receiver stoped.

Log selection:

openhab.log
2019-01-02 22:12:24.901 [DEBUG] [exBridgeHandler$DigiplexSenderThread] - message sent: ‘ZL016’
2019-01-02 22:12:25.081 [DEBUG] [exBridgeHandler$DigiplexSenderThread] - message sent: ‘ZL017’
2019-01-02 22:12:25.175 [DEBUG] [BridgeHandler$DigiplexReceiverThread] - Receiver thread finished
2019-01-02 22:12:25.261 [DEBUG] [exBridgeHandler$DigiplexSenderThread] - message sent: ‘ZL018’
2019-01-02 22:12:25.431 [DEBUG] [exBridgeHandler$DigiplexSenderThread] - message sent: ‘ZL019’


events.log
2019-01-02 22:12:24.722 [vent.ItemStateChangedEvent] - DigiplexPRT3Module_MessagesSent changed from 14 to 15
2019-01-02 22:12:24.908 [vent.ItemStateChangedEvent] - DigiplexPRT3Module_MessagesSent changed from 15 to 16
2019-01-02 22:12:25.090 [vent.ItemStateChangedEvent] - DigiplexPRT3Module_MessagesSent changed from 16 to 17
2019-01-02 22:12:25.166 [hingStatusInfoChangedEvent] - ‘digiplex:bridge:323b98ab’ changed from ONLINE to OFFLINE (COMMUNICATION_ERROR)
2019-01-02 22:12:25.278 [vent.ItemStateChangedEvent] - DigiplexPRT3Module_MessagesSent changed from 17 to 18
2019-01-02 22:12:25.439 [vent.ItemStateChangedEvent] - DigiplexPRT3Module_MessagesSent changed from 18 to 19

Any suggestion?

Thanks
Jiri

You should double check if serial port configuration (name, baud rate) in binding configuration is correct.
Baud rate should be in line with Paradox configuration, as described in your alarm system manual.

You can also try to connect to the serial port directly, using any linux tool you prefer (minicom for example), just to make sure the serial communication itself can be established. When connected, you can send any of the commands manually (it’s a text protocol after all) and check if PRT3 module answers.

if serial communication works and binding configuration is correct, you should check the steps described here:


make sure that the openhab is started with proper parameters and permissions to access serial ports.

(to validate if parameters are properly passed to the running process you can execute ‘ps ax | grep openhab’ and check the command line).

Hope that helps,
Robert

Hey @rmichalak, do you have any plans to rebase your changes upon OH 2.4?

I have some issues in building from your paradox-binding branch and before I go too far diagnosing my Eclipse / Maven setup, I figured I’d checkin to see if you have a rebased version of it already that builds directly.

Anything newer?

Background
I’m starting to convert my Paradox EVO/PRT3 setup from Vera. My openHAB is some distance away from my EVO so I’d like to add some native-IP support to your binding (ala DSC Binding). I’ll probably add some extra DEBUG/TRACE level along the way.

I’m temporarily simulating this with ser2net/socat, to simulate what I’d like to do directly in the Binding itself and I ran into a few issues (ala the “OFFLINE - COMMUNICATION_ERROR Communication error!” from the top-level Exception handler)…

I’ve gotten to the point where it’ll be simpler for me to add the functionality natively, instead of attempting to diagnose my work-around, and it’s interaction with Java.

@rmichalak and @guessed I’m having a lot of trouble getting this binding to work on my RPi 3 B+ running Openhabian. I re-flashed my SD card with Openhabian, reinstalled Openhabian from scratch, moved the Digiplex jar file into the addons folder (no other bindings installed) and get the following log entries:

2019-01-05 15:38:09.793 [ERROR] [org.openhab.binding.digiplex        ] - FrameworkEvent ERROR - org.openhab.binding.digiplex
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.digiplex [198]
  Unresolved requirement: Import-Package: gnu.io
	at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1613) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) ~[?:?]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) ~[?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [?:?]

Am I right in saying that this also looks like an eclipse / java issue?

Hi @jamac,
You have to install openhab-transport-serial feature. You can do it from the openhab console (https://www.openhab.org/docs/administration/console.html) using the following command:

feature:install openhab-transport-serial

I have to mention that in the README file. I suppose the problem will gone once my binding is integrated with official repository and installed in a standard way, as all dependencies will be installed automatically.

Cheers,
Robert

Hi @guessed,

I’m glad you asked. My plan was to finally prepare PR to openhab repository so my binding will be officially supported, but as no one was actually interested in using it for over a year (or at least gave no sign on this forum), my motivation was low. But now it changed and as I see more and more people using it and asking questions, my motivation is rising… So the short answer is ‘yes’, I plan to do that. I can even try to do it this weekend, but no guarantees :wink: .

I used ser2net/socat for development of this binding and it worked flawlessly. I recall different kind of communication problem though. My version of PRT3 module has both usb and serial connectors, and my first try was to use usb<->usb cable to connect to RPi, by I found it very unstable. For the reasons unknown to me PRT3 module just stopped responding to my messages after a while. This is why I put reconnect mechanism into the binding, but even then I had to physically reconnect the cable from time to time to restore communication.

My second attempt was to use serial port of PTR3 module and connect it to USB port of RPi - and it worked (and is working till now) flawlessly. No lost messages, no stuck responses. So I wonder if your problem may also be related?

Looking forward to see your changes (once I rebase my changes - still remember that!) but please make sure that your communication problems are not related to the problem described above before you go too far with your implementation.

Cheers,
Robert

Hi @guessed,

I rebased my branch with recent changes from openhab2-addons master. Not that I tested it extensively, it just compiles :wink: . I don’t expect any problems though, as the only files I had to change were pom.xml and MANIFEST.MF

Cheers,
Robert

Hi,
PRT3 module wasn’t configured properly. Communication started after the restart and now everything working well.
I’ll continue testing this integration. Many thanks for sharing of your work.

Best regards
Jiri

Thanks! I’ll spend tomorrow resurrecting my env and getting it to build correctly.

My Serial Port is extended correctly from my PRT3 through to my OH VM, and exposed correctly as a socat device (/dev/ttyPARADOX0 in my case). So the end-to-end chain is all correct, as are the PTY permissions, and Java CLI args… That’s what triggered the desire to do it correctly, and code into the Binding itself (vs debug it with all my work-arounds) … everything except Java/OH was showing the PRT3 communications path to be working correctly.

This all uses the USB connector on the PRT3, since it’s via Vera - where I’ve shutdown the HA (“cmh”) controller to free up the port. Vera/MiOS devices inherently use ser2net to turn serial things into IP things, as the MiOS framework unifies these comms paths into a simple stream abstraction.

At any rate, the USB-Serial on the PRT3 has been rock solid for ~8-9 yrs now (my MiOS/Paradox plugin is v.old code at this point)

PS: I couldn’t see a “user” abstraction in the code. I have a few scenes that behave differently depending upon the user that disarms the system. Do you have plans for this, or did I miss it?

I didn’t need any user specific actions so this part of the binding needs extension. Quick look at the protocol documentation reveals that it is doable. I don’t have any plans for such extension, but this may change. On the other hand it’s open source, so feel free to code it yourself. It should be pretty straightforward with my framework in place.

In the meantime, I created issue and PR, so I hope my binding will find its way to the official repository soon.

Cheers,
Robert

Thanks Robert. I got it working. I’ll upgrade to the new version when it appears in the official repository.

Does this work on 2.4.0 stable? Any screenshots of widgets that have been created? Is there a list of what items it exposes? Sounds good though

It SHOULD work, never confirmed it though. My current setup is 2.5.0.M1.
Documentation can be found here: https://www.openhab.org/addons/bindings/digiplex/. No screenshot unfortunately.

1 Like

Hello,

Is it possible to implement possibility to configure zones and areas via .things file? for today I can use only discovery.

Ed