My.openhab oh2 wont create files

After you install the my.openhab extension (currently found under “MISC”). What is the directory path to the secret file? There is no webapps folder in OH2 nor userdata folder. I have found the UUID via the REST API end point.

UUID Is in the userdata folder.
There should be a myopenhab folder generated in userdata too which will hold the secret file.

Apologies for the ignorance, is the userdata folder under the /etc/openhab2 directory or the /usr/share/openhab2 directory?

I can’t recall off the top of my head (i’m at work now). If it’s not in either of those folders, you could try here: /var/lib/openhab2

Are you installing on a Pi? Via apt-get?

exactly pi2 via apt-get (fresh install as of yesterday)

Ok, Now that I’ve found the UUID and Secret values and updated my.openHAB.org profile. I restarted the openhab service and see the following log lines (with modified my uuid and secret values). the website my.openHAB.org still shows “offline”.

2016-08-10 15:00:43.131 [DEBUG] [.myopenhab.internal.MyOpenHABService] - my.openHAB service activated
2016-08-10 15:00:43.145 [DEBUG] [.myopenhab.internal.MyOpenHABService] - Using secret at ‘/var/lib/openhab2/myopenhab/secret’ with content 'YYYYYYYYYYYYYYYY’
2016-08-10 15:00:43.146 [DEBUG] [.myopenhab.internal.MyOpenHABService] - UUID = XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX-XXXXXXX, secret = YYYYYYYYYYYYYYYY
2016-08-10 15:00:43.166 [DEBUG] [.myopenhab.internal.MyOpenHABService] - Using secret at ‘/var/lib/openhab2/myopenhab/secret’ with content 'YYYYYYYYYYYYYYYY’
2016-08-10 15:00:43.580 [DEBUG] [o.myopenhab.internal.MyOpenHABClient] - No connection, Item update is not sent

Anyone have any ideas?

Hello!

I am having the same problem. Did you manage to get your setup working?

The first and obvious question: Is your Java up to date? You have to use Oracla Java (not OpenJDK) and at least version 1.8.0-101 of Oracle Java. Otherwise my.openhab will not work.

Java is installed as 1.8.0_65 but when i try to update with apt-get install, then it sais it is currently the newest version

java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) Client VM (build 25.65-b01, mixed mode)

$ sudo apt-get install oracle-java8-jdk
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java8-jdk is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

By the way I am running openhab on Raspbian with RP3.

Here’s what I have done so far:

With Paper UI added the binding misc/myopenhab, checked with feature:list if installed properly.
Created an account at my.openhab.org with secret and uuid that i found in /userdata.

What am I missing?

I have found people suggesting myopenhab.cfg file similar to my.openhab 1.x to give security permissions so I created that as well in …/conf/services with :

security:option=EXTERNAL
security:netmask=192.168.0.0/24

Is this correct?

The logs are mostly without myopenhab logs, only if I leave it on for the night do I get a few notices of myopenhab shutting down.

Regarding the Java-update, try this instead:

sudo su
echo “deb Index of /webupd8team/java/ubuntu xenial main” | tee /etc/apt/sources.list.d/webupd8team-java.list
echo “deb-src Index of /webupd8team/java/ubuntu xenial main” | tee -a /etc/apt/sources.list.d/webupd8team-java.list
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886
apt-get update
apt-get install oracle-java8-installer
exit

Regarding my.openhab:
I haven’t installed my.openhab yet, but AFAIK there is no need to make cfg file. You know this (official) thread?

Unfortunately the documentation on my.openhab.org still refers to an OH1 installation. But also the tutorial from Rich doesn’t mention any cfg file for my.openhab:

I would assume, when you update your java version, things will get going.

Thank you!

Everything works perfectly now.

That is correct, there is no config file for my.openhab. Once installed and
started the binding will create the uuid and secret files. You use the
content of these file to fill out the form on the my.openhab.org website
under your account and assuming everything else is right (e.g. new enough
Oracle Java, servers aren’t down, etc.) it will work. That is all the
config you need to do.

Hi,

I used to have the beta4 installed. Now I reinstalled everything (removed all OH2 directories after uninstalling with apt) to the latest snapshot. All my other bindings and services work fine after setting them up again, but I cannot get my.openhab working. I copy & pasted the new uuid and secret values into the my.openhab account and configured the base url to “http://localhost:8090” under “Configuration”->“Services”->“my.openhab”->“configure” because I run OpenHAB on port 8090 (8080 is in use by another application)
But it doesn’t connect. To be more precise, there are NO messages from the bundle. ONLY when the bundle is stopped with bundle:stop or when shutting down OH2 completely. Then the message
[INFO ] [o.myopenhab.internal.MyOpenHABClient] - Shutting down my.openHAB service connection
is shown. But no errors or success messages - nothing. Do you have an idea what could be wrong?

Thanks in advance!
Stephan

Are you running at least Java 1.8 update 101?

root@vdr:~# java -version
java version "1.8.0_112"
Java™ SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot™ 64-Bit Server VM (build 25.112-b15, mixed mode)

Hi all,

In case it helps anyone, I’ve managed to get my.openhab running with the following steps (I’m on Windows 10 temporarily):

  1. In Paper UI, install the binding under the ‘misc’ tab:

2.That should have created the 2 files - uuid and secret. In Widows they were created in the following directories:

  • uuid:
    C:\Openhab\userdata

  • secret
    C:\Openhab\userdata\myopenhab

  1. Take the values from each of these files und update them in your my.openhab.org account and hit ‘update’

  2. Restart Openhab

Now hopefully you can access OH2 from anywhere!

3 Likes

No idea? No one? :frowning2:

Right now the best I can offer is move to the new cloud connector add-on and http://myopenhab.org service and see if that works. Http://my.openhab.org will be shut down at the end of January.

Great hint! I wasn’t aware that there is a new connector for the new myopenhab.org webservice. With that everything runs fine :slight_smile: Thanks a lot!

What worked for me was to use httpS://myopenhab.org instead of http://myopenhab.org.

But it’s really slow and I don’t see any updates from my items.