Announcing Pre-Release Daikin Wifi Controller Plugin

neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

Marcus,

Please try https://github.com/neilkplugins/Daikin- ... 2.0.7alpha which adds a check box in the device config "Does the unit provide consumption data" which defaults to checked, but in your case will need to be deselected.

Please let me know if this works, I think I caught everything this time but as my unit does report this it is possible I have missed something.

If you are happy (and the changes I added fora game) I will get this released and pushed to the plugin store.

Neil
Bleasel
Posts: 88
Joined: Wed Mar 05, 2014 5:53 pm
Location: Sydney, AUSTRALIA

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by Bleasel »

Hi Neil

Getting more errors with vastest release:


Reloading plugin "Daikin Wifi Controller 2022.0.7" using API v3.0
Stopping plugin "Daikin Wifi Controller 2022.0.7" (pid 62656)
Stopped plugin "Daikin Wifi Controller 2022.0.7"
Starting plugin "Daikin Wifi Controller 2022.0.7" (pid 62697)
Started plugin "Daikin Wifi Controller 2022.0.7"
Daikin Wifi Controller Error exception in device_start_comm(Level 3 AirCon): 'key consumptionSupport not found in dict'
Daikin Wifi Controller Error Error in plugin execution runConcurrentThread:

File "plugin.py", line 488, in runConcurrentThread
File "plugin.py", line 199, in _refreshStatesFromHardware
File "plugin.py", line 161, in requestData
type: 'key consumptionSupport not found in dict'

Daikin Wifi Controller Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Daikin Wifi Controller Error Error in plugin execution runConcurrentThread:

File "plugin.py", line 488, in runConcurrentThread
File "plugin.py", line 199, in _refreshStatesFromHardware
File "plugin.py", line 161, in requestData
type: 'key consumptionSupport not found in dict'

Daikin Wifi Controller Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

If you edit each AC device this will be fixed as it will save the configuration option and the error will go away (you need to uncheck the consumption option anyway). I will fix in the version that goes in the plugin store so that it upgrades without issue but it should work once you do that.

Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

https://github.com/neilkplugins/Daikin- ... 2.0.8alpha fixes that issue and will allow upgrades.

Thanks,
Neil
Bleasel
Posts: 88
Joined: Wed Mar 05, 2014 5:53 pm
Location: Sydney, AUSTRALIA

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by Bleasel »

Thanks

I have deselected the consumption and decimal options. Reloaded plugin.


Reloading plugin "Daikin Wifi Controller 2022.0.8" using API v3.0
Stopping plugin "Daikin Wifi Controller 2022.0.8" (pid 62783)
Stopped plugin "Daikin Wifi Controller 2022.0.8"
Starting plugin "Daikin Wifi Controller 2022.0.8" (pid 62876)
Started plugin "Daikin Wifi Controller 2022.0.8"
Daikin Wifi Controller Error exception in device_start_comm(Level 3 AirCon): 'dt3'
Daikin Wifi Controller Error Error in plugin execution runConcurrentThread:

File "plugin.py", line 488, in runConcurrentThread
File "plugin.py", line 240, in _refreshStatesFromHardware
type: 'dt3'

Daikin Wifi Controller Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Bleasel
Posts: 88
Joined: Wed Mar 05, 2014 5:53 pm
Location: Sydney, AUSTRALIA

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by Bleasel »

I don't know if this is relevant, but the API from the scripting shell is later:


Python 3.10.2 (v3.10.2:a58ebcc701, Jan 13 2022, 14:50:16) [Clang 13.0.0 (clang-1300.0.29.30)]
Connected to Indigo Server v2022.1.2, api v3.1 (localhost:1176)
Bleasel
Posts: 88
Joined: Wed Mar 05, 2014 5:53 pm
Location: Sydney, AUSTRALIA

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by Bleasel »

and if I enter: http://192.168.1.xx/skyfi/aircon/get_control_info, i get

ret=OK,pow=0,mode=3,operate=1,bk_auto=1,stemp=30,dt1=20,dt2=16,f_rate=1,dfr1=1,dfr2=5,f_airside=0,airside1=0,airside2=0,f_auto=1,auto1=1,auto2=1,f_dir=0,dfd1=0,dfd2=0,filter_sign_info=1,cent=0,en_cent=0,remo=2
agame
Posts: 514
Joined: Thu Jul 13, 2017 10:29 pm
Location: Melbourne, Australia

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by agame »

so this is weird...

i've upgraded to the latest version linked above [2022.0.8alpha]. Deselected the decimal temp option. Any attempt to control the unit generates a error of this style:
:

