Closed sirvs closed 8 years ago
Just a couple things, as I think you are close. Most of your steps to figure this out were in the right direction!
When you add or change groups in Linux or just about any *nix operating system for that matter, it is always best to log out and back in so that the groups get picked up. What likely happened is you set everything up, but your pi user did not know it was a member of the new dialout group, and as such it had no permissions.
Running it as root seems to have worked, so this supports the above. Simply log out and back in and then try to run openhab again as user pi.
One final note, changing the ownership of a file does not mean it runs as that user. It still would run as whatever user has permissions to, and executes the file. There are ways to run as another user of course, but that should not be necessary.
Now, once you are running, there are some things you need to know about the present state of Habmin and zwave. Zwave 1.8 will not work with the current snapshot of Habmin2. Use Habmin1 with 1.x zwave bindings. Zwave 2.0 is not out yet, though it is getting close. I have been working with @cdjackson and other testers to help get it there as time permits. For people just starting out though, I would wait until it is part of the OpenHAB distribution, and then you can add it easily. If you are set on 2.0 stuffs, there is a good thread over at the openHAB forums here: Zwave 2.0 testing
This is also a thread similar to your question: Z-stick on Pi
Hope this helps!
Thank you for such a quick response! As i was troubleshooting, I actually tried a couple of things.
sudo service openhab start
Low and behold, it cannot find the port./start.sh Launching the openHAB runtime...
Invalid Configuration Location Locking is not possible in the directory "/opt/openhab/server/configuration/org.eclipse.osgi". A common reason is that the file system or Runtime Environment does not support file locking for that location. Please choose a different location, or disable file locking passing "-Dosgi.locking=none" as a VM argument. /opt/openhab/server/configuration/org.eclipse.osgi/.manager/.fileTableLock (Permission denied) 1. Decided to run it as `sudo ./start.sh` as pi being the owner. I assume this is actually running the file as root at this point, bypassing the TableLock issue and things run correctly.
So, I guess and as you mentioned, it is not the file owner issue, but how its actually called. Running the service, even with sudo, does not appear to trigger as root, but running "sudo ./start.sh" does run it as root.
Makes a little sense now, guess i need to figure out how services are really running.
I must have made a flub with my searches and posting. I believe I am actually using Habmin1. 1.7 SNAPSHOT to be precise. Though it lists as 1.4.0 in the HABmin web UI under System > Bundles. I guess i should move this over to the other support forums as to why Habmin1 is not seeing the zwave nodes, though i have a feeling its something similar as openhab is calling /services/habmin to start it...though that folder does not seem to exist.
Oh, and I would love to go through and test Habmin2, just need to get Habmin1 up and running first :+1:
Thanks for your help xsnrg I wanted to follow-up on here at least in case it helps anyone else.
My issue ended up coming down to stating the service manually
sudo ./start.sh
vs as a service
sudo service openhab start
I decided to take a look at the actual service script /etc/init.d/openhab
I found this in it
-Dgnu.io.rxtx.SerialPorts=/dev/ttyACM0
Turns out, even though it never listed this port in the logs, it was still trying to use the wrong port, or something. Changing this to my port fixed it.
Now, to figure out why Habmin1 isnt seeing my devices...to the other forum!
This worked for me, gotten from another forum:
**_"I got some feedback from a friend and he suggested that I edit the start-stop-status.sh and add chmod 777 /dev/ttyACM0 and chmod 777 /run/lock/
It worked. I know that 777 is bad juju but I tried that on the command line for the device and it didn't help. Wan it /run/lock? I already had /var/lock set as root.uucp and openhab was added to the group."_**
Good luck
Hello all, I'm a bit stuck on setting up my Aeon Zstick to start my first zwave network. I am completely new at this and linux as a hole, but so far so good. I have OH setup and working with Wemo. I've installed Habmin and added the 1.8 snapshot for the zwave bindings. This all starts fine and I am able to access the webpage.
Trying to get OH to recognize my Zstick, I hit the issue:
To make sure I had the correct port:
ls /dev/tty*
before and after plugging it in and I only see ttyACM0 come and go.I made sure to join my user to the dialout group
Yes, I am running openhab's start.sh as pi:
Checked the ports permissions:
I enabled the debug for zwave, but do not get much more information:
Stopping and starting the services after each change:
sudo service openhab restart
Any idea as to why this would not come up?
As a last ditch effort, I changed ownership of start.sh and start_debug.sh
Manually started start:
sudo ./start.sh
And it appears everything comes up, but I cannot see devices in Habmin. I believe I see nodes in the zwave debugs though...I have 3 switches, I see 4 Nodes. The controller and 2 multi-level switches.
I'm not a fan of having to run openhab as root. Is there anything anyone can see as to why I cannot run as pi? Any further help of seeing the devices in habmin?