EasyDaq - mbradley612/HHSCStartLine GitHub Wiki

The EasyDAQ relay appears as a serial interface. Linux automatically allocates the device name. This is usually /dev/ttyUSB0 but not always.

In July 2015, we started to experience issues with the EasyDAQ relay disconnecting periodically and then reconnecting. On reconnect, the device name switched from /dev/ttyUSB0 to /dev/ttyUSB1.

The standard approach is to configure a persistent name for an FTDI device based on the FTDI serial number, see this blog entry. Unfortunately, for some reason the EasyDaq relay does not report a serial number. However, as we only have one serial device we create a symbolic link based on the vendor and product. (The alternative would be to use the physical USB port. This is not an attractive option as it is vulnerable to a change in which device is switched into which port). Note that the USB to serial device used on the weather station is not FTDI serial device.

We create the following file /etc/udev/rules.d/99-usb-serial.rules

 SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSB.EasyDAQ" 

This creates a symbolic link /dev/ttyUSB.EasyDAQ.

We then configure the port for the EasyDAQ lights in Startline to be /dev/ttyUSB.EasyDAQ. This is in the file /opt/HHSCStartline/startline.ini

[Lights]
enabled=Y
comPort=/dev/ttyUSB.EasyDAQ

In order to be able to connect to the serial device, the startline user must be in the dialout group.

usermod -a -G startline dialout