Code: Select all

  Daikin Wifi Controller          1
   Daikin Wifi Controller          heat
   Daikin Wifi Controller Debug    action string is heat
   Daikin Wifi Controller Debug    http://192.168.1.111/aircon/set_control_info?pow=1&mode=4&stemp=22&shum=0&f_rate=A&f_dir=2
   Daikin Wifi Controller Error    Unknown/Other Error setting /aircon/set_control_info?pow=1&mode=4&stemp=22&shum=0&f_rate=A&f_dir=2 from Daikin Unit daikin - new plugin
   Daikin Wifi Controller Debug    Error is HTTPConnectionPool(host='192.168.1.111', port=80): Read timed out. (read timeout=2)
   Daikin Wifi Controller Error    send "daikin - new plugin" mode change to heat failed
   Daikin Wifi Controller Debug    Consumption data not supported - as per device config daikin - new plugin
   Daikin Wifi Controller Debug    [['ret', 'OK'], ['pow', '0'], ['mode', '4'], ['adv', ''], ['stemp', '22.0'], ['shum', '0'], ['dt1', '25.0'], ['dt2', 'M'], ['dt3', '25.0'], ['dt4', '22.0'], ['dt5', '22.0'], ['dt7', '25.0'], ['dh1', 'AUTO'], ['dh2', '50'], ['dh3', '0'], ['dh4', '0'], ['dh5', '0'], ['dh7', 'AUTO'], ['dhh', '50'], ['b_mode', '4'], ['b_stemp', '22.0'], ['b_shum', '0'], ['alert', '255'], ['f_rate', 'A'], ['f_dir', '2'], ['b_f_rate', 'A'], ['b_f_dir', '2'], ['dfr1', '5'], ['dfr2', '5'], ['dfr3', '5'], ['dfr4', 'A'], ['dfr5', 'A'], ['dfr6', '5'], ['dfr7', '5'], ['dfrh', '5'], ['dfd1', '0'], ['dfd2', '0'], ['dfd3', '0'], ['dfd4', '2'], ['dfd5', '2'], ['dfd6', '0'], ['dfd7', '0'], ['dfdh', '0'], ['ret', 'OK'], ['htemp', '22.0'], ['hhum', '-'], ['otemp', '18.0'], ['err', '0'], ['cmpfreq', '0']]
   Daikin Wifi Controller Debug    Consumption data not returned and skipped consumption state updates for daikin - new plugin
however, if i copy the URL to a browser it controls the unit correctly. [If i add a decimal point it throws an error however, so looks like there were actually two things going on here).

so there has to be something about the request?
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

so there has to be something about the request?
So maybe the decimal point was not the whole issue. I will create a unique version for you to test that strips the request headers out and we can see if that is the cause, as the timeout error is indeed strange. I do sometimes get time outs but I have a test and production instance and often have multiple device instances running for testing, and once I stand them back down all is good.

Sorry for the messing around on this, but I am afraid trial and error is the only way we can crack this.

Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

Marcus,
Sorry for the issues here, and this is useful as your unit is returning a lot of additional states, and also not returning some I would have expected. I will first elegantly handle the missing items and then we can figure out if the additional ones are useful/important to add as device states, or to simply ignore. That may require a little testing to see what they represent.

On the API scripting version it is the Indigo version that had been incremented, but the plugin does not require any of the new API features introduced in Indigo 2022.1.2

A new version will be coming !

Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

@agame it looks like the unit you have has an incompatibility with the python requests model, and that appears to be the issue
By some reason the controller does not like "Request" library that is used by most of Homebridge plugins and always responds with 403. It works fine with Axios
https://whrl.pl/RfiLq6

I will do some more digging, but I also found a post that suggests I need to add a "Host" parameter to the requests header that gets around the issue, so I will give that a try.

Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

Marcus - it looks like the stored former cool set point (on my device it is reported as dt3) isn't reported the same way on your device. In the extract you posted

Code: Select all

ret=OK,pow=0,mode=3,operate=1,bk_auto=1,stemp=30,dt1=20,dt2=16,f_rate=1,dfr1=1,dfr2=5,f_airside=0,airside1=0,airside2=0,f_auto=1,auto1=1,auto2=1,f_dir=0,dfd1=0,dfd2=0,filter_sign_info=1,cent=0,en_cent=0,remo=2
Can you identify which (if any) of the other fields could be that value. It is important as the logic uses that number as you change modes (as the heat and cool set points can be different) and I use this in the plugin to change the set point when the mode is changed.

If you don't care (or need this) I can take a quick and dirty approach and just suppress the error, otherwise we need to identify which one works for you and I can adjust (but it will take a bit more time)

Neil
neilk
Posts: 729
Joined: Mon Jul 13, 2015 1:51 pm
Location: Reading, UK

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by neilk »

