[openhabcloud] Makes the baseURL and item updates options advanced... (#13078)
* [openhabcloud] Makes the baseURL and item updates options advanced, cleans up documentation, disabled sending updates to the community myopenHAB.org service. Fixes #12582 Signed-off-by: Dan Cunningham <dan@digitaldan.com>
This commit is contained in:
parent
a58ae57942
commit
8a87450f4c
|
@ -9,7 +9,7 @@ The openHAB Cloud service (and thus the connector to it) is useful for different
|
|||
|
||||
* It allows remote access to local openHAB instances without having to expose ports to the Internet or to require a complex VPN setup.
|
||||
* It serves as a connector to Google Cloud Messaging (GCM) and Apple Push Notifications (APN) for pushing notifications to mobile phone apps.
|
||||
* It brings integration possibilities with services that require an OAuth2 authentication against a web server, such as IFTTT or Amazon Alexa Skills.
|
||||
* It provides integrations with 3rd party services that require OAuth2 authentication, such as Amazon Alexa or Google Home applications
|
||||
|
||||
## Installation via UI
|
||||
|
||||
|
@ -43,10 +43,15 @@ After installing this add-on, you will find configuration options in the openHAB
|
|||
|
||||
![Configuration](doc/configuration.png)
|
||||
|
||||
Please note, that you should not expose all your items in this settings dialog.
|
||||
Also note that at present this feature is currently turned off.
|
||||
You just need to expose those items, which you want to be accessible by IFTTT.
|
||||
This setting has no affect on Alexa or Google Assistant functionality.
|
||||
By default both remote access and push notifications are enabled.
|
||||
|
||||
### Advanced Configuration
|
||||
|
||||
For private hosted myopenHAB installations, the base URL can be changed to point another cloud instance.
|
||||
|
||||
Private hosted myopenHAB installations may enable selected items in openHAB to have their state updates pushed to the cloud service for integrations with services like IFTTT.
|
||||
Note that this is not supported on the community hosted myopenHAB service due to high load concerns and will have no effect if enabled with the default URL configured.
|
||||
This is also not required for remote access through the cloud service to function.
|
||||
|
||||
Alternatively, you can configure the settings in the file `conf/services/openhabcloud.cfg`:
|
||||
|
||||
|
@ -72,6 +77,4 @@ Alternatively, you can configure the settings in the file `conf/services/openhab
|
|||
#expose=
|
||||
```
|
||||
|
||||
Note: The exposed items will show up after they receive an update to their state.
|
||||
|
||||
Note: In order to use an openHAB UI via the Cloud Connector exposing items is not neccessary. Administrative actions are limited to creating things, items and rules, deleting them is inhibited via the Cloud Connector.
|
||||
Note: The optionally exposed items will show up after they receive an update to their state.
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 59 KiB |
|
@ -367,8 +367,12 @@ public class CloudService implements ActionService, CloudClientListener, EventSu
|
|||
@Override
|
||||
public void receive(Event event) {
|
||||
ItemStateEvent ise = (ItemStateEvent) event;
|
||||
if (exposedItems != null && exposedItems.contains(ise.getItemName())) {
|
||||
if (supportsUpdates() && exposedItems != null && exposedItems.contains(ise.getItemName())) {
|
||||
cloudClient.sendItemUpdate(ise.getItemName(), ise.getItemState().toString());
|
||||
}
|
||||
}
|
||||
|
||||
private boolean supportsUpdates() {
|
||||
return cloudBaseUrl.indexOf(CFG_BASE_URL) >= 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,13 +16,16 @@
|
|||
</parameter>
|
||||
<parameter name="expose" type="text" required="false" multiple="true">
|
||||
<label>Items to Expose</label>
|
||||
<description>List of items that are made accessible to IFTTT and similar services.</description>
|
||||
<description>List of items that are made accessible to IFTTT and similar services. Only supported on private cloud
|
||||
installations.</description>
|
||||
<context>item</context>
|
||||
<advanced>true</advanced>
|
||||
</parameter>
|
||||
<parameter name="baseURL" type="text" required="false">
|
||||
<label>Base URL</label>
|
||||
<description>Base URL for the openHAB Cloud server.</description>
|
||||
<default>https://myopenhab.org/</default>
|
||||
<advanced>true</advanced>
|
||||
</parameter>
|
||||
</config-description>
|
||||
</config-description:config-descriptions>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
io.config.openhabcloud.baseURL.label = Base URL
|
||||
io.config.openhabcloud.baseURL.description = Base URL for the openHAB Cloud server.
|
||||
io.config.openhabcloud.expose.label = Items to Expose
|
||||
io.config.openhabcloud.expose.description = List of items that are made accessible to IFTTT and similar services.
|
||||
io.config.openhabcloud.expose.description = List of items that are made accessible to IFTTT and similar services. Only supported on private cloud installations.
|
||||
io.config.openhabcloud.mode.label = Mode
|
||||
io.config.openhabcloud.mode.description = What features of the openHAB Cloud service should be used.
|
||||
io.config.openhabcloud.mode.option.notification = Notifications
|
||||
|
|
Loading…
Reference in New Issue