[SOLVED] No uuid, secret

I copied the ‘org.openhab.io.myopenhab-1.7.0.jar’ into the /usr/share/openhab/addons directory. Restart of openhab is without effect. The uuid and secret files are not created. The folder …/webapps/static contains only the file ‘index.html’. What’s going wrong?

Maybe openHAB has no write-permission? uuid should be created instantly when starting openHAB with or without myopenhab-bundle…

I added write-permission as ‘chmod 775’ to /usr/share/openhab, to /usr/share/webapps and ‘777’ to /usr/share/webapps/static. After that I added :OPENHABPATH=/usr/share/openhab, HTTP_PORT=8080, HTTPS_PORT=8443 to the file openhab.cfg.
Restart of openhab produced the uuid and secret files.
Now I start to get items and sitemaps files.
Thanks a lot for your help.

I have a similar issue with openHAB2. There is no UUID in /var/lib/openhab2. I checked the permissions and it shows:

root@openhab:/var/lib/openhab2# ls -al
total 48
drwxr-xr-x 11 openhab openhab 4096 Jan 29 15:58 .
drwxr-xr-x 38 root    root    4096 Jan 29 17:18 ..
-rw-------  1 openhab openhab  285 Jan 29 15:58 .bash_history
drwxr-xr-x  2 openhab openhab 4096 Jan 29 12:04 .oracle_jre_usage
drwxr-xr-x  4 openhab openhab 4096 Jan 29 12:05 cache
drwxr-xr-x  6 openhab openhab 4096 Jan 29 12:28 config
drwxr-xr-x  2 openhab openhab 4096 Jan 29 12:28 etc
drwxr-xr-x  3 openhab openhab 4096 Jan 29 21:10 jsondb
drwxr-xr-x  3 openhab openhab 4096 Jan 29 12:06 kar
drwxr-xr-x  2 openhab openhab 4096 Jan 29 12:04 log
drwxr-xr-x  5 openhab openhab 4096 Jan 29 12:02 persistence
drwxr-xr-x  5 openhab openhab 4096 Jan 29 21:10 tmp
root@openhab:/var/lib/openhab2#

and

root@openhab:/usr/share/openhab2# ls -al
total 40
drwxrwxr-x   5 root    root     4096 Jan 29 12:02 .
drwxr-xr-x 101 root    root     4096 Jan 29 16:34 ..
-rwxrwxr-x   1 openhab openhab 11232 Jan 16 23:24 LICENSE.TXT
drwxrwxr-x   2 openhab openhab  4096 Jan 29 12:04 addons
drwxrwxr-x   2 root    root     4096 Jan 29 12:02 bin
drwxrwxr-x   7 openhab openhab  4096 Jan 29 12:05 runtime
-rwxrwxr-x   1 openhab openhab   116 Jan 16 23:24 start.sh
-rwxrwxr-x   1 openhab openhab    73 Jan 16 23:24 start_debug.sh
root@openhab:/usr/share/openhab2#

What am i missing?

Which Java version do you use? You need at least 1.8.0_101 (or newer).

The java version is:


pi@openhab:~ $ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)
pi@openhab:~ $ javac -version
javac 1.8.0_121
pi@openhab:~ $

That should be ok. :smirk:
Any place I could check for errors? The event.log and openhab.log show no evidence of an issue generating the uuid.

You can go to debug level for the openhab.log and see if there is more information.

Other than that, I’ve only some (maybe obvious) hints/questions:

  • Are you using a quite recent snapshot version or 2.0 stable? myopenhab needs a recent version to work.
  • You are aware that there is the “old” my.openhab service and the new myopenhab service? Don’t use the old one.
  • If you have previously used the old service, is there anything installed left (binding, cfg file, persistence file)? Delete it!
  • Have you installed with apt-get or manually? The two files are in different directories based on the installation method.
  • The OpenHAB CloudConnector add-on is installed and running?

Thanks. Will have a look at the logging options tonight.
To answer your questions:

  • Installed with apt-get
  • fresh install of Raspbian and OH2
  • CloudConnector installed

I’ll get back with debug logging info.
Thanks.

I don’t know exactly how (and when), but I have a uuid now in /var/lib/openhab2. I have been working on the weather configuration and did some restarts due to database versus config file mismatch (but that’s another topic), and now the missing file is there… ;o)
Thanks for the support!

EDIT: The secret file is still missing. Where should it be? there is no ./webapps directory in /usr/share/openhab2.
EDIT 2: After some more searching, I found a post that explained the secret file location has moved in openHAB2 to /var/lib/openhab2/myopenhab

2 Likes

I also had problems finding uuid and secret in oH2. The documentation link to openHAB Cloud isn’t working: http://docs.openhab.org/addons/io/openhabcloud/readme.html

Took me a really long time to find the UUID and Secret on the Mac isntallation. It was in the directory that I installed OpenHab:
userdata/uuid
userdata/openhabcloud/secret

But now that I could log into mopenhab, it says

Your openHAB is not online. Please check if your installation is running or recheck the openHAB settings in your account.

And the reason I got the offline message is that myopenhab secretly sends an email to your spam box with a link you need to click to enable the remote access… Once I found that and clicked it it all worked.

1 Like

There are several uneccessarily difficult usability issues with myopenhab.org.

Currently, the registration only hints, “You will find UUID in ‘webapps/static/uuid’ file”, and “You will find Secret in ‘webapps/static/secret’ file”

First question, why give relative paths? Does the web developer know what context every user is in? Absolute paths are available. How many characters were saved by using the relative path.

Since I don’t know which “webapps” folder it is referring to I search. There are none.

So I search from the root for the “uuid” and “secret” files. The paths don’t look anything like the “webapps” path, and none of the values change my device to “online”, even after I clicked on the link in the totally not mentioned email that you have to click on.

The software looks awesome, but why impose hurdles to entry and “RTFM” attitude right at the beginning of setup? The application is supposed to simplify peoples life, not force them to become experts on the documentation before they are even able to try it out.

[04:26:54] openhabian@openhab:/$ pwd
/
[04:27:01] openhabian@openhab:/$ sudo find . -iname "uuid" -type f
./proc/sys/kernel/random/uuid
./usr/lib/node_modules/npm/node_modules/uuid/bin/uuid
./usr/lib/node_modules/frontail/node_modules/uuid/bin/uuid
[04:27:20] openhabian@openhab:/$ sudo find . -iname "secret" -type f
./var/lib/dhcpcd5/secret
2 Likes

Looking at the official docs is always a good idea:

I have never seen a service where you not have to verify your email address

It does, believe me … after you did read the manuals :grinning:

1 Like

As I said earlier, those files aren’t there.

Also, why tell people to look at the docs when the website gives the wrong info? That is also documentation. How does the user know which docs to ignore and which you will be scolded for not reading?

The most correct docs should be the ones put in front of the user in the UI.

Also, why say “read the docs” and “I’ve never seen any service where…” as an excuse to omit notifications? You are telling the user to second-guess the information they are presented with.

I can only assume the same kind of second-guessing is encouraged in project specifications.

2 Likes

@InTEGr8or

First of all you need an account in myopenhab.org. There you have to fill your UUID and secret from next step:

You have to install OpenHAB Cloud Connector!

Go to
PaperUI --> Addons --> Misc–> OpenHAB Cloud Connector --> INSTALL.

Search in above mentioned paths for UUID and secret.

Then go to PaperUI --> Configuration --> Services --> Openhab Cloud

Btw: There are no absolute paths mentioned because it is depending on your installation and your OS.

E.g. Linux see here: https://www.openhab.org/docs/installation/linux.html#file-locations

E g. Windows