magcode / daikin-mqtt

MQTT interface for Daikin AC Wifi Adapter
GNU General Public License v3.0
10 stars 3 forks source link

Problem loading JAR #15

Open MarcoGT opened 3 days ago

MarcoGT commented 3 days ago

I created the following daikon.properties file

rootTopic=home # the mqtt root topic refresh=60 # number of seconds for MQTT status updates. Do not go below 60! mqttServer=tcp://192.168.1.10 # IP or hostname of your mqtt broker logLevel=INFO # logLevel retained=true # whether MQTT messages will be sent retained. Defaults to "false" qos=0 # the qos which MQTT messages will be sent with. Defaults to "0"

daikin1.host=192.168.1.22 # IP adress of your first Daikin Wifi adapter daikin1.name=daikin1 # a name for the Daikin device, used in the MQTT topic

daikin2.host=192.168.1.95 daikin2.name=daikin2

But I have different Java exceptions:

Exception in thread "main" java.lang.NumberFormatException: For input string: "60 # number of seconds for MQTT status updates. Do not go below 60!" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68) at java.base/java.lang.Integer.parseInt(Integer.java:658) at java.base/java.lang.Integer.parseInt(Integer.java:776) at org.magcode.daikin.DaikinMqttClient.readProps(DaikinMqttClient.java:118) at org.magcode.daikin.DaikinMqttClient.main(DaikinMqttClient.java:54)

Also

Exception in thread "main" java.lang.NumberFormatException: For input string: "0 # the qos which MQTT messages will be sent with. Defaults to "0"" at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:68) at java.base/java.lang.Integer.parseInt(Integer.java:658) at java.base/java.lang.Integer.valueOf(Integer.java:989) at org.magcode.daikin.DaikinMqttClient.readProps(DaikinMqttClient.java:122) at org.magcode.daikin.DaikinMqttClient.main(DaikinMqttClient.java:54)

and

Exception in thread "main" java.lang.IllegalArgumentException: Can't parse string to URI "tcp://192.168.1.10 # IP or hostname of your mqtt broker" at org.eclipse.paho.client.mqttv3.internal.NetworkModuleService.validateURI(NetworkModuleService.java:77) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:574) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:438) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:322) at org.eclipse.paho.client.mqttv3.MqttAsyncClient.(MqttAsyncClient.java:317) at org.eclipse.paho.client.mqttv3.MqttClient.(MqttClient.java:227) at org.magcode.daikin.DaikinMqttClient.startMQTTClient(DaikinMqttClient.java:160) at org.magcode.daikin.DaikinMqttClient.main(DaikinMqttClient.java:58)

magcode commented 2 days ago

in your properties file, remove all "#" and all spaces and all comments

MarcoGT commented 2 days ago

Now it works, thanks a lot; I can see the MQTT messages but unfortunately it seems it does not work with my adapter ( BRP069C4x)