diff --git a/addons/binding/org.openhab.binding.miio/ESH-INF/thing/CommonChannels.xml b/addons/binding/org.openhab.binding.miio/ESH-INF/thing/CommonChannels.xml index bbff21832f4f7..67ee0f120bb80 100644 --- a/addons/binding/org.openhab.binding.miio/ESH-INF/thing/CommonChannels.xml +++ b/addons/binding/org.openhab.binding.miio/ESH-INF/thing/CommonChannels.xml @@ -40,7 +40,6 @@ String - Switch @@ -75,6 +74,10 @@ Number + + Number + + Number @@ -87,7 +90,6 @@ Number - Number @@ -108,6 +110,10 @@ Color + + Color + + diff --git a/addons/binding/org.openhab.binding.miio/database/yeelink.light.ceiling4.json b/addons/binding/org.openhab.binding.miio/database/yeelink.light.ceiling4.json new file mode 100644 index 0000000000000..eb92471417b06 --- /dev/null +++ b/addons/binding/org.openhab.binding.miio/database/yeelink.light.ceiling4.json @@ -0,0 +1,121 @@ +{ + "deviceMapping": { + "id": [ + "yeelink.light.ceiling4" + ], + "channels": [ + { + "property": "power", + "friendlyName": "Power", + "channel": "power", + "type": "Switch", + "refresh": true, + "ChannelGroup": "", + "actions": [ + { + "command": "set_power", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "bright", + "friendlyName": "Brightness", + "channel": "brightness", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "set_bright", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "delayoff", + "friendlyName": "delayoff", + "channel": "delayoff", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "set_ct", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "ct", + "friendlyName": "Color Temperature ", + "channel": "colorTemperature", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "set_ct_abx", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "color_mode", + "friendlyName": "colorMode", + "channel": "colorMode", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "set_scene", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "name", + "friendlyName": "Name", + "channel": "name", + "type": "String", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "set_name", + "parameterType": "STRING" + } + ] + }, + { + "property": "bg_rgb", + "friendlyName": "Ambient Color", + "channel": "ambientColor", + "type": "Color", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "bg_set_rgb", + "parameterType": "COLOR" + } + ] + }, + { + "property": "bg_ct", + "friendlyName": "Ambient Color Temperature ", + "channel": "ambientColorTemperature", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "bg_set_ct_abx", + "parameterType": "NUMBER" + } + ] + } + ] + } +} diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConfiguration.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConfiguration.java index d84eb82c4a1b7..61e224823a971 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConfiguration.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConfiguration.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConstants.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConstants.java index 4497aab9ea76c..9db7bf38dad2c 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConstants.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/MiIoBindingConstants.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoAbstractHandler.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoAbstractHandler.java index be53e92d06cc9..3c62afd17257a 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoAbstractHandler.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoAbstractHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -124,7 +124,7 @@ private boolean tolkenCheckPass(String tokenSting) { .hexStringToByteArray(MiIoCrypto.decryptTolken(Utils.hexStringToByteArray(tokenSting))); logger.debug("IOS token decrypted to {}", Utils.getHex(token)); } catch (MiIoCryptoException e) { - logger.warn("Could not decrypt token {}", tokenSting, e.getMessage()); + logger.warn("Could not decrypt token {}{}", tokenSting, e.getMessage()); return false; } return true; diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoBasicHandler.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoBasicHandler.java index 4751a9f156fad..cda5f5cc1dc8f 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoBasicHandler.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoBasicHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -10,6 +10,7 @@ import static org.openhab.binding.miio.MiIoBindingConstants.CHANNEL_COMMAND; +import java.awt.Color; import java.io.IOException; import java.net.URL; import java.util.ArrayList; @@ -126,10 +127,13 @@ public void handleCommand(ChannelUID channelUID, Command command) { } } else if (command instanceof StringType) { cmd = cmd + "[\"" + command.toString() + "\"]"; + } else if (command instanceof HSBType) { + HSBType hsb = (HSBType) command; + Color color = Color.getHSBColor(hsb.getHue().floatValue() / 360, + hsb.getSaturation().floatValue() / 100, hsb.getBrightness().floatValue() / 100); + cmd = cmd + "[" + ((color.getRed() * 65536) + (color.getGreen() * 256) + color.getBlue()) + "]"; } else if (command instanceof DecimalType) { cmd = cmd + "[" + command.toString().toLowerCase() + "]"; - } else if (command instanceof HSBType) { - cmd = cmd + "[" + ((HSBType) command).getRGB() + "]"; } logger.debug("Sending command {}", cmd); sendCommand(cmd); @@ -236,7 +240,7 @@ private URL findDatabaseEntry(String deviceName) { Bundle bundle = FrameworkUtil.getBundle(getClass()); fn = bundle.getEntry(MiIoBindingConstants.DATABASE_PATH + deviceName + ".json"); if (fn != null) { - logger.trace("bundle: {}, {}, {}", bundle, fn.getFile()); + logger.trace("bundle: {}, {}", bundle, fn.getFile()); return fn; } for (URL db : Collections.list(bundle.findEntries(MiIoBindingConstants.DATABASE_PATH, "*.json", false))) { @@ -314,7 +318,8 @@ private boolean buildChannelStructure(String deviceName) { private boolean addChannel(ThingBuilder thingBuilder, String channel, String channelType, String datatype, String friendlyName) { if (channel == null || channel.isEmpty() || datatype == null || datatype.isEmpty()) { - logger.info("Channel '{}' cannot be added incorrectly configured database. ", channel, getThing().getUID()); + logger.info("Channel '{}', UID '{}' cannot be added incorrectly configured database. ", channel, + getThing().getUID()); return false; } ChannelUID channelUID = new ChannelUID(getThing().getUID(), channel); @@ -376,10 +381,9 @@ void updateProperties(MiIoSendCommand response) { val.getAsString().toLowerCase().equals("on") ? OnOffType.ON : OnOffType.OFF); } if (basicChannel.getType().equals("Color")) { - // TODO: very experimental - HSBType color = HSBType.fromRGB((val.getAsInt() >> 16) & 0xFF, (val.getAsInt() >> 8) & 0xFF, - val.getAsInt() & 0xFF); - updateState(basicChannel.getChannel(), color); + Color rgb = new Color(val.getAsInt()); + HSBType hsb = HSBType.fromRGB(rgb.getRed(), rgb.getGreen(), rgb.getBlue()); + updateState(basicChannel.getChannel(), hsb); } } catch (Exception e) { logger.debug("Error updating propery {} with '{}' : {}", basicChannel.getChannel(), diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoGenericHandler.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoGenericHandler.java index 81c3d77259bee..de84678d7e233 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoGenericHandler.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoGenericHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoUnsupportedHandler.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoUnsupportedHandler.java index e7b762442658f..0f379d1b4f978 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoUnsupportedHandler.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoUnsupportedHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoVacuumHandler.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoVacuumHandler.java index c76a452b37572..3df7fa8c0f57d 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoVacuumHandler.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/handler/MiIoVacuumHandler.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -267,7 +267,7 @@ protected boolean skipUpdate() { return true; } if (ThingStatusDetail.CONFIGURATION_ERROR.equals(getThing().getStatusInfo().getStatusDetail())) { - logger.debug("Skipping periodic update for '{}'. Thing Status", getThing().getUID().toString(), + logger.debug("Skipping periodic update for '{}' UID '{}'. Thing Status", getThing().getUID().toString(), getThing().getStatusInfo().getStatusDetail()); refreshNetwork(); return true; @@ -293,7 +293,7 @@ protected synchronized void updateData() { refreshNetwork(); consumables.getValue(); } catch (Exception e) { - logger.debug("Error while updating '{}': ", getThing().getUID().toString(), e.getLocalizedMessage(), e); + logger.debug("Error while updating '{}': '{}", getThing().getUID().toString(), e.getLocalizedMessage()); } } diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Message.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Message.java index a72fd194851c8..33197f125dcb0 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Message.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Message.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java index f2a4e9d4ae65b..bc8ded40eb923 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCommand.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCrypto.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCrypto.java index 9fdb5487ef3e5..b24cc898c0540 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCrypto.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCrypto.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCryptoException.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCryptoException.java index aab52f979e3ef..e8a22a768a99a 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCryptoException.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoCryptoException.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java index 396a9e6eb0638..aa02989bc63de 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -66,6 +66,8 @@ public enum MiIoDevices { YEELIGHT_CEIL1("yeelink.light.ceiling1", "Yeelight LED Ceiling Lamp", MiIoBindingConstants.THING_TYPE_BASIC), YEELIGHT_CEIL2("yeelink.light.ceiling2", "Yeelight LED Ceiling Lamp v2", MiIoBindingConstants.THING_TYPE_BASIC), YEELIGHT_CEIL3("yeelink.light.ceiling3", "Yeelight LED Ceiling Lamp v3", MiIoBindingConstants.THING_TYPE_BASIC), + YEELIGHT_CEIL4("yeelink.light.ceiling4", "Yeelight LED Ceiling Lamp v4 (JIAOYUE 650 RGB)", + MiIoBindingConstants.THING_TYPE_BASIC), YEELIGHT_L1("yeelink.light.lamp1", "Yeelight", MiIoBindingConstants.THING_TYPE_BASIC), YEELIGHT_M1("yeelink.light.mono1", "Yeelight White Bulb", MiIoBindingConstants.THING_TYPE_BASIC), YEELIGHT_M2("yeelink.light.mono2", "Yeelight White Bulb v2", MiIoBindingConstants.THING_TYPE_BASIC), diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java index 169ff278ed18a..4553551b9ec87 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoMessageListener.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoMessageListener.java index 663688c145cbc..efc468b9eadd2 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoMessageListener.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoMessageListener.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java index 24510b9c0d300..5c1e5894a0c6e 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Utils.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Utils.java index d0e9ece3cb4c8..7c1613214e6d7 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Utils.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/Utils.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/CommandParameterType.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/CommandParameterType.java index 2ed81bf493233..7c0834dd9d1bb 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/CommandParameterType.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/CommandParameterType.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java index 1671834c82c4e..b9f4decaa7892 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/Conversions.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/DeviceMapping.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/DeviceMapping.java index 4458e08c78adc..5de0e6119eeed 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/DeviceMapping.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/DeviceMapping.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java index 0cdc9826e34d0..ab9093346050a 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicDevice.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicDevice.java index 3ea8c225c491b..ffcc1abb202c3 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicDevice.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicDevice.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDeviceAction.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDeviceAction.java index be63276df61fa..2bc1af865c4d1 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDeviceAction.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoDeviceAction.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java index 5a7393467b83e..1785bf1f9bb75 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscovery.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscoveryParticipant.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscoveryParticipant.java index 6c9a71ffdca4c..59c0b073c2398 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscoveryParticipant.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/discovery/MiIoDiscoveryParticipant.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/ConsumablesType.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/ConsumablesType.java index 17f416d3a2137..65883b5316714 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/ConsumablesType.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/ConsumablesType.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/FanModeType.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/FanModeType.java index 3f4858cd8188a..aa1a0bf02408a 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/FanModeType.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/FanModeType.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/StatusType.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/StatusType.java index 5a5427c70388a..eefb72599a9ee 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/StatusType.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/StatusType.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/VacuumErrorType.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/VacuumErrorType.java index a9dbf28c0ca62..f9de6ba64306b 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/VacuumErrorType.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/robot/VacuumErrorType.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 diff --git a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java index 143142ef312ff..78352dd1e0099 100644 --- a/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java +++ b/addons/binding/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java @@ -1,5 +1,5 @@ /** - * Copyright (c) 2010-2017 by the respective copyright holders. + * Copyright (c) 2010-2018 by the respective copyright holders. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -204,7 +204,7 @@ public void run() { MiIoSendCommand queuedMessage = concurrentLinkedQueue.remove(); MiIoSendCommand miIoSendCommand = sendMiIoSendCommand(queuedMessage); for (MiIoMessageListener listener : listeners) { - logger.trace("inform listener {}, data {} from {}", listener); + logger.trace("inform listener {}, data {} from {}", listener, queuedMessage, miIoSendCommand); try { listener.onMessageReceived(miIoSendCommand); } catch (Exception e) { @@ -299,7 +299,7 @@ private void pingSuccess() { private void updateStatus(ThingStatus status, ThingStatusDetail statusDetail) { for (MiIoMessageListener listener : listeners) { - logger.trace("inform listener {}, data {} from {}", listener); + logger.trace("inform listener {}, data {} from {}", listener, status, statusDetail); try { listener.onStatusUpdated(status, statusDetail); } catch (Exception e) {