Unsure about installation procedures for Windows

Guess I’m lost right off the starting line. It seems like the installation instructions are ENTIRELY different between the
Download-Windows-Install with Chocolatey
page and the
Documentation-Installaion Guide-Windows-openHAB 2 on Windows
page.
FWIW, I tried the installation using the 3 steps outlined under “Install with Chocolatey” (choco install openhab) and the Administrator Command Prompt ended up with:
The install of openhab was successful.
Software installed to ‘C:\ProgramData\chocolatey\lib\openhab\tools’
Chocolatey installed 3/3 packages.

So, it would seem that it installed, though not in the c:\openhab2 directory I see mentioned elsewhere.

And. . . what do I do next? The rest of the page is devoted to “Manual Installation” with no further instructions in the “Install with Chocolatey” section. It just ends with the “choco install openhab” command". I see an openHAB shortcut on the desktop, but it just opens a File Explorer window with 7 further shortcuts…

So I’m guessing that the instructions I followed were not the correct installation instructions after all (though it sure seemed like it was for those 3 itemized steps). If incorrect, how do I delete what’s been done? Can someone confirm that I should instead follow the instructions under the Documentations tab? Bonus points for explaining what I was actually doing or what I should have expected in the end?

Really would like to try learning this and maybe even putting openHAB to use.

1 Like

There are 2 ways to install OH2 on windows:
The packaged way (using Chocolatey) and the manual way (using the zip file)
The docs entry on Win installation covers only the second version (this should be improved with the contribution of the community members). The example directory to be used with the manual version is: C:\openHAB2\ but you can use any other dir.

Since you used the packaged version, you should be fine. OH2 has been deployed in C:\ProgramData\chocolatey\lib\openhab\tools and can be started in the same way as the manual installation: by running start.bat

Then, access OH2 from your browser: http://localhost:8080/ and continue reading: https://www.openhab.org/docs/tutorial/

Ps: I just deployed using Choco OH2.3 and I am getting some errors… I will notify the package maintainer to fix them.

Thanks for your reply. Couple questions: the present directory is a very long string to key in - is it possible and advisable to move the entire directory contents to c:\openhab2? I’m far from deploying OH, just want to learn it right now. I assume I would need to run the bat after every reboot, etc. Second, any idea why the installation ended up where it did? I reviewed my steps and didn’t see any obvious departures from instructions

That’s where my OH is stored I just manually unzipped the file here

Yes this is what you need too do unless you install the service for openhab

I don’t use Chocolatey but I wouldn’t move the directory that OH2.3 was installed in. Most likely, the package info/configs include the default path (C:\ProgramData\chocolatey\lib\openhab\tools)

If you want to use another dir, follow the manual installation steps (unzip the file anywhere you want)

That’s the default path when using Chocolatey

I, too, have been having problems. I originally did openhabianpi and it seems to be okay, but for other reasons, wanted to look at a windows install. I’ve tried all morning to do a manual install (since it seems that what I’ve read, installation is based on c:\openhab2 as the default installation directory), but one blockade after another. So I tried the chocolatey installation. Running start.bat, I get two errors:
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
And then it does.

Why might JVM fail? Anything else I should know about?

Thanks

is java_home sys env variable set?

the manual installation usually works without any problems. check logs for additional info (if exist)

Getting closer a mm at a time. Looks like I had jdk10 installed and found here that it needed to be jdk8. I uninstalled 10, installed 8, verified JAVA_HOME with new install and fired the start.bat. It kinda worked - I see upenHAB “logo” in karaf, but soon found few more problems:
Error executing command: java.lang.NullPointerException
Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinyb in java.library.path
Error 0x1 at src/window/termios.c(889): Incorrect function.

How do I get another mm closer now?

1 Like

does it point to the root directory of the Java installation? (not to the java.exe)

Yes, to the root
Sorry, been away for couple of days

Hi

Any answer on this, getting same issue when installing from download and from chocolaty on to Windows 10.

Its openHab 2.3.0.

I get the following:

openhab> Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinyb in java.library.path
Exception in thread “Thread-117” java.lang.NullPointerException
at org.openhab.binding.mochadx10.internal.MochadX10Binding$ReceiveThread.run(MochadX10Binding.java:199)

Thanks ahead of time.

1 Like

Looks like Bluetooth binding issue. Can you uninstall that binding? Perhaps you couldn’t because the VM is crashing. Maybe start with a fresh install, and try not to install that binding until you hear back from the maintainers of that binding.

Hi,
I am new to openHAB and have followed the Chocolatey installation process and have a directory path of ProgramData\chocolatey\lib\openhab. In the openhab directory I only have \tools directory +files (no start.bat) which is different to the directories showing in the installation guide. The ‘missing’ directories and files are in the \tools directory.
When I run openhab I get
openhab> Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinyb in java.library.path
I have installed Zulu version 8 and setup up JAVA_HOME.
any help appreciated as I guess I have a similar problem to the above threads
thanks.

1 Like

tinyb is used by bluetooth presence binding. Not sure if any other component also uses it.
You may post your problem on

Another new Windows 10 user here, experiencing the same issues as others above. The Chocolatey installation process for Windows, in its current form, is flawed/produces errors. I really wish the package maintainers/someone would please clean up this process so that new Windows openHAB users such as myself and others aren’t faced with these challenges right off the bat. :-/

