HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: mvdarend on July 10, 2015, 11:20:16 AM

Title: Z-wave losing port configuration
Post by: mvdarend on July 10, 2015, 11:20:16 AM
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.
Title: Re: Z-wave losing port configuration
Post by: mvdarend on July 12, 2015, 11:02:33 AM
I've just done a complete uninstall/reinstall, which fixed my statistics problem (http://www.homegenie.it/forum/index.php?topic=943.0), hopefully it will also fix this as well.
Title: Re: Z-wave losing port configuration
Post by: mvdarend on July 21, 2015, 08:40:10 AM
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?)
Title: Re: Z-wave losing port configuration
Post by: Gene on July 21, 2015, 02:38:21 PM
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.

Title: Re: Z-wave losing port configuration
Post by: mvdarend on July 21, 2015, 02:58:31 PM
Thanks Gene,  I've got a powered USB hub somewhere,  I'll give that a try.
Title: Re: Z-wave losing port configuration
Post by: mvdarend on August 07, 2015, 07:40:03 PM
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 (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?
Title: Re: Z-wave losing port configuration
Post by: mvdarend on August 11, 2015, 01:54:43 PM
I fount the answer here:
http://www.homegenie.it/forum/index.php?topic=408.msg2469#msg2469 (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/