Need some help, what am I doing wrong?

  • Platform information:
    HP Deskpro 600 mini

    • Hardware:
      Intel I 5
    • OS:
      Windows 10 64 bit
    • Java Runtime Environment:
      Zulu-8
    • openHAB version:
      25.0 Snapshot build#1744
      **Issue of the topic:
      I am having config issues when trying to install OH as a service on my windows 10. I think that I have followed the written instructions to the best of my knowledge. I am sure I properly edits the wrapper config file.
  • Please post configurations (if applicable):
    C:\WINDOWS\system32>C:\openHAB\userdata\bin\openHAB2-service.bat install
    wrapper | Unable to set working directory to: %OPENHAB_HOME%\userdata (The system cannot find the path specified. (0x3))

    • Items configuration related to the issue
      #*******************************************************

openHAB2-wrapper.conf for Windows Service Installation

#*******************************************************

openHAB installation dir (Adapt this first setting to your system)

set.default.JAVA_HOME=C:\Program Files\Zulu\zulu-8

Wrapper Properties

set.default.OPENHAB_CONF=%OPENHAB_HOME%\conf
set.default.OPENHAB_RUNTIME=%OPENHAB_HOME%\runtime
set.default.OPENHAB_USERDATA=%OPENHAB_HOME%\userdata
set.default.OPENHAB_LOGDIR=%OPENHAB_USERDATA%\logs
set.default.KARAF_HOME=%OPENHAB_RUNTIME%
set.default.KARAF_BASE=%OPENHAB_USERDATA%
set.default.KARAF_DATA=%OPENHAB_USERDATA%
set.default.KARAF_ETC=%OPENHAB_USERDATA%\etc
set.default.PATH=%PATH%;%KARAF_BASE%\lib;%KARAF_HOME%\l

  • Sitemap configuration related to the issue
  • Rules code related to the issue
  • Services configuration related to the issue
  • If logs where generated please post these here using code fences:

A typo? It probably should be

%OPENHAB_HOME\%userdata

Windows uses backslashes as directory delimiters and the slash was in the wrong place.

Which written directions? There areofficial documentation, community threads here, and random videos.

These instructions are from the official documentation page. The only thing I added was when i downgraded HA to 0.100.3

Not saying that it could not be a typo, just that I copied the whole config file from the official guide nd only changed the first line as instructed.

1 Like

Actually I was wrong in my guess. One of the first lines copied is

# openHAB installation dir (Adapt this first setting to your system)
set.default.OPENHAB_HOME=C:\openHAB2

Does the C:\openHAB2 exist?

1 Like

My location is called openHAB only. I thought I need replace that first line with this"set.default.JAVA_HOME=C:\Program Files\Zulu\zulu-8"?

Did you change the set.default line in tour configuration file to point to that folder?

No, according to the documentation that is set as a system variable, not in the configuration file.

Hey Bruce , thanks for the reply. so I am fully lost.

Is this the first line line in the config file:

openHAB installation dir (Adapt this first setting to your system)

set.default.OPENHAB_HOME=C:\openHAB2

I have changed this file to say
set.default.JAVA_HOME=C:\openHAB2
Then changed it back to say OPENHAB-HOME=C:\OpenHAB2

this is my actual address when my install currently resides: C:\OpenHAB2

but this is the outcome that I am getting as my output

Microsoft Windows [Version 10.0.18362.418]
© 2019 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>C:\OpenHAB2\userdata\bin\openHAB2-service.bat install

C:\WINDOWS\system32>C:\OpenHAB2\userdata\bin\openHAB2-service.bat install

C:\WINDOWS\system32>C:\OpenHAB2
‘C:\OpenHAB2’ is not recognized as an internal or external command,
operable program or batch file.

C:\WINDOWS\system32>C:\OpenHAB2
‘C:\OpenHAB2’ is not recognized as an internal or external command,
operable program or batch file.

C:\WINDOWS\system32>

I don’t get what I am doing wrong here. Can you or anyone else show me, I have read the instruction over 8 times and I am following it to the letter yet the outcome has been the same.

Actually I have never installed openHAB in Windows. When I started I setup a VirtualBox Linux VM on my Windows box.
Perhaps I can find some time to try.

??? These just seem like random changes.

JAVA_HOME is where your java install lives. Might be something like C:\Program Files\Java

OPENHAB_HOME is not the same as OPENHAB-HOME

It’s been a while since I installed OH on Windows. I recall just unzipping to C:\openhab2 and running start.bat. I did need to change the system variable for java home.

hey Ross , my bad for the confusion,. You are correct that OPENHAB_HOME is not the same as OPENHAB-HOME. The later was an error cause by frustration, I did write it out properly. That said you are also correct in the statement and notion that all you need to do is run the start.bat file for your initial run. That said I wanted to have OpenHAB2 run as a service on my computer. I was for that reason that I was taking this path. I would say It this point I will Bruce’s advice create a VM and install it there.