I am really, really excited to setup openHAB - so far I like it more than any other similar system I’ve tried (NodeRED, Home Assistant, etc.). However, I’ve spent the past week trying to just get the basic system operating properly and have probably reinstalled openHAB 15 times now and it’s quite a pain :frowning:

  1. I installed Chocolatey :heavy_check_mark:

  2. I installed Java Development Kit 8 (jdk1.8.0_181) :heavy_check_mark:

  3. I have my “JAVA_HOME” environment variable properly configured. :heavy_check_mark:

  4. Installing openHAB via Chocolatey was a painful process and I received many errors. After the 5th or 6th attempt, I finally was able to get openHAB to install.

  5. The initial startup launch always works well. Devices on my home network are instantly discovered. I added some additional bindings and connected my Amazon Echo devices. Everything seems to be great! :slight_smile: But then… the second or third time I attempt to launch openHAB I receive the same errors as others above:

  • Native code library failed to load.
    java.lang.UnsatisfiedLinkError: no tinyb in java.library.path

Supposedly this is caused by the Bluetooth binding being incompatible with the standard bluetooth that comes with Windows… OK… then why do you include it in the initial setup for Windows users if it’s not compatible?!? I have tried multiple times to remove the Bluetooth binding, but have not had success.

A little later, I receive the next error, as others above have also listed:

  • Exception in thread “Thread-121” java.lang.NullPointerException at org.openhab.binding.mochadx10.internal.MochadX10Binding$ReceiveThread.run(MochadX10Binding.java:199)

And now openHAB refuses to launch. When I navigate to http://localhost:8080/start/index, 90% of the time I receive a 404 error. Every now and then, the various UIs will load, but then I am given the message “the server is offline 404”.

Such a pain! :cry:

I do have a few Linux machines available and I suppose I can go that route if I have to, but can someone please help? The installation for Windows 10, using Chocolatey, is flawed. I tried manual setup multiple times as well but did not get very far, but am willing to try anything at this point.

Thank you!

1 Like

And now, I am receiving the following errors, in addition to the two mentioned above:

java.net.SocketException: socket closed
        at java.net.TwoStacksPlainDatagramSocketImpl.receive0(Native Method)
        at java.net.TwoStacksPlainDatagramSocketImpl.receive(TwoStacksPlainDatagramSocketImpl.java:114)
        at java.net.DatagramSocket.receive(DatagramSocket.java:812)
        at com.connectsdk.discovery.provider.ssdp.SSDPClient.multicastReceive(SSDPClient.java:115)
        at com.connectsdk.discovery.provider.SSDPDiscoveryProvider$4.run(SSDPDiscoveryProvider.java:275)
        at java.lang.Thread.run(Thread.java:748)
java.net.SocketException: socket closed
        at java.net.DualStackPlainDatagramSocketImpl.socketReceiveOrPeekData(Native Method)
        at java.net.DualStackPlainDatagramSocketImpl.receive0(DualStackPlainDatagramSocketImpl.java:124)
        at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143)
        at java.net.DatagramSocket.receive(DatagramSocket.java:812)
        at com.connectsdk.discovery.provider.ssdp.SSDPClient.responseReceive(SSDPClient.java:103)
        at com.connectsdk.discovery.provider.SSDPDiscoveryProvider$3.run(SSDPDiscoveryProvider.java:255)
        at java.lang.Thread.run(Thread.java:748)

Also another brand-new Windows user to openHAB here. I stumbled upon what sounded like the perfect thing I have been looking for to integrate all of my home automation projects. So after reading a ton (and continuing to be very confused), I figured I should start from step 0 and slowly move along.

As the original poster mentioned, I had trouble from the start with the documentation on which method to do. It -seemed- like it wanted me to go the chocolatey route, and after much hesitation (had no idea what it was), I went for it. Everything seemed to go decently, though confusing.

In the end, I ran start.bat and had a few issues. After a reboot and now running start.bat in an Administrator console, I get the errors that everyone else is getting:

openhab Native code library failed to load.
java.lang.UnsatisfiedLinkError: no tinylib in java.library.path

I sat on that forever and then for the heck of it pressed the enter key. To which I was (finally) presented with the openhab> command prompt. I thought I would have seen that at the end of the startup process…weird.

http://localhost:8080/start/index does work, but I have no idea what to do. Looks like I’m on to https://www.openhab.org/docs/tutorial/ to figure it out.

Has anyone else figured out this “tinyb” issue and how to fix it, step-by-step?

I’ll tell you, the initial buy-in to openHAB is super steep…I mean, I’m an engineer/software developer and even I’m struggling here…not for the faint of heart. The documentation and the installation is in serious need of some polish!

Tom

Hello Tom,

I’ve got windows, and i also got this problem, But i figured it out!
Close Karaf/ or commandline.
Go to you the directory explore where the folder ‘Openhab’ is located.
If you are the there, surch for ‘tinyb’. The location would be in:
…:openHAB2\userdata\cache\org.eclipse.osgi\219\0.cp\lib.
Maybe its not in map 219, it can also be another one.
Then delete this file.
If you have did that, start up the command for openhab. In execute C:\openHAB2\start.
Now you can open Openhab. Than uninstall in '‘ad-ons’ bindings ‘‘bluetooth binding’’. It’s because of this bluetooth binding that makes the wrong script.
Good luck!

3 Likes

Thanks for the tip. Somehow I was still not able to uninstall the Bluetooth binding. Even after rebooting with the removed file.

(maybe because all the supplied bindings are in a “bundle”?)

Hi There,
fresh install, windows 10 - same issue as Joost_Westra unfortunately. Is there any step-by-step procedure on how to fix? tried the above, didn’t work.