Warning: file_put_contents(/home/clients/81b51a55b78a35c5c4c50dd82cac1015/diyprojects/wp-content/uploads/wpo/images/wpo_logo_small.png.webp): failed to open stream: Disk quota exceeded in /home/clients/81b51a55b78a35c5c4c50dd82cac1015/diyprojects/wp-content/plugins/wp-optimize/vendor/rosell-dk/webp-convert/src/Convert/Converters/Gd.php on line 428
ser2net: Serial USB Gateway to Ethernet. Test on RFLink with Domoticz
DIY Projects

ser2net: Serial USB Gateway to Ethernet. Test on RFLink with Domoticz

ser2net gateway rflink domoticz

It is possible to move the bridge RFLink (read this previous article about how to make a Gateway) on another computer or Raspberry Pi by improve the reception of your devices for example. For this we will use ser2net, an Open Source project (official project page) that allows to publish on the Ethernet of the recovered data on the serial port.

Installation from the source

Is the shortest path, but I prefer to give the procedure in the case or your distribution does not support the apt–get command (under some configurations Docker).

We begin by downloading the latest version available on Sourceforge.

 wget https://sourceforge.net/projects/ser2net/files/ser2net/ser2net-3.0.tar.gz

Decompress the archive

tar xvfz ser2net-3.0.tar.gz

Then go to the folder

cd ser2net-3.0/

Now we launch the compilation and installation

./configure && make && sudo make install

We create a configuration file

 sudo nano /etc/ser2net.conf

Installation using apt-get

It is much easier to install ser2net help the command apt-get.

 sudo apt-get ser2net

in addition to install all resources, ser2net service is added to the list of services that are automatically started with the system. [

To know the status of the service, run

 sudo /etc/init.d/ser2net status

Configure ser2net for RFLink

Open the configuration file

 sudo nano /etc/ser2net.conf

Get the serial port on your gateway RFLink is plugged (more details in this previous article). Plug the gateway and run sudo dmesg -s 1024. This command allows to recover the system log. At the end of the log is located (the gateway RFLink) USB device just connect. In my case, it is connected to /deb/ttyACM0.

Go down the configuration file and comment out the last lines on telnet and add it.

 6000:raw:600: /dev/8DATABITS NONE 1STOPBIT ttyACM0:57600

The baud rate of the RFLink East of 57600 baud. The data will be returned to port 6000.

Save the configuration (Ctrtl + X then Y) file and then restart the service like this

 sudo /etc/init.d/ser2net restart

Configure serial gateway 1.x or 2.x

For Gateway USB MySensors, the configuration is similar. The method works regardless of the version of the MySensors library. Find the USB port that is connected to the gateway and changed the line below depending on your configuration:

This gives for example

6001:raw:600:/dev/ttyUSB0:115200 8DATABITS NONE 1STOPBIT banner

Restart ser2net to take into account the configuration.

Install a RFLink network Gateway under Domoticz

We now have a RFLink network Gateway very easy to install under Domoticz (or any other software automation also).

Attention . If you already have a USB gateway you want to transform Gateway network, change the configuration rather than create a new one so as not to lose your devices, events…

Go to settings then hardware then

Go to the Log and trigger a device radio (presence detector, detector test of smoke…)

That is, you now have a Gateway network at a lower cost (no need to add an Ethernet shield). You can deport the gateway on another post to improve reception for example. This method is not limited to RFLink, we can actually publish it on any data received on the serial port. We can for example use it to transform a serial (USB) MySensors gateway to a network (LAN) gateway.

Click to rate this post!
[Total: 0 Average: 0]
Exit mobile version