Openhab2 iphone remote access setup

I am able to access my openhab2 on my iPhone when I am connected to my wifi.
I am not able to access remotely when not connected to wifi. I have the right java version, using right user password for
Myopenhab.
I am not able to find my uuuid and secret code. I checked the forum it says to check
\Openhab\userdata
But I don’t see a folder in my raspberry Pi
I can send mesg from myopenhab to my phone.
Please help me find uuuid and secret code
Thanks

I’m not at home now but I believe it’s in /usr/share/openhab2/. The uuid file is there and then the secret code is in a subfolder.

And in the iOS app, make sure you put in https://my.openhab.org. I was just using http and it was causing issues.

Matthew thanks for replying.
I don’t see UUID file or secret code. I see files license.txt, start_debug.sh, start.sh and folders bin, addon and runtime. I don’t see the UUID file in sub folders either.

I am using the correct remote url. I get timeout message- request failed internal server error 500.

I may have the wrong location, the my.openhab documentation is it’s in /webapps/static but that may be OH1. I won’t be home until tomorrow but I can look then.

One thing to try, have you done a restart? If the files go missing for some reason, a restart of OH will recreate the files.

Just a guess:

There was a second remote service released some hours ago, which is called myopenhab.org.

And there is the old service which is called my.openhab.org.

Both are maybe different in terms of functionality, setup and/or where the files are.

So be aware! You can use either one but you have to follow the appropriate guideline!

This also indicates that the right java version may not be installed (as you mentioned). Have you double checked this? Can you post your output when you enter

java -version

on your ssh console?

Java version before restart
/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/jre/bin/java

after restart
pi@raspberrypi:~ $ java -version
java version "1.8.0_65"
Java™ SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot™ Client VM (build 25.65-b01, mixed mode)

I am connecting to https://my.openhab.org

…and 1.8.0_65 is NOT the right java version as you mentioned. :wink:

You need (at least) 1.8.0_101 (the most recent is 111 I think).

Have a look at this thread to see how to update:

I just looked and the uuid file is under /var/lib/openhab2.

The secret file is under /var/lib/openhab2/myopenhab.

So once you update your java and locate those two files you should be all set.

I am able to find the UUID and secret code by searching the entire PI.
Now I am having hard time upgrading to latest version of JAVA. I downloaded the latest version.(jdk-8u111-linux-arm32-vfp-hflt.tar.gz) FTP to PI. now i am trying install but not able to do it.
What directory do install JAVA? What is the command to extract and install the download file?

Please let me know.
Thanks

I can’t exactly remember which process I used.

You can try the instruction from another thread:

sudo su
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list
echo "deb-src http://ppa.launchpad.net/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

Or you can visit this site for other instructions:

http://www.rpiblog.com/2014/03/installing-oracle-jdk-8-on-raspberry-pi.html

I want to say I used the website, but it was awhile ago.

Thank you Matthew and Stefan.
I am finally able to connect to my.openhab. myopenhab status is online now.
Thank you both for your help.
I have few wemo switches at home.
The status of my wemo switches are not correct on UI. (when it is off it shows as on and other way around) Also I have clear cache all the time on my iphone. It takes few mins to display the status.

How do i fix these?
Thanks again.

Sorry dude, but this gets me a little furious! Why do I post a link to a thread were EVERYTHING is explained, when you obviously do not read it (otherwise you would have known that downloading via FTP isn’t necessary at all).

If you would have read the thread, you would have found just the lines of code which @RHINESEL has posted.

Not a good base for further help…