I have installed the openhab-cloud locally with docker according to instructions on DockerHub.
The local setup works.
I registered an email address, the uuid and secret.
I have setup the correct address for the openHab cloud connector
But the local openhab-cloud keeps telling me: "Your openHAB is not online. Please check if your installation is running or recheck the openHAB settings in your account"
If I connect the cloud connector to https://myopenhab.org/ (and use exactly the same uuid and secret), it works perfectly.
All I can see in the openhab.log when connecting to the local cloud is:
Since it was not working. I have set the domain ${DOMAIN_NAME} to a fixed local ip in both docker-compose.yml, config.json and -of course- in the cloud connector in openhab.
Also, all the docker containers are running on the same (local) machine.
Suggestions about how to debug where the problem is, are welcome.
Have a look at apps.js.
This code snippet might not be taken from the latest release so yours might look different:
if (taskEnv === 'main') {
setInterval(function () {
logger.debug('openHAB-cloud: Checking for offline openHABs (' + Object.keys(offlineOpenhabs).length + ')');
for (var offlineOpenhabUuid in offlineOpenhabs) {
if (Date.now() - offlineOpenhabs[offlineOpenhabUuid] < 5 * 60 * 1000) {
continue;
}
delete offlineOpenhabs[offlineOpenhabUuid];
logger.debug('openHAB-cloud: openHAB with ' + offlineOpenhabUuid + ' is offline > 300 sec, time to notify the owner');
Openhab.findOne({
uuid: offlineOpenhabUuid
}).exec(function (error, openhab) {
if (!openhab || error) {
return;
}
//if this has not connected to another server, then notify
if(openhab.serverAddress == internalAddress){
notifyOpenHABOwnerOffline(openhab);
}
});
}
}, 60000);
}
You could add additional debug output statements to detect at which step your cloud instance is detected to be offline.
As far as I understand the code if openhab server address is the internal address the code assumes it is offline.
You could add additional debug output statements to detect at which step your cloud instance is detected to be offline.
As far as I understand the code if openhab server address is the internal address the code assumes it is offline.