Reset of openhab2.service after update

Hi there,
i just wanted to ask if it’s possible to install the newest nightly without always replacing/resetting my openhab2.service. :confused:

I literally sat here for 2 hours, asking myself why my CUL sticks and BT presence detection was blown, just to see that my systemd service was once again set back to defaults. :scream:

I’d really appreciate any tips that could help me out…apart from the obvious “Made an update? Checked your services?”-PostIT. :joy:

Dennis

openhab2.service isn’t set as a configuration file in the packages, so it should always be reset. What do you need keeping?

Basically the user and group to use my CUL sticks and the BT presence detection, since they’re all requiring root privileges.

Most of the time it’s possible to avoid running as root. I’m not sure about Bluetooth but the CUL stick should be accessible ater configuring the described steps here: http://docs.openhab.org/installation/linux.html#recommended-additional-setup-steps

@Benjy still, I guess it wouldn’t hurt to provide the overwrite/keep prompt for this file by setting as a conffile!?

When using this setup I always got the “Can’t open CUL” error. Tried it several times, so far I’m sticking to the PostIt-version.

1 Like

Makes sense, got a PR which will incorparate it soon.

1 Like

Fantastic! Thanks in advance! :slight_smile:

That part about the CUL made me curious. I wasn’t able to get my CUL-stick running on user openhab so far, but since @ThomDietrich said so, I didn’t trust my setup anymore.
I started with a borrowed spare RaspPi 1, installed Openhabian with my setup files and it did work under user openhab. Great!
So I made the move with my RaspPi 2, installed Openhabian with my setup files and it DID NOT work??? What makes it evern worse it doesn’t work under user root either. The CUL-stick is working, checking via send the commands via “screen” which did work!

The log (using log:set DEBUG org.openhab.io.transport) after starting OH2 looks like:

14:55:10.324 [DEBUG] [org.openhab.io.transport.cul        ] - BundleEvent [unknown:512] - org.openhab.io.transport.cul
14:55:10.328 [DEBUG] [org.openhab.io.transport.cul        ] - BundleEvent STARTING - org.openhab.io.transport.cul
14:55:10.348 [DEBUG] [penhab.io.transport.cul.CULActivator] - CUL transport has been started.
14:55:10.424 [DEBUG] [io.transport.cul.internal.CULManager] - Registering class org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl for device type serial
14:55:10.432 [DEBUG] [io.transport.cul.internal.CULManager] - Registering class org.openhab.io.transport.cul.internal.network.CULNetworkHandlerImpl for device type network
14:55:10.444 [DEBUG] [org.openhab.io.transport.cul        ] - BundleEvent STARTED - org.openhab.io.transport.cul
14:55:10.557 [DEBUG] [io.transport.cul.internal.CULManager] - Trying to open device serial:/dev/ttyACM0 in mode SLOW_RF
14:55:10.559 [DEBUG] [io.transport.cul.internal.CULManager] - Searching class for device type serial
14:55:10.680 [DEBUG] [internal.serial.CULSerialHandlerImpl] - Opening serial CUL connection for /dev/ttyACM0
14:55:10.932 [DEBUG] [org.openhab.io.transport.serial     ] - BundleEvent STARTING - org.openhab.io.transport.serial
14:55:10.936 [DEBUG] [org.openhab.io.transport.serial     ] - BundleEvent STARTED - org.openhab.io.transport.serial
14:55:11.198 [ERROR] [io.transport.cul.CULLifecycleManager] - Can't open CUL
org.openhab.io.transport.cul.CULDeviceException: gnu.io.NoSuchPortException
        at org.openhab.io.transport.cul.internal.serial.CULSerialHandlerImpl.openHardware(CULSerialHandlerImpl.java:100)[181:org.openhab.io.transport.cul:1.9.0.201612250211]
        at org.openhab.io.transport.cul.internal.AbstractCULHandler.open(AbstractCULHandler.java:139)[181:org.openhab.io.transport.cul:1.9.0.201612250211]

Hey Jürgen, I did not expect that. I did not expect there to be differences between an openHABian system on a RPi1/2/3.

What exactly do you mean by “my setup files” and did you execute the serial port menu option? Which steps did you select?

Hey, thanks for your involvment during the XMas-days.

“My Setup-Files” All sub-directories under openhab2-Conf and the directory openhab2-userdata-persistence(in order to keep my DBs).
I’m using the Intertechno Binding.

I would have expected that it would work with user “root” again, as before, however it isn’t. I don’t think that the user “root” is any different to the standard Raspbian setup? (I’m just fishing in the dark).

Just shortly between family times :wink: Merry christmas to you :wink:

Also not with root makes me believe it’s related to another issue: Nrjavaserial upgrade causes “Serial Error: Port /dev/ttyACM0 does not exist”

I’ve commented on the related issue: https://github.com/openhab/openhab-core/issues/101#issuecomment-269217655

I did the change on the my system today getting #674, the tests on the RaspPi1 have been made yesterday. Would that make any difference regarding this nrjavaserial change? If yes, the “observed” difference between the RaspPI versions was a false observation!

I saw the change was rolled back, did an update today and it seems to be running now. I need to confirm that when back home since I can’t verify that the CUL stick is sending while being away from home.

1 Like

I’m back home now (“nearly on time” or “Thank you for travelling with Deutsche Bahn”).
Yes, the CUL-stick is working on the rolled back version (build #677). I’ve read all the hassle about the later changed nrjavaserial and will change to that next year:wink:

Thanks everybody for the work in between/during/instead of family times!

1 Like