more G-Labs products

Author Topic: Z-wave losing port configuration  (Read 2030 times)

July 10, 2015, 11:20:16 AM
Read 2030 times

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Every now and again the Zwave interface options -> Device port is empty and all my Zwave devices stop reacting to HomeGenie commands.

After setting it to /dev/ttbUSB1 in the selection box, it works again. Sometimes it takes a few days, usually a few weeks and then the setting disappears again.

Is there a way to hard code this somehwhere so that the setting doesn't disappear?

I'm using an RFXCom in /dev/ttbUSB0 if that makes any difference.

July 12, 2015, 11:02:33 AM
Reply #1

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
I've just done a complete uninstall/reinstall, which fixed my statistics problem, hopefully it will also fix this as well.

July 21, 2015, 08:40:10 AM
Reply #2

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Unfortunately, it happened again yesterday. Device port was empty again.

Problem is I never know exactly when it loses the configuration. I only notice it when I try to turn on the lights in the evening. Does anyone have an idea where I need to look (in the logs, or something else?)

July 21, 2015, 02:38:21 PM
Reply #3

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
I've seen a similar problem before. The serial port was getting disconnected due to a power supply issue when using many devices attached to an USB hub.
I solved the issue by using an USB hub with external power supply.


July 21, 2015, 02:58:31 PM
Reply #4

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
Thanks Gene,  I've got a powered USB hub somewhere,  I'll give that a try.

August 07, 2015, 07:40:03 PM
Reply #5

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
I attached a powered USB hub, but the problem still exists.

I found the following article; "Howto: persistent device names on Raspberry Pi"

http://rolfblijleven.blogspot.nl/2015/02/howto-persistent-device-names-on.html

This works well for my Smart Meter and RFXCom connections, but I don;t know how to add the unique name to the list of Device ports in the Z-wave configuration.

Example, instead of using /dev/ttyUSB0 for the RFXCom I have mapped it to /dev/rfxcom  which works well. Is it possible to add /dev/zwave to the drop down list of the Zwave configuration somehow?

August 11, 2015, 01:54:43 PM
Reply #6

mvdarend

  • *****
  • Information
  • Hero Member
  • Posts: 431
I fount the answer here:
http://www.homegenie.it/forum/index.php?topic=408.msg2469#msg2469

Changed the zwave settings in systemconfig.xml to the following and it works :)

Code: [Select]
      <Interface Domain="HomeAutomation.ZWave" IsEnabled="true">
        <Options>
          <Option Name="Port" Value="/dev/zwave" />
        </Options>
      </Interface>

It looks a bit weird in Zwave interface options as the Device Port setting is 'empty' but it works fine.

Edit: Some extra info for others if they run into a similar problem.

If I have understood correctly the USB enumeration is dependant on the order that devices are 'found' on a reboot / reconnection etc. This means that sometimes your zwave dongle could be on USB0 and on the next reboot on USB1 (assuming you have more than one USB device)

By giving the devices persistent names (see previous post) you can call them by theit 'name' which is mapped to the device. So instead of /dev/ttyUSB0 you can use for example /dev/zwave/
« Last Edit: August 11, 2015, 02:08:55 PM by mvdarend »