openhab / openhab-syno-spk

openHAB Synology SPK Install Package
Eclipse Public License 2.0
161 stars 45 forks source link

2.0b3: Can't get OH2 to communicate with the Z-Wave stick #30

Closed neoscaler closed 7 years ago

neoscaler commented 7 years ago

Hi there,

it's probably not a bug, but I don't get the OH2 2.0b3 to communicate with my Z-Wave stick on the Synology DS214play (DSM 6.x).

It worked in all previous version since 1.7 without problems. Now I keep getting "Port /dev/ttyACM0 not found". It works only if I start OH2 from the bash with root.

My port and also /var/lock should be accessible for the openhab2 user:

root@DiskStation:/dev# ll ttyACM0
crwxrwxrwx 1 root dialout 166, 0 Jul  9 10:22 ttyACM0

The openhab2 user is member of the dialout group, also is the permission set to 777 just to be sure. I also checked that the binaries run with the openhab2 user if started via package manager.

As I said, it worked in alle previous versions if I set the permissions/ownerships for the port and /var/lock accordingly, but not with OH2.

Any tips or suggestions what I am doing wrong?

//edit: I tried the current version of Domoticz with OpenZWave, and this worked instantly without any modifications. So it seems it's really an OpenHAB issue only

cniweb commented 7 years ago

@7Bit OK, can we then close this Issue?

neoscaler commented 7 years ago

@cniweb Why? It's an issue since OpenHAB2. I don't know if it's a problem with OpenHAB2 itself or with the Syno-package, but I suppose the latter.

It works with OpenHAB1 and Domoticz without problems.

cniweb commented 7 years ago

The Syno-package installs only openHAB, I think this error should be reported rather in openhab project, not here.

acseven commented 7 years ago

Newbie here - I just wanted to let the OP know what I did to make this run, after a lot of trial and error and search around the web.

start_modules(){
echo ls -l /dev/tty* >> /volume1/Public/tmp/zwavelog.txt
chown -R root.uucp /run/lock
chmod -R g+w /run/lock
chown -R root.uucp /var/lock
chmod -R g+w /var/lock
}
stop_modules(){
echo "do nothing"
}
case "$1" in
start)
start_modules
;;
stop)
stop_modules
;;
*)
echo "usage: $0 { start | stop }" >&2
exit 1
;;
esac
exit 0
cniweb commented 7 years ago

Hi @acseven

I think, this is a permission problem, not an openhab and openhab-docker problem! Can we close this issue?

Chris

acseven commented 7 years ago

Hi @cniweb It's up to you really - this is a recurring issue that requires manual fiddling every time you make a change either to the Synology or the the package. Other domotics spks that communicate through the USB port do not - hence my reasoning that there is something wrong with the implementation. Don't take me wrong, I'm not complaining. I don't understand a fraction of what you guys do with this but from an end-user point of view it's far from being a friendly experience, opposite to what OpenHAB itself seems to be heading. Thanks

cniweb commented 7 years ago

Hi @7Bit,

OK I add a fix to the installer.sh script for the "Serial Error: Port /dev/ttyACM0 does not exist" Z-Wave binding issue.

Chris

cniweb commented 7 years ago

@7Bit can you try it, please!

acseven commented 7 years ago

@cniweb I can test it, but I have no idea how to get the spk of the commit. One initial comment though is that I've seen the z-wave stick to be on /dev/ttyACM1 instead of /dev/ttyACM0, but I can't say in which scenario (most likely in between trials to get this to run).

cniweb commented 7 years ago

Hi @acseven

you found the SPKs here: https://github.com/openhab/openhab-syno-spk/releases

Chris

acseven commented 7 years ago

@cniweb Thanks for the SPK. The issue though is that apparently it hasn't actually installed OpenHAB 2, though it is running in the Package Manager.

The server is not running and there are only 3 .sh script files in the main folder:

/volume1/@appstore/OpenHAB2$ ls start_debug_runtime.sh start_runtime.sh stop_runtime.sh

