openhab / openhab-syno-spk

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

openHAB crashes by configuring Z-Wave binding #138

Open bodoweiss opened 5 years ago

bodoweiss commented 5 years ago

I have a Synology DS413j with DSM 6.2-23739-2 Update 2 and Java ejdk-8u181-linux-arm-sflt.tar.gz and openHAB-2.3.0.005-syno-noarch-0.001.spk. When I try to configure the Z-Wave binding in the PaperUI Inbox -> Search for Things -> Z-Wave Binding -> Z-Wave Serial Controller (Z-Wave USB-stick with serial interface the openHAB process crashes and needs to be restarted with DSM package manager. This happens while the Z-Wave Serial Controller is connected to one USB-port of the DiskStation.

Doing the same on a Windows 10 workstation (Z-Wave Serial controller is plugged in to one USB-port of the workstation) works fine and the controller can be used.

If You need diagnosis data, please give advice.

andre2308 commented 5 years ago

Hey, Crashs openHAB After you selected the serialport, and Save the configuration? Have you checked the z-Wave Support on Installation?

If yes, can you Upload a log from openHAB and from the Installation?

bodoweiss commented 5 years ago

Hi,

the crash happens before it is possible to select the serial port.

Z-Wave support has been selected on installation.

The log files are attached. Take a close look at the jvm crash log file hs_err_pid30270.log. It looks like openHAB cannot get the list of serial ports.

Anyway the Synology box has mounted the Z-Wave Serial USB-Controller

> ll /dev/ttyAC*
crw------- 1 root root 166, 0 Oct 19 13:01 /dev/ttyACM0

openHAB_on_Syno_Logs.zip

andre2308 commented 5 years ago

Hey bodoweiss,

Is our issue solved? If yes, can you Tell us what the reason was?

Otherwise you can Check the access rights for openHAB User @ ttyACM0. Normaly the Installation move a startup Script to the rc.d folder, that set the needed rights. I will take a Look at the Logs tomorrow.

Greets

Am 28.10.2018 um 18:49 schrieb bodoweiss notifications@github.com:

Closed #138.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

bodoweiss commented 5 years ago

Hi andre,

the issue isn't solved unfortunately

The small script /usr/local/etc/rc.d/openHAB-zwave.sh has run. This is the result: root@DiskStation:/usr/local/etc/rc.d# ls -la /lib/modules/usbserial.ko -rwxrwxrwx 1 root root 61736 Sep 7 10:46 /lib/modules/usbserial.ko root@DiskStation:/usr/local/etc/rc.d# ls -la /lib/modules/ftdi_sio.ko -rwxrwxrwx 1 root root 99460 Sep 7 10:46 /lib/modules/ftdi_sio.ko root@DiskStation:/usr/local/etc/rc.d# ls -la /lib/modules/cdc-acm.ko -rwxrwxrwx 1 root root 31392 Sep 7 10:46 /lib/modules/cdc-acm.ko root@DiskStation:/usr/local/etc/rc.d# ls -la /dev/ttyACM0 crwxrwxrwx 1 root root 166, 0 Oct 28 17:27 /dev/ttyACM0

So help is still appreciated

andre2308 commented 5 years ago

Hey, so i checked your logs. It looks to me, that the crash is caused by "tmp/libNRJavaSerial_openhab_0/libNRJavaSerial.so". Have you tryed with installed zwave binding an plugged z-wave dongle to stop openHAB, delete the content of the cache an tmp folder, then start openhab?

Witch Serial Controler are you using? Can you update to lastest DSM?

Edit: There is a issue in the openhab-core repo https://github.com/openhab/openhab-core/issues/111 It is a glibc required greater than 2.13 you can check with "lib/libc.so.6" in putty.

bodoweiss commented 5 years ago

Hi Andre,

my DSM is the latest DSM 6.2.1-23824 Update 1

My serial controller is Z-Wave USB Stick (ZMEEUZB1). It works fine connected to a Win10 PC and with openHAB running on it. It looks to be online:

stty -F /dev/ttyACM0

speed 9600 baud; line = 0; -brkint -imaxbel

udevadm info --a -p $(udevadm info -q path -n /dev/ttyACM0)

Udevadm info starts with the device specified by the devpath and then walks up the chain of parent devices. It prints for every device found, all possible attributes in the udev rules key format. A rule to match, can be composed by the attributes of the device and the attributes from one single parent device.

looking at device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0/tty/ttyACM0': KERNEL=="ttyACM0" SUBSYSTEM=="tty" DRIVER==""

looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2/1-1.2:1.0': KERNELS=="1-1.2:1.0" SUBSYSTEMS=="usb" DRIVERS=="cdc_acm" ATTRS{bInterfaceNumber}=="00" ATTRS{bAlternateSetting}==" 0" ATTRS{bNumEndpoints}=="01" ATTRS{bInterfaceClass}=="02" ATTRS{bInterfaceSubClass}=="02" ATTRS{bInterfaceProtocol}=="01" ATTRS{supports_autosuspend}=="0" ATTRS{bmCapabilities}=="0"

looking at parent device '/devices/platform/orion-ehci.0/usb1/1-1/1-1.2': (a lot more to come)

My GLIBC is 2.15:

ll /lib/libc.*

lrwxrwxrwx 1 root root 12 Oct 19 12:51 /lib/libc.so.6 -> libc-2.15.so

I erased rm -rf /var/services/homes/openhab/userdata/tmp rm -rf /var/services/homes/openhab/userdata/cache but it hasn't solved the problem.

Then I tried https://github.com/openhab/openhab-core/files/703484/nrjavaserial-3.12.0-OH.zip and I installed it instead to nrjavaserial without an effect.

So I currently ran out of ideas to solve it.

andre2308 commented 5 years ago

Hey, I have run stty -F /dev/ttyACM0 with this Output:

speed 115200 baud; line = 0; min = 1; time = 2; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke

My System is a ds216play with the same Z-Wave Stick as you.

My last idea is to Install this serial Driver Package http://www.jadahl.com/drivers/ You have do pick the right Package for your CPU. This sheet helps to figure out what you have https://www.synology.com/de-de/knowledgebase/DSM/tutorial/General/What_kind_of_CPU_does_my_NAS_have

Make a reboot with the Stick on the usbport. When you unplug the Stick an Plug it in, the DS will reset the Access rights to default.