From Domoticz
Jump to: navigation, search

This guide is not finished


With 'ser2net' you can share serial devices under unix over TCP/IP


sudo apt-get install ser2net

a configuration file is created in /etc/ser2net.conf

an example line to share an opentherm gateway can be:

2000:raw:400:/dev/ttyUSB0:9600 8DATABITS NONE 1STOPBIT

an example line to share an zwave usb stick:

2000:telnet:600:/dev/ttyUSB22:115200 8DATABITS NONE 1STOPBIT

In both cases the serial port is shared on port: 2000


It is possible to create a virtual comport that can connect to a ser2net share.

VSP application:


To create a virtual comport, use the program socat

sudo apt-get install socat

example to create a USB device that connects to a share on host on port 2000:

sudo socat pty,link=/dev/ttyUSB30,raw,echo=0 tcp:

this creates a /dev/ttyUSB30 serial device link

Auto start socat on boottime

git clone

sudo cp socat-init/socat /etc/init.d/
sudo chmod +x /etc/init.d/socat
sudo update-rc.d socat defaults

sudo cp socat-init/defaults/socat.conf /etc/default/

Now edit the configuration file like:

sudo vi /etc/default/socat.conf

OPTIONS="pty,link=/dev/ttyUSB30,raw,ignoreeof,echo=0 tcp:"

start the service with:

sudo service socat start

you can check the status with:

sudo service socat status