[SOLVED] Zwave controller fails to initialize when executed within eclipse

Hello,

I want to debug the latest zwave code so I added the latest zwave binding source onto the eclipse IDE (see the steps below). But I’m getting an error (in PaperUI and in the log file)

Status: OFFLINE - COMMUNICATION_ERROR zwave.thingstate.serial_notfound

The controller exists and when oh2 is installed without eclipse (i.e. from package, and not from source), it communicates well

ll /dev/ttyACM*
crw-rw---- 1 root dialout 166, 0 Jan 27 22:36 /dev/ttyACM0

What could be the reason to getting this error withing eclipse?
Thanks


Steps to add latest zwave binding source

Step1
Followed the instructions in: http://docs.openhab.org/developers/development/ide.html
and installed eclipse with minimal oh2 configuration (I selected only "openHAB Development", "ESH + OH2 Core Bundles" but no addons)

Step2
Added addons - zwave binding

  mkdir -p /home/avner/openhab2-master/git/openhab2-addonAvner
  pushd /home/avner/openhab2-master/git/openhab2-addonAvner
  git clone https://github.com/openhab/org.openhab.binding.zwave.git
  
  cat ~/openhab2-master/git/openhab2-addonAvner/org.openhab.binding.zwave/pom.xml
          <version>2.0.0-SNAPSHOT</version>

pushd /home/avner/openhab2-master/git/openhab2-addonAvner/org.openhab.binding.zwave/
git log
commit 26f30ed6f714d3f2ccfa4dfbceb524a947fcae96
Author: Chris Jackson <chris@cd-jackson.com>
Date:   Thu Jan 26 23:02:52 2017 +0000

    Database update (#326)
    
    Signed-off-by: Chris Jackson <chris@cd-jackson.com>
...


Step3
Added the binding to eclipse, and openhab

Step4
Build the zwave binding - make sure it has no errors

Step5
# Activate the addition of zwave for openhab.target
In "Package Explorer"
Select Infrastructure -> launch -> openhab.target -> right-click Debug -> Debug Configurations -> (tab) Plug-ins
Eclipse Application -> openHAB_Runtime
filter "zwave" (should be under "Target Platform") -> select org.openhab.ui.zwave -> Debug

Step6
Run openhab in debug mode (via F11)

The solution here was to change permission for everyone to read/write from /dev/ttyACM0 (i.e from 660 to 666)

sudo chmod 666 /dev/ttyACM0
ll /dev/ttyACM*
crw-rw-rw- 1 root dialout 166, 0 Jan 28 23:37 /dev/ttyACM0

p.s.
I first tried to add user openhab to group dialout (or to group tty) but this didn’t help.
Maybe the user from eclipse is no openhab?

sudo usermod -a -G tty openhab
sudo usermod -a -G dialout openhab