@agame - Please try this one which adds the host header to the requests call https://github.com/neilkplugins/Daikin- ... 2.0.9alpha

Fingers crossed :-)
agame
Posts: 514
Joined: Thu Jul 13, 2017 10:29 pm
Location: Melbourne, Australia

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by agame »

@agame - Please try this one which adds the host header to the requests cal
Neilk, sadly, no joy :cry: !

here's the log:

Code: Select all

Daikin Wifi Controller Debug    /aircon/set_control_info?pow=1&mode=4&stemp=23&shum=0&f_rate=A&f_dir=3
   Daikin Wifi Controller Debug    Headers are : {'Host': '192.168.1.111'}
   Daikin Wifi Controller Debug    http://192.168.1.139/aircon/set_control_info?pow=1&mode=4&stemp=23&shum=0&f_rate=A&f_dir=3
   Daikin Wifi Controller Debug    Headers are : {'Host': '192.168.1.111'}
   Daikin Wifi Controller Debug    Headers are : {'Host': '192.168.1.111'}
   Daikin Wifi Controller Debug    Consumption data not supported - as per device config daikin - new plugin
   Daikin Wifi Controller Debug    [['ret', 'OK'], ['pow', '1'], ['mode', '4'], ['adv', ''], ['stemp', '22.0'], ['shum', '0'], ['dt1', '25.0'], ['dt2', 'M'], ['dt3', '25.0'], ['dt4', '22.0'], ['dt5', '22.0'], ['dt7', '25.0'], ['dh1', 'AUTO'], ['dh2', '50'], ['dh3', '0'], ['dh4', '0'], ['dh5', '0'], ['dh7', 'AUTO'], ['dhh', '50'], ['b_mode', '4'], ['b_stemp', '22.0'], ['b_shum', '0'], ['alert', '255'], ['f_rate', 'A'], ['f_dir', '3'], ['b_f_rate', 'A'], ['b_f_dir', '2'], ['dfr1', '5'], ['dfr2', '5'], ['dfr3', '5'], ['dfr4', 'A'], ['dfr5', 'A'], ['dfr6', '5'], ['dfr7', '5'], ['dfrh', '5'], ['dfd1', '0'], ['dfd2', '0'], ['dfd3', '0'], ['dfd4', '2'], ['dfd5', '2'], ['dfd6', '0'], ['dfd7', '0'], ['dfdh', '0'], ['ret', 'OK'], ['htemp', '25.0'], ['hhum', '-'], ['otemp', '8.0'], ['err', '0'], ['cmpfreq', '16']]
   Daikin Wifi Controller Debug    Consumption data not returned and skipped consumption state updates for daikin - new plugin
   Daikin Wifi Controller Error    Unknown/Other Error setting /aircon/set_control_info?pow=1&mode=4&stemp=23&shum=0&f_rate=A&f_dir=3 from Daikin Unit daikin - new plugin
   Daikin Wifi Controller Debug    Error is HTTPConnectionPool(host='192.168.1.111', port=80): Read timed out. (read timeout=2)
   Daikin Wifi Controller Error    send "daikin - new plugin" increase heat setpoint to 23.0° failed

incidentally, I increased the value for 'request timeout' from 2 to 4, but the error message continues to report 'read timeout=2'...not sure if they are the same thing??
Bleasel
Posts: 88
Joined: Wed Mar 05, 2014 5:53 pm
Location: Sydney, AUSTRALIA

Re: Announcing Pre-Release Daikin Wifi Controller Plugin

Post by Bleasel »

Neil

My best guess of the states are:


ret=OK,
pow=1, Power State
mode=1, Operating Mode (0=fan only, 1=heat, 2=cool, 3=auto, 7=dry)
operate=1,
bk_auto=1,
stemp=21, represents the target temperature
dt1=21, Target temp for mode 1 heating
dt2=16, Target temp for mode 2 cooling or 3 Auto.
f_rate=1, Represents the fan rate mode
dfr1=1, keeps track on different fan_rates for each mode
dfr2=5, keeps track on different fan_rates for each mode
f_airside=0,
airside1=0,
airside2=0,
f_auto=1,
auto1=1,
auto2=1,
f_dir=0, represents the fan direction
dfd1=0, tracking fan direction for each mode
dfd2=0, tracking fan direction for each mode filter_sign_info=1,
cent=0,
en_cent=0,
remo=2


The unit does not have cool or heat set points (that I know off). Nor does it have fan directions. It does have 7 zones which don't appear above, but they seem to be configurable according to this:

https://github.com/yenoiwesa/homebridge-daikin-airbase
Post Reply

Return to “Daikin Wifi Controller”