- **callbackHost**
Callback network address of the system runtime, default is auto-discovery
-- **bindAddress**
-The address the XML-/BINRPC server binds to, default is value of "callbackHost"
-
- **xmlCallbackPort**
Callback port of the binding's XML-RPC server, default is 9125 and counts up for each additional bridge
private int groupPort;
private String callbackHost;
- private String bindAddress;
private int xmlCallbackPort;
private int binCallbackPort;
this.callbackHost = callbackHost;
}
- /**
- * Returns the bind address.
- */
- public String getBindAddress() {
- return bindAddress;
- }
-
- /**
- * Sets the bind address.
- */
- public void setBindAddress(String bindAddress) {
- this.bindAddress = bindAddress;
- }
-
- /**
- * Sets the callback host port.
- *
- * @deprecated use setBinCallbackPort
- */
- @Deprecated
- public void setCallbackPort(int callbackPort) {
- this.binCallbackPort = callbackPort;
- }
-
/**
* Returns the XML-RPC callback host port.
*/
@Override
public String toString() {
return String.format(
- "%s[gatewayAddress=%s,callbackHost=%s,bindAddress=%s,xmlCallbackPort=%d,binCallbackPort=%d,"
+ "%s[gatewayAddress=%s,callbackHost=%s,xmlCallbackPort=%d,binCallbackPort=%d,"
+ "gatewayType=%s,rfPort=%d,wiredPort=%d,hmIpPort=%d,cuxdPort=%d,groupPort=%d,timeout=%d,"
+ "discoveryTimeToLive=%d,installModeDuration=%d,socketMaxAlive=%d]",
- getClass().getSimpleName(), gatewayAddress, callbackHost, bindAddress, xmlCallbackPort, binCallbackPort,
- gatewayType, getRfPort(), getWiredPort(), getHmIpPort(), getCuxdPort(), getGroupPort(), timeout,
- discoveryTimeToLive, installModeDuration, socketMaxAlive);
+ getClass().getSimpleName(), gatewayAddress, callbackHost, xmlCallbackPort, binCallbackPort, gatewayType,
+ getRfPort(), getWiredPort(), getHmIpPort(), getCuxdPort(), getGroupPort(), timeout, discoveryTimeToLive,
+ installModeDuration, socketMaxAlive);
}
}
import java.util.Objects;
import org.eclipse.jdt.annotation.NonNull;
+import org.openhab.binding.homematic.internal.misc.HomematicConstants;
import org.openhab.binding.homematic.internal.misc.MiscUtils;
import org.openhab.binding.homematic.internal.model.HmDatapoint;
import org.openhab.binding.homematic.internal.model.HmParamsetType;
if (dp.getUnit() == null && dp.getName() != null && dp.getName().startsWith("RSSI_")) {
dp.setUnit("dBm");
}
+ // Bypass: For at least one device the CCU does not send a unit together with the value
+ if (dp.getUnit() == null && dp.getName().startsWith(HomematicConstants.DATAPOINT_NAME_OPERATING_VOLTAGE))
+ dp.setUnit("V");
HmValueType valueType = HmValueType.parse(type);
if (valueType == null || valueType == HmValueType.UNKNOWN) {
serverSocket = new ServerSocket();
serverSocket.setReuseAddress(true);
- serverSocket.bind(new InetSocketAddress(config.getBindAddress(), config.getBinCallbackPort()));
+ serverSocket.bind(new InetSocketAddress(config.getBinCallbackPort()));
this.rpcResponseHandler = new RpcResponseHandler<byte[]>(listener) {
public void start() throws IOException {
logger.debug("Initializing XML-RPC server at port {}", config.getXmlCallbackPort());
- InetSocketAddress callbackAddress = new InetSocketAddress(config.getBindAddress(), config.getXmlCallbackPort());
+ InetSocketAddress callbackAddress = new InetSocketAddress(config.getXmlCallbackPort());
xmlRpcHTTPD = new Server(callbackAddress);
xmlRpcHTTPD.setHandler(jettyResponseHandler);
if (homematicConfig.getCallbackHost() == null) {
homematicConfig.setCallbackHost(this.ipv4Address);
}
- if (homematicConfig.getBindAddress() == null) {
- homematicConfig.setBindAddress(homematicConfig.getCallbackHost());
- }
if (homematicConfig.getXmlCallbackPort() == 0) {
homematicConfig.setXmlCallbackPort(portPool.getNextPort());
} else {
loadHomematicChannelValues(device.getChannel(0));
ThingStatus oldStatus = thing.getStatus();
+ if (oldStatus == ThingStatus.UNINITIALIZED)
+ return;
ThingStatus newStatus = ThingStatus.ONLINE;
ThingStatusDetail newDetail = ThingStatusDetail.NONE;
public static final String DATAPOINT_NAME_CALIBRATION = "CALIBRATION";
public static final String DATAPOINT_NAME_LOWBAT_IP = "LOW_BAT";
public static final String DATAPOINT_NAME_CHANNEL_FUNCTION = "CHANNEL_FUNCTION";
+ public static final String DATAPOINT_NAME_OPERATING_VOLTAGE = "OPERATING_VOLTAGE";
public static final String VIRTUAL_DATAPOINT_NAME_BATTERY_TYPE = "BATTERY_TYPE";
public static final String VIRTUAL_DATAPOINT_NAME_DELETE_DEVICE_MODE = "DELETE_DEVICE_MODE";
import java.util.Objects;
import org.openhab.binding.homematic.internal.misc.MiscUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Object that represents a Homematic device.
* @author Gerhard Riegler - Initial contribution
*/
public class HmDevice {
+ private final Logger logger = LoggerFactory.getLogger(HmDevice.class);
+
public static final String TYPE_GATEWAY_EXTRAS = "GATEWAY-EXTRAS";
public static final String ADDRESS_GATEWAY_EXTRAS = "GWE00000000";
String firmware) {
this.address = address;
this.hmInterface = hmInterface;
- this.type = type;
+ this.firmware = firmware;
+ if ("HM-ES-TX-WM".equals(type) && Float.valueOf(firmware) > 2.0) {
+ logger.debug("Found HM-ES-TX-WM with firmware version > 2.0, creating virtual type");
+ this.type = type + "2";
+ } else {
+ this.type = type;
+ }
this.gatewayId = gatewayId;
this.homegearId = homegearId;
- this.firmware = firmware;
}
/**
return ITEM_TYPE_NUMBER + ":Energy";
case "m3":
return ITEM_TYPE_NUMBER + ":Volume";
+ case "":
+ if (dpName.startsWith(DATAPOINT_NAME_OPERATING_VOLTAGE))
+ return ITEM_TYPE_NUMBER + ":ElectricPotential";
case "s":
case "min":
case "minutes":
case "month":
case "year":
case "100%":
- case "":
default:
return ITEM_TYPE_NUMBER;
}
<label>Callback Network Address</label>
<description>Callback network address of the runtime, default is auto-discovery</description>
</parameter>
- <parameter name="bindAddress" type="text">
- <context>network-address</context>
- <label>Bind Address</label>
- <description>The address the XML-/BINRPC server binds to, default is callbackHost</description>
- </parameter>
<parameter name="xmlCallbackPort" type="integer">
<label>XML-RPC Callback Port</label>
<description>Callback port of the binding's XML-RPC server. If no value is specified, xmlCallbackPort starts with
HmIP-WRC2=2x AAA/Micro/LR03
HmIP-eTRV=2x AA/Mignon/LR06
HmIP-eTRV-B=2x AA/Mignon/LR06
+HmIP-eTRV-C=2x AA/Mignon/LR06
+HmIP-eTRV-C-2=2x AA/Mignon/LR06
HmIP-SMI=2x AA/Mignon/LR06
HmIP-SPI=2x AA/Mignon/LR06
HmIP-SPDR=2x AA/Mignon/LR06
HM-Sec-SD-2=Wireless Smoke Detector
HM-WDS30-OT2-SM-2=Wireless Differential Temperature Sensor
HM-Sen-MDIR-O-2=Wireless Motion Detector, outdoor
+HM-ES-TX-WM2=Wireless Transmitter for Energy Meter Sensor Version 2
# MAX!
BC-RT-TRX-CyN=MAX! Radiator thermostat basic
HMIP-eTRV-2=Homematic IP Radiator thermostat
HMIP-eTRV-B=Homematic IP Radiator thermostat basic
HMIP-eTRV-C=Homematic IP Radiator thermostat compact
+HmIP-eTRV-C-2=Homematic IP Radiator thermostat compact
HmIP-SMI=Homematic IP motion detector with brightness sensor
HmIP-SMO=Homematic IP motion detector with brightness sensor - outdoor
HmIP-KRC4=Homematic IP Key Ring Remote Control - 4 buttons
HM-Sec-SD-2=Funk-Rauchmelder
HM-WDS30-OT2-SM-2=Funk-Temperaturdifferenzsensor
HM-Sen-MDIR-O-2=Funk-Bewegungsmelder außen
+HM-ES-TX-WM2=Funk-Sender für Energiezähler-Sensor Version 2
# MAX!
BC-RT-TRX-CyN=MAX! Heizkörperthermostat Basic
HMIP-eTRV-2=Homematic IP Heizkörperthermostat
HMIP-eTRV-B=Homematic IP Heizkörperthermostat Basis
HMIP-eTRV-C=Homematic IP Heizkörperthermostat kompakt
+HmIP-eTRV-C-2=Homematic IP Heizkörperthermostat kompakt
HmIP-SMI=Homematic IP Bewegungsmelder mit Dämmerungssensor
HmIP-SMO=Homematic IP Bewegungsmelder mit Dämmerungssensor außen
HmIP-KRC4=Homematic IP Schlüsselbundfernbedienung - 4 Tasten