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