openhab-addons
openhab-addons copied to clipboard
[openhabcloud] Read connection status of CloudService
I need to know if the system is connected to cloud. For example:
var cloudService = osgi.getService('org.openhab.io.openhabcloud.internal.CloudService');
actions.Log.logInfo('Test',`CloudService connection status: ${cloudService.isConnected()}`);
@kaikreuzer @digitaldan : WDYT about this change ?
This class is in an internal package, which tells me that it is not meant to be used as a public service, like e.g. from scripts. I would prefer to see a cleanly defined interface, if we want to make it available as an API. @digitaldan Wdyt?
I would also be interested in the use case. And maybe this can be easily fixed with an action method?
Let me think on it a bit as I'm working on reviewing another cloud PR this weekend and will have a chance to go through the code.
@digitaldan any news?
Gentle ping @digitaldan