@candrea try uninstalling the openhab cloud connector binding then delete the UUID. Stop OH, clean the cache and restart. Then reinstall the binding to have it generate a new UUID and see if that works.
@candrea glad you have it working. and thanks for adding Solved to the title.
If you would, please mark the topic as solved by clicking the square box (lower right corner) on the post that provided the solution. This helps others with a similar issue find the solution quicker.
Unfortunately, this didn’t help me. I followed your instructions at least three times, but myopenhab.org still insists that my openHAB is not online. I changed the log level of org.openhab.io.openhabcloud to TRACE and could verify form the log entry that the cloud connector is actually using the same uuid and secret that I have entered in the myopenhab.org account.
As stated above, I’ve verified that the cloud connector is using the correct uuid and secret. I assume the problem is within the cloud service, but I’m still searching for ways to tackle this problem. The logs don’t help and just leave me in the dark.
I’ve changed the Base URL for the openHAB Cloud server configuration from the default http://myopenhab.org:443 to https://myopenhab.org – and my openHAB was immediately displayed as online on myopenhab.org.
However, after that I changed it back out of curiosity, and it continued to work. Still don’t know why it didn’t.
EDIT:
I’ve made a few more tests with different accounts, and it looks to me as if the order in which connector url and cloud account are configured makes the difference. The uuid and secret must be entered first in the myopenhab.org account, then the cloud connector should be installed and connected. However, if the cloud connector has been connected only once, it doesn’t work properly any more. Yet if the cloud server url is changed (in any way), then this seems to cause a reset somewhere – maybe clearing a cache or so.
So if you are sure that uuid and secret are correct, try editing the cloud server url as explained above.
I mean the binding obviously does not disconnect and reconnect with a new uuid and secret, unless you uninstall and reinstall it or you change the url. However, changing the url seems to work more reliably which makes me think that there is some sort of internal cache that doesn’t get cleared otherwise.
Have you verified that uuid and secret are identical and did you change the url as explained above?
Only after I had changed the url, I saw this message in the log:
[INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = xxxxxxxx-4bec-4805-a8e0-xxxxxxxx, base URL = http://localhost:8080)
This message wasn’t logged before when it did not work, so the problem probably was that the cloud connector did not really connect to the cloud, but I don’t know why. Do you see this message in your log?
After setting a high log level in the console: log:set DEBUG io.openhabcloud.internal.CloudClient
I saw this warning in the log: 2019-02-21 14:59:41.151 [WARN ] [o.openhabcloud.internal.CloudService] - You are running Java 1.8.0_65 - the openhab Cloud connection requires at least Java 1.8.0_101, if your cloud server uses Let's Encrypt certificates!
Fixed that as follows:
Using Paper UI, put a garbage base URL in the settings for the IO Service Open Cloud.
Stopped openhab2, using systemctl stop openhab2
Updated java to version “1.8.0_201” (Google updating java on raspbian, because the recipe depends on what version of debian your raspbian OS is based on. xenial in my case.) I used these instructions.
restarted openhab2 using systemctl start openhab2
The log showed: [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = 161dca61-73b0-46c5-8874-bdd11d47faf2, base URL = http://localhost:8080)
because of the bad base URL.
Back in Paper UI I set it to the proper https://myopenhab.org and it immediately reported that it was online.
Kind of a mystery. After one hundred attempts, now it went online. You pointed me to the right direction, though, even if in my case it was not a java problem. I had Zulu 1.8.0_152 and it was not working. I installed Oracle to no avail, then back to Zulu and now is working with it.
It turned out that reinstalling and reconnecting the cloud connector after changing the url as suggested by @metin was not enough. A reboot was not enough either.
What did the trick for me was setting the url to some ppp.org, then stopping and restarting openhab2 via systemctl, then changing again the url to myopenhab.org, stopping and restarting openhab2. Add a reboot at some time as an extra.
Thanks to the both of you and to the right planet alignment.