openhab-addons icon indicating copy to clipboard operation
openhab-addons copied to clipboard

[openhabcloud] Read connection status of CloudService

Open paspiz85 opened this issue 5 months ago • 5 comments

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()}`);

paspiz85 avatar Mar 02 '24 19:03 paspiz85

@kaikreuzer @digitaldan : WDYT about this change ?

lolodomo avatar Mar 31 '24 09:03 lolodomo

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?

kaikreuzer avatar Apr 05 '24 09:04 kaikreuzer

I would also be interested in the use case. And maybe this can be easily fixed with an action method?

lsiepel avatar Apr 13 '24 08:04 lsiepel

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 avatar Apr 13 '24 21:04 digitaldan

@digitaldan any news?

paspiz85 avatar May 02 '24 09:05 paspiz85