How to monitor a dry contact?

Hi,

I have an old alarm system. No IP, no RS-232.
There is an add-on board that can give me the state of 4 door contact in the form of dry contact (potential free). (1 relay for 1 contact)
My question is the following:
How can I interface that 4 relays with my openHab system.
The better is the most plug & play option.
I don’t want to reinvent the wheel.

Thanks for your help

There are a number of ways you can do this, I’m happy to suggest a few but understand that everyone will have their own take on it.

If you want a two way solution (if you have some spare zone inputs) you could look at a Robot Electronics IO board that would give you UDP or TCP over IP control?

Like this unit for ~£70 that offers

4 x Relay outputs
4 x analogue inputs
8 x digital IO

There is a box available too.

They have a DScript version if you want to add some extra logic.


Alternatively, you could add a couple of Velbus modules which can be linked to openHAB2 via USB.

www.velbus.eu/products

VMB8PBU or VMB6PBN for picking up the contact closers.

VMB1RYNOS for triggering a zone input.

VMB1USB for interfacing directly to openHAB2.

You could probably grab 60ma of 12Vdc from the alarm to power these Velbus modules.

To help narrow the choices down, what existing technologies are you using with openHAB? e.g.perhaps you have zwave already.
Are you able to run wires between your alarm and some central OH box,or would you need wireless?
What about power -if you install some device at the alarm, can you “steal” 12 volt power from the alarm?

I do this myself with a Modbus digi i/o module,but that is part of a larger Modbus setup.
Could be used alone though- module in alarm box, powered by alarm, cat 5 cable to OH host, cheap USB/RS485 dongle to drive cable.

Hi,

For now, I use only MQTT and weather bindings. I just begin some month ago with OH2.
I’m open to any technology. (Zwave, velbus, RS485, modbus,…)

My Openhab run on a RaspberryPi3 in a clean box. I don’t want direct connection to the RPI.
For the link, an RJ-45 connector is the best but wifi is acceptable. (but no bluetooth)
The power supply is not an issue.

I have to double check but the ETH484 suggested by MDAR seems pretty good.
If I understand well, this card need only HTTP binding to link to Openhab?
I continue to search but anyway, thank you all to put me on the right way…

1 Like

Hi

I think you’re right.

I use the DScript version with the TCP binding to trigger ‘rules’ within the relay box.

It’s my understanding that the basic IO board will communicate over UDP or TCP.

As per this documentation.

Hi,
You can use Shelly1, a very low cost IoT WiFi device, wich can be powered 110/220Vac or 12, 24, 48Vcc, use MQTT protocol, and offers a dry contact as output.
ESP8266 embedded, accept to be re-flashed with any open source firmware without to loose manufacturer material warranty, if needded (never done myself, no necessity, the original firmware is ok).
I already use “lot of them” for my personal use, with success.
You can also use any ESP8266 dev board for that, if you want to program something by yourself.

1 Like

Hi,

Thank F6HQZ for the idea.
Shelly1 have only one switch input but at this price, it’s not a problem to buy some…

but,
in the meantime, I have orderded a Robot Electronics DS3484 (dScript).
I will test it as soon as I received it and you will be aware of the results.

@MDAR
Can you post some sample files (sitemap, items, rules) that you use with this board?

1 Like

Hi

As far as openHAB2 is concerned, you’ll probably only need 2 x TCP items.

One incoming
One outgoing

I’d suggest a rule to monitor the incoming packets and perform an action / event for a match.

Outgoing would be as simple as sending a command to the outgoing TCP Item.

It’s the DScript inside the Robot Electronic board that will need your most attention.

The standard board simply sends out input status data and opens or closes relay contacts from incoming packets.

What you’ll have to do is create this simple logic in the DScript language.

There are plenty of examples you can work from on the Robot Electronics DScript page.

When I get home, I’ll PM you a DScript project I created that will demonstrate the board performing a choice of actions, based on a single character RAW TCP packet.

You’ll just have to learn how the outgoing TCP is programmed in DScript.

FYI
DScript PDF

DScript examples ZIP