diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeBindingConstants.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeBindingConstants.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeBindingConstants.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeBindingConstants.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeDiscoveryService.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeDiscoveryService.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeDiscoveryService.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeDiscoveryService.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeHandlerFactory.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeHandlerFactory.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/FreeAtHomeHandlerFactory.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/FreeAtHomeHandlerFactory.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/configuration/FreeAtHomeBridgeHandlerConfiguration.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/configuration/FreeAtHomeBridgeHandlerConfiguration.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/configuration/FreeAtHomeBridgeHandlerConfiguration.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/configuration/FreeAtHomeBridgeHandlerConfiguration.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/configuration/FreeAtHomeDeviceHandlerConfiguration.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/configuration/FreeAtHomeDeviceHandlerConfiguration.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/configuration/FreeAtHomeDeviceHandlerConfiguration.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/configuration/FreeAtHomeDeviceHandlerConfiguration.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDatapoint.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapoint.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDatapoint.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapoint.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDatapointGroup.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapointGroup.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDatapointGroup.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDatapointGroup.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDeviceChannel.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDeviceChannel.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDeviceChannel.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDeviceChannel.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDeviceDescription.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDeviceDescription.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/datamodel/FreeAtHomeDeviceDescription.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/datamodel/FreeAtHomeDeviceDescription.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeBridgeHandler.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeBridgeHandler.java similarity index 99% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeBridgeHandler.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeBridgeHandler.java index cf719f0e710..e7f82d06e04 100644 --- a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeBridgeHandler.java +++ b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeBridgeHandler.java @@ -429,9 +429,10 @@ public class FreeAtHomeBridgeHandler extends BaseBridgeHandler implements WebSoc if (deviceHandler != null) { deviceHandler.onDeviceStateChanged(eventDatapointID, value); + logger.debug("Socket event processed: event-datapoint-ID {} value {}", eventDatapointID, value); + } else { + logger.debug("Socket event not processed: event-datapoint-ID {} value {}", eventDatapointID, value); } - - logger.debug("Socket event processed: event-datapoint-ID {} value {}", eventDatapointID, value); } } } diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeDeviceHandler.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeDeviceHandler.java similarity index 98% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeDeviceHandler.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeDeviceHandler.java index 2165ae3cb2d..35a7d21e920 100644 --- a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeDeviceHandler.java +++ b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeDeviceHandler.java @@ -291,7 +291,6 @@ public class FreeAtHomeDeviceHandler extends BaseThingHandler implements FreeAtH if (dpg == null) { logger.debug("Handle command for device (but invalid datapointgroup) {} - at channel {} - full command {}", device.getDeviceId(), channelUID.getAsString(), command.toFullString()); - updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "@text/conf-error.invalid-deviceconfig"); } else { @@ -480,8 +479,7 @@ public class FreeAtHomeDeviceHandler extends BaseThingHandler implements FreeAtH channelTypeUID = createChannelTypeForDatapointgroup(dpg, channelTypeUID); } - ChannelUID channelUID = new ChannelUID(thingUID, channel.getChannelId(), - dpg.getLabel().substring(4)); + ChannelUID channelUID = createChannelUID(thingUID, channel.getChannelId(), dpg.getLabel()); String channelLabel = String.format("%s", i18nProvider.getText(bundle, dpg.getLabel(), "-", locale)); @@ -568,7 +566,7 @@ public class FreeAtHomeDeviceHandler extends BaseThingHandler implements FreeAtH channelTypeUID = createChannelTypeForDatapointgroup(dpg, channelTypeUID); } - ChannelUID channelUID = new ChannelUID(thingUID, channel.getChannelId()); + ChannelUID channelUID = createChannelUID(thingUID, channel.getChannelId(), dpg.getLabel()); FreeAtHomeDatapoint outputDatapoint = dpg.getOutputDatapoint(); @@ -589,6 +587,11 @@ public class FreeAtHomeDeviceHandler extends BaseThingHandler implements FreeAtH } } + // Create a channel UID. Makes sure that the channel UID is unique and generated the same way every time + private ChannelUID createChannelUID(ThingUID thingUID, String channelID, String dpgLabel) { + return new ChannelUID(thingUID, channelID, dpgLabel.substring(4)); + } + public void removeChannels() { Bridge bridge = this.getBridge(); diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeDeviceStateListener.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeDeviceStateListener.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/handler/FreeAtHomeDeviceStateListener.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/handler/FreeAtHomeDeviceStateListener.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeChannelTypeProvider.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeChannelTypeProvider.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeChannelTypeProvider.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeChannelTypeProvider.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeChannelTypeProviderImpl.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeChannelTypeProviderImpl.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeChannelTypeProviderImpl.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeChannelTypeProviderImpl.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeThingTypeProvider.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeThingTypeProvider.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeThingTypeProvider.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeThingTypeProvider.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeThingTypeProviderImpl.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeThingTypeProviderImpl.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/type/FreeAtHomeThingTypeProviderImpl.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/type/FreeAtHomeThingTypeProviderImpl.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FidTranslationUtils.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FidTranslationUtils.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FidTranslationUtils.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FidTranslationUtils.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FreeAtHomeGeneralException.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FreeAtHomeGeneralException.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FreeAtHomeGeneralException.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FreeAtHomeGeneralException.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FreeAtHomeHttpCommunicationException.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FreeAtHomeHttpCommunicationException.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/FreeAtHomeHttpCommunicationException.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/FreeAtHomeHttpCommunicationException.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/PIdContainerClass.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/PIdContainerClass.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/PIdContainerClass.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/PIdContainerClass.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/PidTranslationUtils.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/PidTranslationUtils.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/PidTranslationUtils.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/PidTranslationUtils.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/UidUtils.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/UidUtils.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/util/UidUtils.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/util/UidUtils.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/BinaryValueStateConverter.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/BinaryValueStateConverter.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/BinaryValueStateConverter.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/BinaryValueStateConverter.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/BooleanValueStateConverter.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/BooleanValueStateConverter.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/BooleanValueStateConverter.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/BooleanValueStateConverter.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/DecimalValueStateConverter.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/DecimalValueStateConverter.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/DecimalValueStateConverter.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/DecimalValueStateConverter.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/ShuttercontrolValueStateConverter.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/ShuttercontrolValueStateConverter.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/ShuttercontrolValueStateConverter.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/ShuttercontrolValueStateConverter.java diff --git a/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/ValueStateConverter.java b/bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/ValueStateConverter.java similarity index 100% rename from bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathomesystem/internal/valuestateconverter/ValueStateConverter.java rename to bundles/org.openhab.binding.freeathome/src/main/java/org/openhab/binding/freeathome/internal/valuestateconverter/ValueStateConverter.java