diff --git a/src/main/java/com/tellerulam/hm2mqtt/XMLRPCServer.java b/src/main/java/com/tellerulam/hm2mqtt/XMLRPCServer.java index 35b6e7e..7e54d49 100644 --- a/src/main/java/com/tellerulam/hm2mqtt/XMLRPCServer.java +++ b/src/main/java/com/tellerulam/hm2mqtt/XMLRPCServer.java @@ -18,10 +18,9 @@ public static String init() throws IOException ss.setReuseAddress(true); ss.bind(null); new XMLRPCAcceptor().start(); - InetAddress addr=InetAddress.getLocalHost(); String localhost=System.getProperty("hm2mqtt.hm.localhost"); if(localhost==null) - localhost=addr.getHostAddress(); + localhost=InetAddress.getLocalHost().getHostAddress(); return "binary://"+localhost+":"+ss.getLocalPort(); }