From 3f6fc436bdee833c87143394897f4e8123ddbe01 Mon Sep 17 00:00:00 2001 From: Martin Grzeslowski Date: Sat, 4 May 2019 17:40:38 +0200 Subject: [PATCH] #8 move supla binding to `addons` --- .../org.openhab.binding.supla/.classpath | 0 .../org.openhab.binding.supla/.project | 0 .../ESH-INF/binding/binding.xml | 0 .../ESH-INF/i18n/supla_xx_XX.properties | 0 .../ESH-INF/thing/bridge.xml | 0 .../ESH-INF/thing/supla-cloud-bridge.xml | 0 .../ESH-INF/thing/thing-types.xml | 12 ++++++++++++ .../org.openhab.binding.supla/META-INF/MANIFEST.MF | 0 .../org.openhab.binding.supla/OSGI-INF/.gitignore | 0 .../org.openhab.binding.supla/README.md | 0 .../org.openhab.binding.supla/about.html | 0 .../org.openhab.binding.supla/build.properties | 0 .../org.openhab.binding.supla/doc/add-device.PNG | Bin .../org.openhab.binding.supla/doc/add-server.PNG | Bin .../doc/configure-server.PNG | Bin .../doc/configure-supla-device.PNG | Bin .../doc/discover-server.PNG | Bin .../doc/discovery-device.PNG | Bin .../org.openhab.binding.supla/doc/link-channel.PNG | Bin .../lib/nettyServer-fat-0.9.15.jar | Bin .../lib/swagger-java-client-fat-2.0.2.jar | Bin .../org.openhab.binding.supla/pom.xml | 0 .../binding/supla/SuplaBindingConstants.java | 1 + .../supla/handler/AbstractDeviceHandler.java | 0 .../binding/supla/handler/CloudBridgeHandler.java | 0 .../binding/supla/handler/CloudDeviceHandler.java | 0 .../supla/handler/SuplaCloudBridgeHandler.java | 0 .../binding/supla/handler/SuplaDeviceHandler.java | 0 .../binding/supla/internal/ChannelCallback.java | 0 .../binding/supla/internal/ChannelValueToState.java | 0 .../binding/supla/internal/ReadWriteMonad.java | 0 .../binding/supla/internal/SuplaConfiguration.java | 0 .../binding/supla/internal/SuplaDeviceRegistry.java | 0 .../supla/internal/SuplaDeviceRegistryImpl.java | 0 .../binding/supla/internal/SuplaHandlerFactory.java | 0 .../supla/internal/cloud/AdditionalChannelType.java | 0 .../supla/internal/cloud/ApiClientFactory.java | 0 .../internal/cloud/ChannelFunctionDispatcher.java | 0 .../supla/internal/cloud/ChannelIfoParser.java | 7 ++++--- .../binding/supla/internal/cloud/ChannelInfo.java | 0 .../supla/internal/cloud/CloudDiscovery.java | 1 - .../supla/internal/cloud/HsbTypeConverter.java | 0 .../supla/internal/cloud/LedCommandExecutor.java | 0 .../cloud/OneLineHttpLoggingInterceptor.java | 0 .../functionswitch/CreateChannelFunctionSwitch.java | 10 +++++++--- .../functionswitch/FindStateFunctionSwitch.java | 0 .../supla/internal/discovery/BridgeDiscovery.java | 0 .../internal/discovery/SuplaDiscoveryService.java | 0 .../binding/supla/internal/server/SuplaChannel.java | 0 .../supla-cloud-responses/channel-id-6961-LED.json | 0 .../channel-id-7035-open-close-gate.json | 0 .../channel-id-7036-gate-first-sensor.json | 0 .../channel-id-7036-gate-second-sensor.json | 0 .../io-device-id-2796-RGB-with-channels.json | 0 .../io-device-id-2832-gate-open-close.json | 0 55 files changed, 24 insertions(+), 7 deletions(-) rename {addons/binding => bundles}/org.openhab.binding.supla/.classpath (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/.project (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/ESH-INF/binding/binding.xml (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/ESH-INF/i18n/supla_xx_XX.properties (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/ESH-INF/thing/bridge.xml (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/ESH-INF/thing/supla-cloud-bridge.xml (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml (92%) rename {addons/binding => bundles}/org.openhab.binding.supla/META-INF/MANIFEST.MF (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/OSGI-INF/.gitignore (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/README.md (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/about.html (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/build.properties (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/add-device.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/add-server.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/configure-server.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/configure-supla-device.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/discover-server.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/discovery-device.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/doc/link-channel.PNG (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/lib/nettyServer-fat-0.9.15.jar (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/lib/swagger-java-client-fat-2.0.2.jar (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/pom.xml (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java (97%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/AbstractDeviceHandler.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudBridgeHandler.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudDeviceHandler.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaCloudBridgeHandler.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaDeviceHandler.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelCallback.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelValueToState.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ReadWriteMonad.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaConfiguration.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistry.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistryImpl.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaHandlerFactory.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/AdditionalChannelType.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ApiClientFactory.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelFunctionDispatcher.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java (77%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelInfo.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java (98%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/HsbTypeConverter.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/LedCommandExecutor.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/OneLineHttpLoggingInterceptor.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java (95%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/FindStateFunctionSwitch.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/BridgeDiscovery.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/SuplaDiscoveryService.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/server/SuplaChannel.java (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/channel-id-6961-LED.json (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/channel-id-7035-open-close-gate.json (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-first-sensor.json (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-second-sensor.json (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2796-RGB-with-channels.json (100%) rename {addons/binding => bundles}/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2832-gate-open-close.json (100%) diff --git a/addons/binding/org.openhab.binding.supla/.classpath b/bundles/org.openhab.binding.supla/.classpath similarity index 100% rename from addons/binding/org.openhab.binding.supla/.classpath rename to bundles/org.openhab.binding.supla/.classpath diff --git a/addons/binding/org.openhab.binding.supla/.project b/bundles/org.openhab.binding.supla/.project similarity index 100% rename from addons/binding/org.openhab.binding.supla/.project rename to bundles/org.openhab.binding.supla/.project diff --git a/addons/binding/org.openhab.binding.supla/ESH-INF/binding/binding.xml b/bundles/org.openhab.binding.supla/ESH-INF/binding/binding.xml similarity index 100% rename from addons/binding/org.openhab.binding.supla/ESH-INF/binding/binding.xml rename to bundles/org.openhab.binding.supla/ESH-INF/binding/binding.xml diff --git a/addons/binding/org.openhab.binding.supla/ESH-INF/i18n/supla_xx_XX.properties b/bundles/org.openhab.binding.supla/ESH-INF/i18n/supla_xx_XX.properties similarity index 100% rename from addons/binding/org.openhab.binding.supla/ESH-INF/i18n/supla_xx_XX.properties rename to bundles/org.openhab.binding.supla/ESH-INF/i18n/supla_xx_XX.properties diff --git a/addons/binding/org.openhab.binding.supla/ESH-INF/thing/bridge.xml b/bundles/org.openhab.binding.supla/ESH-INF/thing/bridge.xml similarity index 100% rename from addons/binding/org.openhab.binding.supla/ESH-INF/thing/bridge.xml rename to bundles/org.openhab.binding.supla/ESH-INF/thing/bridge.xml diff --git a/addons/binding/org.openhab.binding.supla/ESH-INF/thing/supla-cloud-bridge.xml b/bundles/org.openhab.binding.supla/ESH-INF/thing/supla-cloud-bridge.xml similarity index 100% rename from addons/binding/org.openhab.binding.supla/ESH-INF/thing/supla-cloud-bridge.xml rename to bundles/org.openhab.binding.supla/ESH-INF/thing/supla-cloud-bridge.xml diff --git a/addons/binding/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml similarity index 92% rename from addons/binding/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml rename to bundles/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml index 507e6bc4111cb..804d3c017032f 100644 --- a/addons/binding/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.supla/ESH-INF/thing/thing-types.xml @@ -97,6 +97,18 @@ + + String + + + + + + + + + + String diff --git a/addons/binding/org.openhab.binding.supla/META-INF/MANIFEST.MF b/bundles/org.openhab.binding.supla/META-INF/MANIFEST.MF similarity index 100% rename from addons/binding/org.openhab.binding.supla/META-INF/MANIFEST.MF rename to bundles/org.openhab.binding.supla/META-INF/MANIFEST.MF diff --git a/addons/binding/org.openhab.binding.supla/OSGI-INF/.gitignore b/bundles/org.openhab.binding.supla/OSGI-INF/.gitignore similarity index 100% rename from addons/binding/org.openhab.binding.supla/OSGI-INF/.gitignore rename to bundles/org.openhab.binding.supla/OSGI-INF/.gitignore diff --git a/addons/binding/org.openhab.binding.supla/README.md b/bundles/org.openhab.binding.supla/README.md similarity index 100% rename from addons/binding/org.openhab.binding.supla/README.md rename to bundles/org.openhab.binding.supla/README.md diff --git a/addons/binding/org.openhab.binding.supla/about.html b/bundles/org.openhab.binding.supla/about.html similarity index 100% rename from addons/binding/org.openhab.binding.supla/about.html rename to bundles/org.openhab.binding.supla/about.html diff --git a/addons/binding/org.openhab.binding.supla/build.properties b/bundles/org.openhab.binding.supla/build.properties similarity index 100% rename from addons/binding/org.openhab.binding.supla/build.properties rename to bundles/org.openhab.binding.supla/build.properties diff --git a/addons/binding/org.openhab.binding.supla/doc/add-device.PNG b/bundles/org.openhab.binding.supla/doc/add-device.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/add-device.PNG rename to bundles/org.openhab.binding.supla/doc/add-device.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/add-server.PNG b/bundles/org.openhab.binding.supla/doc/add-server.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/add-server.PNG rename to bundles/org.openhab.binding.supla/doc/add-server.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/configure-server.PNG b/bundles/org.openhab.binding.supla/doc/configure-server.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/configure-server.PNG rename to bundles/org.openhab.binding.supla/doc/configure-server.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/configure-supla-device.PNG b/bundles/org.openhab.binding.supla/doc/configure-supla-device.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/configure-supla-device.PNG rename to bundles/org.openhab.binding.supla/doc/configure-supla-device.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/discover-server.PNG b/bundles/org.openhab.binding.supla/doc/discover-server.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/discover-server.PNG rename to bundles/org.openhab.binding.supla/doc/discover-server.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/discovery-device.PNG b/bundles/org.openhab.binding.supla/doc/discovery-device.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/discovery-device.PNG rename to bundles/org.openhab.binding.supla/doc/discovery-device.PNG diff --git a/addons/binding/org.openhab.binding.supla/doc/link-channel.PNG b/bundles/org.openhab.binding.supla/doc/link-channel.PNG similarity index 100% rename from addons/binding/org.openhab.binding.supla/doc/link-channel.PNG rename to bundles/org.openhab.binding.supla/doc/link-channel.PNG diff --git a/addons/binding/org.openhab.binding.supla/lib/nettyServer-fat-0.9.15.jar b/bundles/org.openhab.binding.supla/lib/nettyServer-fat-0.9.15.jar similarity index 100% rename from addons/binding/org.openhab.binding.supla/lib/nettyServer-fat-0.9.15.jar rename to bundles/org.openhab.binding.supla/lib/nettyServer-fat-0.9.15.jar diff --git a/addons/binding/org.openhab.binding.supla/lib/swagger-java-client-fat-2.0.2.jar b/bundles/org.openhab.binding.supla/lib/swagger-java-client-fat-2.0.2.jar similarity index 100% rename from addons/binding/org.openhab.binding.supla/lib/swagger-java-client-fat-2.0.2.jar rename to bundles/org.openhab.binding.supla/lib/swagger-java-client-fat-2.0.2.jar diff --git a/addons/binding/org.openhab.binding.supla/pom.xml b/bundles/org.openhab.binding.supla/pom.xml similarity index 100% rename from addons/binding/org.openhab.binding.supla/pom.xml rename to bundles/org.openhab.binding.supla/pom.xml diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java similarity index 97% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java index 5fdefdfd40c15..d24979cbc431c 100644 --- a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java +++ b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/SuplaBindingConstants.java @@ -69,6 +69,7 @@ public static class Channels { public static final String HUMIDITY_CHANNEL_ID = "humidity-channel"; public static final String TEMPERATURE_AND_HUMIDITY_CHANNEL_ID = "temperature-and-humidity-channel"; public static final String DIMMER_CHANNEL_ID = "dimmer-channel"; + public static final String TOGGLE_GAT_CHANNEL_ID = "toggle-gate-channel"; public static final String UNKNOWN_CHANNEL_ID = "unknown-channel"; } } diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/AbstractDeviceHandler.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/AbstractDeviceHandler.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/AbstractDeviceHandler.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/AbstractDeviceHandler.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudBridgeHandler.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudBridgeHandler.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudBridgeHandler.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudBridgeHandler.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudDeviceHandler.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudDeviceHandler.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudDeviceHandler.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/CloudDeviceHandler.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaCloudBridgeHandler.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaCloudBridgeHandler.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaCloudBridgeHandler.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaCloudBridgeHandler.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaDeviceHandler.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaDeviceHandler.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaDeviceHandler.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/handler/SuplaDeviceHandler.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelCallback.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelCallback.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelCallback.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelCallback.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelValueToState.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelValueToState.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelValueToState.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ChannelValueToState.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ReadWriteMonad.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ReadWriteMonad.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ReadWriteMonad.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/ReadWriteMonad.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaConfiguration.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaConfiguration.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaConfiguration.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaConfiguration.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistry.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistry.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistry.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistry.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistryImpl.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistryImpl.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistryImpl.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaDeviceRegistryImpl.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaHandlerFactory.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaHandlerFactory.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaHandlerFactory.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/SuplaHandlerFactory.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/AdditionalChannelType.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/AdditionalChannelType.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/AdditionalChannelType.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/AdditionalChannelType.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ApiClientFactory.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ApiClientFactory.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ApiClientFactory.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ApiClientFactory.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelFunctionDispatcher.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelFunctionDispatcher.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelFunctionDispatcher.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelFunctionDispatcher.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java similarity index 77% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java index 604de6fea8f62..8978cb7229007 100644 --- a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java +++ b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelIfoParser.java @@ -22,14 +22,15 @@ public ChannelInfo parse(ChannelUID channelUID) { } else { trimmedId = fullId; } - return new ChannelInfo(parse(trimmedId), additionalChannelType.orElse(null)); + return new ChannelInfo(parse(trimmedId, fullId), additionalChannelType.orElse(null)); } - private int parse(String id) { + private int parse(String id, String fullId) { try { return Integer.parseInt(id); } catch (NumberFormatException ex) { - throw new IllegalArgumentException("Given id `" + id + "` is not int!", ex); + throw new IllegalArgumentException("Given id `" + id + "` is not int! Full ID = `" + fullId + "`", ex); } } } +// ZjA0MWIwZWZmYWE5MTEzZGM3NDU3NjZjZDQ1ZTA3MTNjNGViNDUzOGYyNGQ3NjU2YTc5NGZkMTkzZjIzOTBhYQ.aHR0cHM6Ly9zdnIxOS5zdXBsYS5vcmc= \ No newline at end of file diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelInfo.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelInfo.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelInfo.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/ChannelInfo.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java similarity index 98% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java index 80bd027136f0d..35c90d2b43413 100644 --- a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java +++ b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/CloudDiscovery.java @@ -8,7 +8,6 @@ import org.openhab.binding.supla.handler.CloudBridgeHandler; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import pl.grzeslowski.jsupla.api.ApiClientFactory; import pl.grzeslowski.jsupla.api.generated.ApiClient; import pl.grzeslowski.jsupla.api.generated.ApiException; import pl.grzeslowski.jsupla.api.generated.api.IoDevicesApi; diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/HsbTypeConverter.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/HsbTypeConverter.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/HsbTypeConverter.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/HsbTypeConverter.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/LedCommandExecutor.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/LedCommandExecutor.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/LedCommandExecutor.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/LedCommandExecutor.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/OneLineHttpLoggingInterceptor.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/OneLineHttpLoggingInterceptor.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/OneLineHttpLoggingInterceptor.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/OneLineHttpLoggingInterceptor.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java similarity index 95% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java index 23db5acf19deb..441e45c323958 100644 --- a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java +++ b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/CreateChannelFunctionSwitch.java @@ -14,7 +14,6 @@ import java.util.List; import static com.google.common.base.Strings.isNullOrEmpty; -import static java.lang.String.valueOf; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; import static java.util.Objects.requireNonNull; @@ -28,6 +27,7 @@ import static org.openhab.binding.supla.SuplaBindingConstants.Channels.SWITCH_CHANNEL_RO_ID; import static org.openhab.binding.supla.SuplaBindingConstants.Channels.TEMPERATURE_AND_HUMIDITY_CHANNEL_ID; import static org.openhab.binding.supla.SuplaBindingConstants.Channels.TEMPERATURE_CHANNEL_ID; +import static org.openhab.binding.supla.SuplaBindingConstants.Channels.TOGGLE_GAT_CHANNEL_ID; @SuppressWarnings("PackageAccessibility") public class CreateChannelFunctionSwitch implements ChannelFunctionDispatcher.FunctionSwitch> { @@ -50,12 +50,12 @@ public List onControllingTheGatewayLock(pl.grzeslowski.jsupla.api.gener @Override public List onControllingTheGate(pl.grzeslowski.jsupla.api.generated.model.Channel channel) { - return createSwitchChannel(channel); + return createToggleGateChannel(channel); } @Override public List onControllingTheGarageDoor(pl.grzeslowski.jsupla.api.generated.model.Channel channel) { - return createSwitchChannel(channel); + return createToggleGateChannel(channel); } @Override @@ -230,6 +230,10 @@ private List createSwitchChannel(pl.grzeslowski.jsupla.api.generated.mo } } + private List createToggleGateChannel(pl.grzeslowski.jsupla.api.generated.model.Channel channel) { + return singletonList(createChannel(channel, TOGGLE_GAT_CHANNEL_ID, "String")); + } + private List createLedChannels(final pl.grzeslowski.jsupla.api.generated.model.Channel channel) { return singletonList(createChannel(channel, RGB_CHANNEL_ID, "Color")); } diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/FindStateFunctionSwitch.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/FindStateFunctionSwitch.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/FindStateFunctionSwitch.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/cloud/functionswitch/FindStateFunctionSwitch.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/BridgeDiscovery.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/BridgeDiscovery.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/BridgeDiscovery.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/BridgeDiscovery.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/SuplaDiscoveryService.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/SuplaDiscoveryService.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/SuplaDiscoveryService.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/discovery/SuplaDiscoveryService.java diff --git a/addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/server/SuplaChannel.java b/bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/server/SuplaChannel.java similarity index 100% rename from addons/binding/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/server/SuplaChannel.java rename to bundles/org.openhab.binding.supla/src/main/java/org/openhab/binding/supla/internal/server/SuplaChannel.java diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-6961-LED.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-6961-LED.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-6961-LED.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-6961-LED.json diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7035-open-close-gate.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7035-open-close-gate.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7035-open-close-gate.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7035-open-close-gate.json diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-first-sensor.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-first-sensor.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-first-sensor.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-first-sensor.json diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-second-sensor.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-second-sensor.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-second-sensor.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/channel-id-7036-gate-second-sensor.json diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2796-RGB-with-channels.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2796-RGB-with-channels.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2796-RGB-with-channels.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2796-RGB-with-channels.json diff --git a/addons/binding/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2832-gate-open-close.json b/bundles/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2832-gate-open-close.json similarity index 100% rename from addons/binding/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2832-gate-open-close.json rename to bundles/org.openhab.binding.supla/supla-cloud-responses/io-device-id-2832-gate-open-close.json