SR-201 Ethernet Relay

Hi All,

New day, new interesting domotica.

So I purchased a SR-201ethernet relay. I’m currently using a Fibaro Z-wave switch but sometimes takes like 5 -10 seconds to receive a signal (which is long if you’re waiting at your gate). So time to switch to an ethernet based relay.

So unpacked, configured and this thing works… with the provided software. I am stuck at the point where I need Homey to be able to send the command 11* via TCP over port 6722 to open or close the relay. Anyone able to help me out? I have a Python script that works, but understand that a Python script does not work in Homey (or I figure it must be way easier for someone experience with Homey to point me in the right direction to where I can “fire” the command over TCP (Raw I believe) + port to an IP of my choice).

Help would be appreciated.

DuMees

You’ll need an app, Homey has no ability to create TCP socket connections from flows or scripts.

Thanks Robert, let me start by saying I appreciate what you’re doing for the Homey community. You’ve been a lifesaver more than once for me. Anyway how I can buy you a beer (link to Paypal or something) or show my appreciation?

Do you know a way to create an app to setup the TCP socket? I’m a bit rusty on developing but can built something if I receive a bit of guidance on the basics on Homey script (or whatever it is called).

Not searching for an extensive tutorial as I already built some scripts, but don’t know where to start to be honest.

Thanks

I think the best way to create an app is to follow the “Getting Started” guide: Getting Started | Homey Apps SDK

There’s an SR-201 module available for Node.js that you might be able to use: GitHub - dresende/node-sr201: NodeJS SR-201 Network Relay control