more G-Labs products

Author Topic: ttyUSB Persistence  (Read 1186 times)

June 13, 2015, 05:57:52 PM
Read 1186 times

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
Have x10 and zwave devices - both use a ttyUSB device, but not consistent upon reboot.  So I placed rules in my /etc/udev/rules.d/99-input.rules file to symlink these devices to "x10" and "zwave".  Both devices show in the /dev directory, but are not available in the settings / device port drop down menu.  Tried editing the systemconfig.xml file, but this file gets overwritten when you restart.  Saw another post similar, but no answers or solution.

Any suggestions?

June 15, 2015, 03:02:27 PM
Reply #1

byteman

  • *
  • Information
  • Newbie
  • Posts: 19
OK, I solved this problem - at least this worked for me.  As stated, with more than one ttyUSB device, there is no way to accurately predict which device will be assigned to ttyUSB0, ttyUSB1, etc.  So I edited my  /etc/udev/rules.d/99-input.rules file and added the following:'

Code: [Select]
SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="zwave"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0557", ATTRS{idProduct}=="2008", SYMLINK+="x10"
...then I stopped HG:
Code: [Select]
sudo /etc/init.d/homegenie stop
...your vendor and product codes will be different - google the 99-input.rules file for how to figure out these values.  Then I edited my /usr/local/bin/homegenie/systemconfig.xml file as follows:
Code: [Select]
      <Interface Domain="HomeAutomation.X10" IsEnabled="false">
        <Options>
          <Option Name="Port" Value="/dev/x10" />
          <Option Name="HouseCodes" Value="C" />
        </Options>
      </Interface>
      <Interface Domain="HomeAutomation.ZWave" IsEnabled="false">
        <Options>
          <Option Name="Port" Value="/dev/zwave" />
        </Options>
      </Interface>

...and restarted HG:
Code: [Select]
sudo /etc/init.d/homegenie start
This seems to work through restarts and reboots.  The port does not show in the dropdown on the settings screen, but it seems to persist.  Hope this helps someone.

October 02, 2015, 06:36:11 AM
Reply #2

jshan

  • ***
  • Information
  • Full Member
  • Posts: 71
This was helpful - thank you.  This other post http://www.homegenie.it/forum/index.php?topic=979.msg6190#msg6190 pointed to a blog with additional useful info.