Mirror IP relays

Very off topic, I am looking to circumvent openHAB altogether !! :exploding_head:

I would like to mirror contacts across a LAN, directly from one little digital input box to another relay output box.
The actual application is to carry an alarm output provided by relay contacts, across an existing WiFi bridge between buildings, and reproduce with another relay. With minimal complication, being an alarm - a point to point installation.
Bi-directional would be useful, as would two-channel. WiFi or wired ethernet.

There are a couple of relatively expensive commercial solutions to do this, example

But there are many cheap LAN enabled relays (though not so many with input as well).

It seems like something a Tasmota loaded Sonoff should be perfectly capable of doing - set up one as “mirror master mode”, one as “mirror slave”, set up IP address targets, and have one GPIO control the other’s relay. But as far as I can tell, no such capability.

I don’t want to build and program my own solution from bits, a ready made module preferred.

I know nothing about Tasmota, but this looks promising

I begin to believe I can create rules in Tasmota to trigger from a “button” input and websend HTTP On/Off commands to a remote Tasmota.controlled relay.
Lots to learn here, me :crazy_face:

Can’t speak for tasmota piece but I may buy a d1 mini vs sonoff easier to customize the Gpio a small soap dish could be used as a case.

If you buy wemos d1 maybe an arduino case could work if there is such a thing. It also has micro usb power so any phone charger can power. Tasmota can be loaded.

A suggestion.


It depends on what you call cheap…

Robot Electronics do a fabulous range of IP IO boards that can have their IOs mapped to each other via TCP.

They also have advanced DScript programmable boards that are incredibly flexible.

For example - https://robot-electronics.co.uk/products/relay-modules/ethernet-relay/ds1242.html

I’ve programmed one of these to respond to various UDP packets from OH to hammer out a range of bell chimes.

(This is the development UI that nobody ever looks at, as the chimer is triggered by UDP)

Or two of these Velbus modules can be mapped to each others IOs, but they aren’t IP, so they’d need a link cable.

1 Like

Thanks, I will look at those. Price is in the same ballpark as other commercial possibles. I’d be pleased not to do any soldering or flashing :smiley:

Bonus points for being able to inform openHAB as well as the primary remote relay job.

I am constrained here to use LAN, to exploit an existing radio LAN bridge between buildings.
There is WiFi at each end but on reflection, WiFi modules won’t do for me as at least one has to live inside a steel box. Wired ethernet instead.

Shame, as WiFi relays are cheap and plentiful and have enough processing power to do the job.
The Sonoff/Tasmota/rules/HTTP link idea looks perfectly viable, but I won’t be persuing that myself now.

1 Like

I think youve figured out what you want now… So Im a bit late to the party, however, I believe this video shows various methods using rules in Tasmota for sending commands to other devices (both with and without a intermediate server). The bits to watch for those interested, are from about the 5:30 mark onwards.

1 Like

Thanks for that.
Personally I’ll not be using WiFi now, but it is good to gather ideas together for future reference.

Did you ever get your hands onto one of these boards @rossko57 . If yes, did you try communicated with it using modbus binding?

I should have followed up!

Yes, I used a pair of dS1242 ethernet Relay/IO modules, from Robot Electronics.

These were easily configured to chat to each other directly - the relays on one following the digital inputs on the other, peer-to-peer.
This allowed the cross-linking of old fashioned wired intruder alarms in two buildings, where buildings already had ethernet LAN linked by a wireless bridge.
The modules are small enough to fit inside the alarm cases, and powered by the alarm’s 12V supply.

Fit and forget, not cheap, but very pleased…

I haven’t yet deployed an openHAB to that remote site, so they are working standalone just now.
I did have a play before install on the bench though, it looks to have no problem communicating with Modbus-TCP alongside the mirroring setup.
I’l be using Modbus for other purposes, but if you wanted something else there are other TCP services offered.

1 Like


What other services would you suggest?

It’s in the DS1242 docs, they support a simple ASCII command/response set which would be usable with openHAB TCP binding. With some leg work - manage your own polling, etc.

If you wanted to build a proper binding for the DS range, they have a binary/hex command set which looks suitable.

Unless you have a reason to avoid Modbus though, that provides the easiest way to link hardware to OH Items because the binding already exists.

Thats what I thought as well… Just wondering if these other service were somehow easier… But already having modbus, I would say it would be the best option.

Lan IO board are now coming with Http(s) protocol. I’m review the different kind of ethernet IO board there : http://graphtoweb.com/alarm/ioboardproducent.html. It can make very secure system with an android apps.