Each time I booted my Linux Homeseer box, the /dev/ttyUSB# mount points would be different for my USB devices. Doh! There is a big difference between my Vista alarm panel and my Prologic pool panel.
This would mean that I would then need to disable each plugin and then hunt and peck looking for the right mount point using my Vista plugin and then asking for the time on my app.
So this AM I decided to solve using a udev cfg.
from a ssh shell (or local shell) cd /etc/udev/rules.d
There have a look at the rules that already exist. You likely wish to make your rules the highest number.
I created : 92-usb-serial.rules
You need to find the values for your rules from udevadm info -a -n /dev/ttyUSB0 (or where ever your device is currently mounted). You will likely find the values you need in the 4th block of info in the device chain.
And you need to decide on a name. DO use ttyUBS<something> or the Homeseer dropdown will not show it since it looks for ttyS* and ttyUSB*.
my config:
homeseer@hometrollerSEL:/etc/udev/rules.d$ cat 92-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSBAqua"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DJ009FBY", SYMLINK+="ttyUSBVista"
Note that for the Aqua, my Serial to USB adapter had no serial value, so I could not match on it. Means that if I had two of them I would not be able to differentiate.
Moving along, unplugging then and plugging back in resulted in a couple symlinks that Homeseer can now use:
homeseer@hometrollerSEL:/etc/udev/rules.d$ ls -l /dev/ttyUSB*|grep ^l
lrwxrwxrwx 1 root root 7 Sep 26 07:21 /dev/ttyUSBAqua -> ttyUSB0
lrwxrwxrwx 1 root root 7 Sep 26 07:26 /dev/ttyUSBVista -> ttyUSB2
A final note, do not try to specify the actual ttyUSB# to use. That is the domain of the kernel, not udev. udev can only make a symlink, but that is all you need.
Daniel
Current Date/Time: 9/26/2016 7:28:33 AM
HomeSeer Version: HS3 Pro Edition 3.0.0.293
Linux version: Linux hometrollerSEL 3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:56:17 UTC 2014 i686 i686 i686 GNU/Linux System Uptime: 1 Day 13 Hours 38 Minutes 26 Seconds
Number of Devices: 216
Number of Events: 55
Available Threads: 199
Enabled Plug-Ins
3.0.2.0: AquaConnect
3.0.0.27: EasyTrigger
3.0.0.10: Ecobee
3.0.0.103: HSTouch Server
0.0.0.25: Pushover 3P
3.0.0.27: Vista Alarm
3.0.0.53: weatherXML
3.0.1.92: Z-Wave
This would mean that I would then need to disable each plugin and then hunt and peck looking for the right mount point using my Vista plugin and then asking for the time on my app.
So this AM I decided to solve using a udev cfg.
from a ssh shell (or local shell) cd /etc/udev/rules.d
There have a look at the rules that already exist. You likely wish to make your rules the highest number.
I created : 92-usb-serial.rules
You need to find the values for your rules from udevadm info -a -n /dev/ttyUSB0 (or where ever your device is currently mounted). You will likely find the values you need in the 4th block of info in the device chain.
And you need to decide on a name. DO use ttyUBS<something> or the Homeseer dropdown will not show it since it looks for ttyS* and ttyUSB*.
my config:
homeseer@hometrollerSEL:/etc/udev/rules.d$ cat 92-usb-serial.rules
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSBAqua"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", ATTRS{serial}=="DJ009FBY", SYMLINK+="ttyUSBVista"
Note that for the Aqua, my Serial to USB adapter had no serial value, so I could not match on it. Means that if I had two of them I would not be able to differentiate.
Moving along, unplugging then and plugging back in resulted in a couple symlinks that Homeseer can now use:
homeseer@hometrollerSEL:/etc/udev/rules.d$ ls -l /dev/ttyUSB*|grep ^l
lrwxrwxrwx 1 root root 7 Sep 26 07:21 /dev/ttyUSBAqua -> ttyUSB0
lrwxrwxrwx 1 root root 7 Sep 26 07:26 /dev/ttyUSBVista -> ttyUSB2
A final note, do not try to specify the actual ttyUSB# to use. That is the domain of the kernel, not udev. udev can only make a symlink, but that is all you need.
Daniel
Current Date/Time: 9/26/2016 7:28:33 AM
HomeSeer Version: HS3 Pro Edition 3.0.0.293
Linux version: Linux hometrollerSEL 3.16.0-031600-generic #201408031935 SMP Sun Aug 3 23:56:17 UTC 2014 i686 i686 i686 GNU/Linux System Uptime: 1 Day 13 Hours 38 Minutes 26 Seconds
Number of Devices: 216
Number of Events: 55
Available Threads: 199
Enabled Plug-Ins
3.0.2.0: AquaConnect
3.0.0.27: EasyTrigger
3.0.0.10: Ecobee
3.0.0.103: HSTouch Server
0.0.0.25: Pushover 3P
3.0.0.27: Vista Alarm
3.0.0.53: weatherXML
3.0.1.92: Z-Wave
Comment