magcode / daikin-mqtt Goto Github PK
View Code? Open in Web Editor NEWMQTT interface for Daikin AC Wifi Adapter
License: GNU General Public License v3.0
MQTT interface for Daikin AC Wifi Adapter
License: GNU General Public License v3.0
Hello
I have several questions:
power/set 'on'
and then not when changing only mode/set 'cool to dry'
?Thanks for your code.
I've seen that the messages are published as "retained".
IMHO this is not necessary because the "subscriber" will receive:
Side effect
Every test/device remain in the broker db and is delivered at every connection at every subscriber; in this example i've done a test using ac-room1 deviceid and now every subscribers (different mqtt clientid) receive a full set of data at every connection:
Hi
i've immediately used your .jar (thanks a lot for it) and i got the error:
java -jar daikin-mqtt-1.0.0-jar-with-dependencies.jar
11:41:55.182 [main] INFO org.magcode.daikin.DaikinMqttClient - Loading properties from C:\Users\A130754\Dropbox\Sviluppo\_Tests\daikinmqtt/daikin.properties
11:41:55.549 [main] INFO org.magcode.daikin.DaikinMqttClient - Connected to MQTT broker.
11:41:55.561 [main] INFO org.magcode.daikin.DaikinMqttClient - Subscribed to daikintest/ac-room1/aircon/+/set
Exception in thread "main" java.lang.IllegalArgumentException: Unknown wireless control state: dmnd_run = 0
at net.jonathangiles.daikin.wireless.WirelessDaikin.readDaikinState(WirelessDaikin.java:123)
at net.jonathangiles.daikin.DaikinBase.<init>(DaikinBase.java:45)
at net.jonathangiles.daikin.wireless.WirelessDaikin.<init>(WirelessDaikin.java:19)
at net.jonathangiles.daikin.DaikinFactory.createWirelessDaikin(DaikinFactory.java:22)
at org.magcode.daikin.DaikinMqttClient.main(DaikinMqttClient.java:61)
Maybe it can be a problem related to the wireless adapter or firmware revision.
The response the the services:
aircon/get_control_info
ret=OK,pow=0,mode=3,adv=,stemp=24.0,shum=0,dt1=25.0,dt2=M,dt3=24.0,dt4=25.0,dt5=25.0,dt7=25.0,dh1=AUTO,dh2=50,dh3=0,dh4=0,dh5=0,dh7=AUTO,dhh=50,b_mode=3,b_stemp=24.0,b_shum=0,alert=255,f_rate=5,f_dir=0,b_f_rate=5,b_f_dir=0,dfr1=5,dfr2=5,dfr3=5,dfr4=5,dfr5=5,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=0,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_demand=0
aircon/get_model_info
ret=OK,model=0000,type=N,pv=3.20,cpv=3,cpv_minor=20,mid=NA,humd=0,s_humd=0,acled=0,land=0,elec=1,temp=1,temp_rng=0,m_dtct=1,ac_dst=--,disp_dry=0,dmnd=1,en_scdltmr=1,en_frate=1,en_fdir=1,s_fdir=3,en_rtemp_a=0,en_spmode=7,en_ipw_sep=1,en_mompow=0,hmlmt_l=10.0
If you like to go deeper and maybe support this device I can provide you the complete set of calls and support for testing.
Let me know and thanks again.
f
Device unreachable
In the log I find:
2020-06-01 12:40:57.837 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin notte is unreachable
2020-06-01 12:43:58.855 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin giorno is unreachable
2020-06-01 13:18:58.245 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin giorno is unreachable
2020-06-01 14:18:57.330 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin notte is unreachable
2020-06-01 16:42:27.839 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin notte is unreachable
2020-06-01 17:21:57.662 [pool-2-thread-1] DEBUG org.magcode.daikin.mqtt.MqttNodePublisher -
Daikin giorno is unreachable
I don't know if, by design, this should affect the $state; In my test there has been not any change.
The homie ask for a LWT message:
MQTT only allows one last will message per connection. Homie requires the last will (LWT) to set the homie / device ID / $state attribute to the value lost
It seems that this is not implemented because in my subscription i can see always "ready" state even if the java gateway is disconnected from mqtt.
MQTT Reconnect
After a network error tha gatway falls in "client disconnesso" state and does not reconnect (following a short sample from the log):
19:38:55.658 [pool-2-thread-1] ERROR org.magcode.daikin.mqtt.MqttNodePublisher - MQTT error
org.eclipse.paho.client.mqttv3.MqttException: Client non connesso
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:203) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1251) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:570) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.magcode.daikin.mqtt.MqttNodePublisher.run(MqttNodePublisher.java:54) [daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_131]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
19:39:25.454 [pool-2-thread-1] ERROR org.magcode.daikin.mqtt.MqttNodePublisher - MQTT error
org.eclipse.paho.client.mqttv3.MqttException: Client non connesso
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:203) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1251) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:570) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.magcode.daikin.mqtt.MqttNodePublisher.run(MqttNodePublisher.java:54) [daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_131]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
19:39:26.283 [pool-2-thread-1] ERROR org.magcode.daikin.mqtt.MqttNodePublisher - MQTT error
org.eclipse.paho.client.mqttv3.MqttException: Client non connesso
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:31) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:203) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:1251) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.eclipse.paho.client.mqttv3.MqttClient.publish(MqttClient.java:570) ~[daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at org.magcode.daikin.mqtt.MqttNodePublisher.run(MqttNodePublisher.java:54) [daikin-mqtt-1.0.1-jar-with-dependencies.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.FutureTask.runAndReset(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_131]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_131]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_131]
Hi I'm not a java programmer so i haven't an environment to compile.
Is it kindly possibile to publish a full release with jar ready to use ?
Thanks
I've sent more commands as you can see in the log:
10:05:20.492 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Send targettemp=20.0 to giorno
10:06:06.144 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Send targettemp=20.0 to giorno
10:06:44.129 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Sending power=on to giorno
10:06:44.535 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Sending mode=Cool to giorno
10:10:38.384 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Send targettemp=20.0 to giorno
10:11:21.565 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Sending mode=Auto to giorno
10:14:09.182 [MQTT Call: client-for-daikin-on-IT000000682235] INFO org.magcode.daikin.mqtt.MqttSubscriber - Sending mode=Dry to giorno
but none has been received/ececuted by the split.
I'm sorry but there no more info in the log let me know if you need some kind of analysis.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.