Trying to use RXTRX433 via LAN (Ser2net & Socat)

Forum about Rfxcom home automation Domotica devices.

Moderator: b_weijenberg

Post Reply
pwhooftman
Starting Member
Starting Member
Posts: 31
Joined: Thu Nov 14, 2013 12:15 pm

Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by pwhooftman »

Hi,

I'm trying to use the RFXTRX433 via LAN. It's hooked up to a TPLINK-WR703N nano router at ip address 10.0.0.144 running Openwrt. Ser2net is installed and the commands used at startup of the router are;

echo "1001:raw:15:/dev/ttyUSB0:4800,NONE,1STOPBIT,8DATABITS" > /etc/ser2net.conf
ser2net

At my Synology running Domoticz i use the command

socat pty,link=/dev/usb/ttyUSB9,waitslave tcp:10.0.0.144:1001

after starting socat, i can add hardware Rfxtrx433 at port USB9, but there seems no connnection. The log in Domoticz keeps repeating every 30 seconds;

RFXCOM connected to: 10.0.0.144:1001
Error: Sun Jan 12 23:30:36 2014 TCP/IP connection closed!

both log entries appear almost simultanously.

Is it possible what i'm trying to achieve, running RFXTRX433 through LAN?

PS. i have tried adding a RFXCOM- RFXLAN hardware in Domoticz, pointing to the routers address but that doesn't seem to work also
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by raymonvdm »

I have tried this using ser2net but with a Z-Wave stick and ethernet z-wave support on HomeSeer

http://www.domoticaforum.eu/viewtopic.php?f=7&t=9148

I also found this one

http://www.domoticaforum.eu/viewtopic.p ... 285#p67560
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
Posts: 1744
Joined: Sun May 14, 2006 4:32 pm
Location: Netherlands

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by b_weijenberg »

RFXLAN is not supported by Domoticz.
Is it possible to connect RFXmngr to the RFXtrx433 IP port?
pwhooftman
Starting Member
Starting Member
Posts: 31
Joined: Thu Nov 14, 2013 12:15 pm

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by pwhooftman »

b_weijenberg wrote:RFXLAN is not supported by Domoticz.
Is it possible to connect RFXmngr to the RFXtrx433 IP port?
Good hint, will try tonight.
pwhooftman
Starting Member
Starting Member
Posts: 31
Joined: Thu Nov 14, 2013 12:15 pm

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by pwhooftman »

Not really succesfull yet. Tried installing the drivers kmod-usb-serial & kmod-usb-serial-ftdi on the router and starting ser2net. Most i got was:

Reset receiver/transceiver:0D 00 00 1C 00 00 00 00 00 00 00 00 00 00
================================================
Get Status:0D 00 00 1D 02 00 00 00 00 00 00 00 00 00
================================================
Get Status:0D 00 00 1E 02 00 00 00 00 00 00 00 00 00
------------------------------------------------
------------------------------------------------
------------------------------------------------
------------------------------------------------
1CE00000E0FCE0E00E8000001C1CE01C Buffer flushed due to timeout

Is that a snippet of communication starting?
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
Posts: 1744
Joined: Sun May 14, 2006 4:32 pm
Location: Netherlands

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by b_weijenberg »

This is a working procedure I have received from a user:

I plugged my USB RFXCOM onto a Linux box (Raspberry PI, sheeva, eeebox, whatever plug…) then typed:
socat tcp-listen:10001,fork,reuseaddr file:/dev/rfxcom,raw &

This means that all streams coming from /dev/rfxcom is redirected to TCP port 10001. Where /dev/rfxcom is linked to /dev/ttyUSB2 (my RFXCOM)
sincze
Starting Member
Starting Member
Posts: 47
Joined: Sat Jun 14, 2014 7:18 pm
Location: Breda

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by sincze »

b_weijenberg wrote:This is a working procedure I have received from a user:

I plugged my USB RFXCOM onto a Linux box (Raspberry PI, sheeva, eeebox, whatever plug…) then typed:
socat tcp-listen:10001,fork,reuseaddr file:/dev/rfxcom,raw &

This means that all streams coming from /dev/rfxcom is redirected to TCP port 10001. Where /dev/rfxcom is linked to /dev/ttyUSB2 (my RFXCOM)
:) small addition to this great post:

Please find detailed description on what to do on client / and 'rfx' server here:
http://domotiga.nl/boards/1/topics/3583

It is completely working solution (TP Link is controlling the RFXCom from a central location in the house) and the post contains information provided by other users of several forums.

Good luck.
raymonvdm
Senior Member
Senior Member
Posts: 1153
Joined: Sun Dec 18, 2011 1:23 am

Re: Trying to use RXTRX433 via LAN (Ser2net & Socat)

Post by raymonvdm »

I didn`t get a stable setup using socat (process was started multiple times) so for now i installed ser2net

Code: Select all


apt-get install ser2net

vim /etc/ser2net.conf

#BANNER:banner:\r\nser2net port \p device \d [\s] (Debian GNU/Linux)\r\n\r\n

#2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
#2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
#3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
#3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
10001:raw:15:/dev/ttyUSB0:38400,NONE,1STOPBIT,8DATABITS


However i`m not there yet because i recieve the following error

Code: Select all

2016-04-26 15:34:17.286 RFXCOM: Connection reset!
2016-04-26 15:34:17.286 TCP: Reconnecting in 30 seconds...
Aha just found out that the timeout was set to 15 seconds

Code: Select all

10001:raw:0:/dev/ttyUSB0:38400,NONE,1STOPBIT,8DATABITS
Running HS3PRO on PC with Z-Wave / OpenTherm / Plugwise / RFXcom / MQTT / XAP400 / Logitech Media Server and Squeezelite on PI`s
Post Reply

Return to “Rfxcom Receivers & Transmitters Forum”