# \[SOLVED\] Another usb-port config problem with z-stick Habian snapshot 2.5

**URL:** <https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900>\
**Category:** Installation\
**Tags:** zwave1, usb\
**Created:** [May 21, 2019, 6:45pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900 "2019-05-21T18:45:44Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 21, 2019, 6:45pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/1 "2019-05-21T18:45:44Z")

</div>

Hi there,  
I did something stupid and I hope you guys can help me out. I have just too little time at this moment but I got my new toy in and wanted to give it a try, but now my zwave-network is off line.  
So what I have is Debian Stretch on a laptop, and Habian.  
I have two usb-devices: DutchSmartEnergyMeter, and z-wave.  
Some time ago, for some reason I updated to snapshot 2.5openHAB 2.5.0 (now on Build #1596)  
Yesterday evening I got my new device: NeoCoolcam door sensor.  
I tried including but it wouldn’t include.  
After some reading I found there are people having problems including with the new 2.5 snapshot, stating they have to reboot to get the content of the inbox seen. So I tried to reboot. From that moment my z-stick is configured on the wrong port (/dev/ttyUSB0) while it should be on /dev/ttyACM0 .  
I cannot change the setting in PaperUI, it is stuck on USB0.  
I remember having this issue before, but I thing some update of Habian solved it for me.  
I tried reverting back to the stable 2.4 but when I ask openhabian-config to do that, it stops with an error:

> ```
> E: Packages were downgraded and -y was used without --allow-downgrades.
> FAILED (apt)
> 
> ```

I tryed edditing the file /etc/default/openhab2 and edding the usb-ports that I use. But now when I reboot I see this error:

> ```
> -bash: /etc/default/openhab2: line 35: unexpected EOF while looking for matching `"'
> -bash: /etc/default/openhab2: line 64: syntax error: unexpected end of file
> 
> ```

When I remove what I think I added, I keep getting the same error!  
And I tried adding user ‘habian’ to dialout and tty, but it is already in those goups.

I also tried adding this package:

> sudo apt-get install liblockdev

But I get this error:

> E: Unable to locate package liblockdev

Conclusion: I am making things worse trying to solve this on my own, and I am in big trouble with the WAF. She is having a shower in the dark now…

I hope you can help me!

---

<div class="post-metadata">

**Author:** ![5iver](https://community.openhab.org/user_avatar/community.openhab.org/5iver/32/21201_2.png) [@5iver](https://community.openhab.org/u/5iver)\
**Post date:** [May 21, 2019, 8:06pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/2 "2019-05-21T20:06:11Z")

</div>

Using the snapshots and multiple bindings using serial ports (zwave and zigbee), I found I needed to add my serial ports to EXTRA\_JAVA\_OPTS in order for them to display in the dropdown, even though they have standard naming. Before I did this, the first binding’s serial port would be the only one in the list. More detail…

> <https://github.com/openhab/openhab-core/issues/805>
>
> Currently running S1585, but this may go back to 2.4. I have only observed this …using the zigbee and zwave bindings, but there have been reports in the forum where this occurs for other bindings. \[Here's one for jeelink and zwave\](https://community.openhab.org/t/snapshot-version-of-zwave-cannot-find-serial-port-after-oh-restart/73638/25?u=5iver). 
> 
> \*\*To reproduce\*\*
> 1) install the zwave and zigbee bindings with controllers for each, but don't configure yet
> 2) observe that the serial port dropdown for both bindings contain all ports
> 3) configure a port for zwave
> 4) observe that the serial prort dropdown for the zwave and zigbee bindings now only contain the port that had been selected for the zwave binding
> 5) after an OH restart, observe all ports are in the dropdown again for both bindings
> 6) configure a port for zigbee
> 7) observe the serial port dropdown for both bindings now only contain the port selected for zigbee
> 
> Possibly related, I also observe the zigbee binding losing it's serial port connection about once a day. The zigbee binding uses \[gnu.io.SerialPort\](https://github.com/openhab/org.openhab.binding.zigbee/blob/master/org.openhab.binding.zigbee/src/main/java/org/openhab/binding/zigbee/handler/ZigBeeSerialPort.java#L28) and zwave uses \[org.eclipse.smarthome.io.transport.serial.SerialPort\](https://github.com/openhab/org.openhab.binding.zwave/blob/master/src/main/java/org/openhab/binding/zwave/handler/ZWaveSerialHandler.java#L22). So, possibly a conflict in using the different transports?
> 
> More details can be found here (see issue 2)... https://github.com/openhab/org.openhab.binding.zwave/issues/1165. 
> 
> Note: After manually installing the bindings, the dropdowns have disappeared completely and allow free-text entries for the port. When doing the manual install, I only installed the openhab-core-io-transport-serial and openhab-core-config-discovery-usbserial features to resolve serial dependencies. However, zigbee still looses connection to its port at least once a day.

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 21, 2019, 8:18pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/3 "2019-05-21T20:18:13Z")

</div>

Thanks for your reply 5iver.  
I currently have this in my file: /etc/default/openhab2:

> EXTRA\_JAVA\_OPTS=“-Xms250m -Xmx350m”

I tried this, but I’m not sure it is the right way:

> EXTRA\_JAVA\_OPTS=“-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyACM0”

It didn’t work, but is it wrong or is my problem something else?

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 21, 2019, 8:30pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/4 "2019-05-21T20:30:48Z")

</div>

I now tried this:

> EXTRA\_JAVA\_OPTS=“-Xms250m -Xmx350m -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyACM0”

so leaving out the part: -Xms250m -Xmx350m which was there orriginally.  
The error about /etc/default/openhab2 is gone. And I finally can set the usb-port! Nice.  
But unfortunately the rest of my z-wave devices do not come on-line anymore.

UPDATE: I was too fast, I have now all new things in my Inbox, while the old versions are still there. I will delete them and see what is going to happen. (and report back)

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 21, 2019, 8:59pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/5 "2019-05-21T20:59:32Z")

</div>

All my nodes came back on line but with a different name!  
I remembered this happened to me before and someone suggested deleting the z-stick, and getting it from the inbox again but renaiming. This I did and all is working again!  
Thank you very much!

One question remains: do I not need the ‘-Xms250m -Xmx350m’ that was in my EXTRA\_JAVA\_OPTS before?

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 23, 2019, 8:28pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/6 "2019-05-23T20:28:09Z")

</div>

Dear all,  
My main problem as described above is solved. But the zwave-device-nodes that were there with the wrong names, are still there. I tried deleting them but this does not happen. Then I disabled them and now my zwave network is reacting a lot quicker. But I really would like these phantom-nodes to disappear.  
I tried clearing cache with:

> sudo /bin/systemctl stop openhab2.service  
> sudo openhab-cli clean-cache  
> sudo /bin/systemctl start openhab2.service  
> But they are still there.  
> Also I managed to downgrade to OH2.4.0.1 again. But the nodes can still not e deleted.  
> What can I do to remove these non-existing z-wave nodes?

---

<div class="post-metadata">

**Author:** ![5iver](https://community.openhab.org/user_avatar/community.openhab.org/5iver/32/21201_2.png) [@5iver](https://community.openhab.org/u/5iver)\
**Post date:** [May 23, 2019, 9:21pm UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/7 "2019-05-23T21:21:16Z")

</div>

> [@Guido\_van\_Haasteren](#):
>
> But the zwave-device-nodes that were there with the wrong names, are still there.

Could you post a screen shot. I’m not sure what you mean by the wrong names. It sounds like you added another controller with a different ThingID than before, so new Things were created or your devices. What error do you get in the log when you try to delete them?

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 25, 2019, 7:06am UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/8 "2019-05-25T07:06:34Z")

</div>

Yes, I did delete my Z-stick because for some reason the name changed and I had to change the name of all my Things. So I deleted the Z-stick, re-entered it while changing the name.

 ![Screenshot_20190525-074925_Chrome](https://community-openhab-org.s3.dualstack.eu-central-1.amazonaws.com/original/3X/7/c/7cea5a1177235416ed74296385e7272ae79d51ea.jpeg)

When I again try to remove node 32, paperUI gives me a warring:

> The thing is currently in the reviving state and the binding had not yet confirmed that the device had been removed successfully.  
> If you now click on remove, it will be removed without further communication to the binding.

But this never happens.  
There is no error in my log.  
**Omg, it DOES remove the thing now!**

I don’t understand why it didn’t before, but it’s working now. Thanks for making me try one more time!

---

<div class="post-metadata">

**Author:** ![Guido\_van\_Haasteren](https://community.openhab.org/user_avatar/community.openhab.org/guido_van_haasteren/32/38017_2.png) [@Guido\_van\_Haasteren](https://community.openhab.org/u/Guido_van_Haasteren)\
**Post date:** [May 25, 2019, 7:11am UTC](https://community.openhab.org/t/solved-another-usb-port-config-problem-with-z-stick-habian-snapshot-2-5/74900/9 "2019-05-25T07:11:22Z")

</div>

About the Java-settings: I just tried this and it seems to work.

> EXTRA\_JAVA\_OPTS=“-Xms500m -Xmx1G -Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyACM0”

I have no idea why I had so much trouble the other day, and now all seems to go fine. Thank you for being so patient with me @5iver!