edit: I guess it's this issue? https://github.com/openhab/openhab-syno-spk/issues/35 edit2: I also tried to find logs, but found none :/

Baumi1245 commented 7 years ago

2.0.0.006-SNAPSHOT-DSM6 is not working, because it is "double packed"

try mine - unzip first: OpenHAB-2.0.0.006a-SNAPSHOT-DSM6-syno-noarch-0.001.zip

acseven commented 7 years ago

@Baumi1245 That file unzipped lists the current revision git files, not a packaged spk.

I did unpack @cniweb 's spk and rename the extracted file to SPK, but it installed basically the same way. I.e. the server doesn't run, and no other files other than the three .sh files are present in the app's folder.

Baumi1245 commented 7 years ago

sorry, don´t understand - there is a spk within my zip-file screenshot 17 @cniweb ´s spk won´t work, because the owner is also "travis" again

acseven commented 7 years ago

Sorry about that, Finder extracted the SPK automatically. Using your SPK there's one difference, the conf folder is now symlinked to my public folder:

/volume1/@appstore/OpenHAB2$ ls -l total 12 lrwxrwxrwx 1 root root 29 Oct 24 17:42 conf -> /volume1/public/OpenHAB2/conf -rwxr-xr-x 1 openhab2 root 1132 Nov 17 2013 start_debug_runtime.sh -rwxr-xr-x 1 openhab2 root 930 Nov 17 2013 start_runtime.sh -rwxr-xr-x 1 openhab2 root 65 Nov 17 2013 stop_runtime.sh

So basically, no server running still... Cheers

Baumi1245 commented 7 years ago

sorry, made some changes - pls download again - i changed the zip. it´s all original now.

acseven commented 7 years ago

I've download the SPK from your link again, it doesn't finish installing. It throws out a "failure to install" generic error at the end of the process...

acseven commented 7 years ago

I've tried it again, and though it did throw out the error, the server was installed. "/start/index" is return not found though:

Problem accessing /start/index. Reason: Not Found

Through DSM's Package Manager there some log entries now: http://pastebin.com/hSKW52jx

Edit - could this be related to the conf folder permissions? OpenHAB2 was running with this folder before:

/volume1/public/OpenHAB2$ sudo ls conf/ @eaDir html items persistence rules scripts services sitemaps things transform

Baumi1245 commented 7 years ago

looks like issue #35 - you have to set the R/W right for the folder public via DSM hope this helps.

acseven commented 7 years ago

@Baumi1245 Yup, that was it. It'd be great if the user part would be included automatically in the install script or at least that the package info made a mention to this (user creation + permissions). Thanks.

But anyway, and back on track with this current issue, with your SPK at least the z-stick is still not being correctly detected. Your SPK does state "2.0.0.005-SNAPSHOT" instead of "2.0.0.006-SNAPSHOT", but that might not have anything to do with the content.

Baumi1245 commented 7 years ago

I am at work now... Take a look at issue #35 you have to set the r/w rights via DSM for the public folder.

Am 24.10.2016 19:19 schrieb "acseven" notifications@github.com:

I've tried it again, and though it did throw out the error, the server was installed. "/start/index" is return not found though:

Problem accessing /start/index. Reason: Not Found

Through DSM's Package Manager there some log entries now: http://pastebin.com/hSKW52jx

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openhab/openhab-syno-spk/issues/30#issuecomment-255805397, or mute the thread https://github.com/notifications/unsubscribe-auth/AEkIqkbpH-Rvb5_dGxKfWsVntGET-qh7ks5q3OidgaJpZM4JIk38 .

acseven commented 7 years ago

I'm putting this aside for now, in search for something that is more stable. Domoticz is working fine with the Z-stick, detecting it instantly at any instance in time (i.e. I can pull it out and plug it in at any time without messing with anything on the backend), and even though it doesn't allow for as much fiddling as OpenHAB2 it just works better on a Synology box. This current implementation on Synology, though laudable, is just not ideal (when it works), by not accessing the usb ports properly and requiring too much configuration for a system that is meant to ideally be very user friendly. Maybe one of these days it will be better :/