diff --git a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/BaseDevice.java b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/BaseDevice.java index fb77a0f3535..12fd6704524 100644 --- a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/BaseDevice.java +++ b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/BaseDevice.java @@ -564,16 +564,10 @@ public abstract class BaseDevice<@NonNull T extends DeviceAddress, @NonNull S ex public void requestReplied(Msg msg) { DeviceFeature feature = getFeatureQueried(); if (feature != null && feature.isMyReply(msg)) { - if (msg.isReplyAck()) { - // mark feature queried as acked - feature.setQueryStatus(QueryStatus.QUERY_ACKED); - } else { - logger.debug("got a reply nack msg: {}", msg); - // mark feature queried as processed and answered - setFeatureQueried(null); - feature.setQueryMessage(null); - feature.setQueryStatus(QueryStatus.QUERY_ANSWERED); - } + // mark feature queried as processed and answered + setFeatureQueried(null); + feature.setQueryMessage(null); + feature.setQueryStatus(QueryStatus.QUERY_ANSWERED); } } diff --git a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/InsteonDevice.java b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/InsteonDevice.java index 5b62dd134e9..f0f02643e6f 100644 --- a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/InsteonDevice.java +++ b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/InsteonDevice.java @@ -906,6 +906,25 @@ public class InsteonDevice extends BaseDevice> 4); + this.houseCode = (byte) (address >> 4 & 0x0F); this.unitCode = (byte) (address & 0x0F); } @@ -49,7 +49,7 @@ public class X10Address implements DeviceAddress { } public X10Address(String address) throws IllegalArgumentException { - String[] parts = address.replace(".", "").split(""); + String[] parts = address.replace(".", "").split("", 2); if (parts.length != 2) { throw new IllegalArgumentException("Invalid X10 address format"); } diff --git a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/MessageDispatcher.java b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/MessageDispatcher.java index 0dcadd636bc..0c395a7f8d1 100644 --- a/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/MessageDispatcher.java +++ b/bundles/org.openhab.binding.insteon/src/main/java/org/openhab/binding/insteon/internal/device/feature/MessageDispatcher.java @@ -242,11 +242,13 @@ public abstract class MessageDispatcher extends BaseFeatureHandler { @Override public boolean dispatch(Msg msg) { try { - byte cmd = msg.getByte("rawX10"); - MessageHandler handler = feature.getOrDefaultMsgHandler(cmd); - logger.debug("{}:{}->{} X10", getX10Device().getAddress(), feature.getName(), - handler.getClass().getSimpleName()); - handler.handleMessage(cmd, msg); + if (msg.isX10Command()) { + byte cmd = (byte) (msg.getByte("rawX10") & 0x0F); + MessageHandler handler = feature.getOrDefaultMsgHandler(cmd); + logger.debug("{}:{}->{} X10", getX10Device().getAddress(), feature.getName(), + handler.getClass().getSimpleName()); + handler.handleMessage(cmd, msg); + } } catch (FieldException e) { logger.warn("error parsing, dropping msg {}", msg); }