Daikin integration

Must be cleaned all topics go to the right subforum
rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Monday 10 October 2016 10:23

videodrome wrote:
rjnl wrote:port = 80 (standard http)

Thanx, stupid me.... :D


I already wondered why this was configurable, since you cant change the port on the daikin modules anyhow, but maybe it will be useful when you want these behind a loadbalancer and/or proxy, but most users won't have as many vlans/subnets as I do :geek: . Perhaps the devs can add a hint to the interface.

globalassist
Posts: 26
Joined: Monday 09 December 2013 17:51
Target OS: Windows
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Daikin integration

Postby globalassist » Monday 17 October 2016 16:49

I'm trying to control my Daikin Airco with Domoticz.
However, when I try to set the temperature in the dashboard (see screenshot) the log displays:
2016-10-17 16:46:54.717 User: admin initiated a SetPoint command
But nothing changes on the Airco.
For the record, I'm using Domoticz on WIndows. :ugeek:
Can anyone explain this or help me?
Daikincontrol.jpg
Daikincontrol.jpg (64.58 KiB) Viewed 412 times

rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Monday 17 October 2016 17:28

@Globalassist. Native Daikin intergration is still a work-in-progress. For now it's read-only for the temp sensors and that's it.

globalassist
Posts: 26
Joined: Monday 09 December 2013 17:51
Target OS: Windows
Domoticz version: Latest
Location: Netherlands
Contact:

Re: Daikin integration

Postby globalassist » Wednesday 26 October 2016 21:08

@rjnl Thanks for the response.
Is there anything I can do to help?

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Thursday 29 December 2016 12:26

Do you need anything specific that is not covered in the wiki: http://www.domoticz.com/wiki/Daikin_wifi ?

rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Friday 30 December 2016 13:13

Well I'm sorta missing the following options in the wiki script: (note that I did not spend much time trying to add these to the script since I expected native support to come soon, guess I was wrong on that one:) )

    Manual Mode Control (domoticz now has a multi-mode control switch type device)
    Humidity Control (Ururu Sarara models)
    Ventilation/Fresh-air Control (Ururu Sarara models)
    Air purification/Flash streamer control
    Powerful Mode Control
    Fan speed control incl. silent mode

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Sunday 01 January 2017 17:03

I have silent mode in my own installation and humidity is trivial looking at:
http://192.168.10.26/aircon/get_control_info
Supporting humidify/cool/heat using the selector should also be simple and is a good idea (like the one I used in https://www.domoticz.com/wiki/NAD7050 for my amplifier mode), I removed all the options in the past because my domoticz interface became too cluttered with buttons (like you also said https://www.domoticz.com/forum/viewtopic.php?t=7244 ). I would probably use a selector for the mode, a selector for the fan speed (including auto and silent), a setpoint for temperature and a setpoint for humidity (though I never use humidify). The other options you mention cannot be reached from the Wifi interface as far as I know.

I will probably rewrite the daikin script yet again to support more features, but I will first replace my KAKU blinds with ZWAVE, so it will probably not be very soon.

rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Tuesday 03 January 2017 12:09

Hi Rob,

I would definitely appreciate your efforts on adding this to the script, take all the time you need. Exactly like you said, the selector switches would be ideal for fan speed and mode settings. I did some investigation into the other options, you are right in that they cannot be set from the app for FTXNxxN (Ururu Sarara) models, however these are present in the app for the FTXMxxM models and are controlled through the adv= parameter (which is also present on the US models, however not updated when setting these options through the remote).

I've found the following values for these settings on the FTXM:
Powerful Mode: adv=2
Econo Mode: adv=12
Flash Streamer enabled: adv=13.

You'd expect these to be added up to a decimal value when combined, however they are shown as e.g. "adv=2/13" or adv="12/13" when the first and last, resp. last 2 options are enabled together. The FTFZxxN/US also seems to respond to at least the powerful command when set through set_control_info, however I will need to confirm from home since it's hard to fully confirm remotely. As for the hum settings, I found the below values for each mode:
"Zwitsal mode": no API value found, will look further into this.
"Continous mode": shum=CONTINUE
High: shum=50
Med: shum=45
Low: shum=40

Thanks again Rob, if I can be of any more help, do let me know!

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Tuesday 03 January 2017 19:38

I have made the mode selector, fan rate selector and temperature setpoint. However, I don't understand how I can create a humidity setpoint, anyone with ideas?

My current lua script (using selector DaikinMode [Heat, Cool, ...] and DaikinFrate [Auto, Silent, l1, l2, ....] (not allowed to just use a number) and setpoint DaikinSetTarget, the content is pretty obvious from the script)

commandArray = {}
if (devicechanged['DaikinMode']) or (devicechanged['DaikinSetTarget']) or (devicechanged['DaikinFrate']) then
daikin_ip = '192.168.10.26'
stemp = otherdevices_svalues['DaikinSetTarget']
if (otherdevices['DaikinMode'] == 'Off') then
pow = 0
else
pow = 1
if (otherdevices['DaikinMode'] == 'Heat') then
mode = 4
elseif (otherdevices['DaikinMode'] == 'Cool') then
mode = 3
elseif (otherdevices['DaikinMode'] == 'Auto') then
mode = 0
elseif (otherdevices['DaikinMode'] == 'Dry') then
mode = 2
end
end
if (otherdevices['DaikinFrate'] == 'Auto') then
f_rate = 'A'
elseif (otherdevices['DaikinFrate'] == 'Silent') then
f_rate = 'B'
elseif (otherdevices['DaikinFrate'] == 'l1') then
f_rate = '3'
elseif (otherdevices['DaikinFrate'] == 'l2') then
f_rate = '4'
elseif (otherdevices['DaikinFrate'] == 'l3') then
f_rate = '5'
elseif (otherdevices['DaikinFrate'] == 'l4') then
f_rate = '6'
elseif (otherdevices['DaikinFrate'] == 'l5') then
f_rate = '7'
end
cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir=0"'
os.execute(cmd)
end
return commandArray

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Tuesday 03 January 2017 19:45

I also tried the adv setting, but it does nothing on my Ururu Sarara.

User avatar
remb0
Posts: 753
Joined: Thursday 11 July 2013 22:21
Target OS: Raspberry Pi
Domoticz version: Beta
Location: The Netherlands
Contact:

Re: Daikin integration

Postby remb0 » Tuesday 03 January 2017 22:59

I think that the best option is: native integration, second best is the use of the new python framework to create new hardware...

But scripts are also a good option.
a mode selector, a working temperature setpoint and a fanspeed selector is all I want..
for those who want a webpage of some documentaion:
https://github.com/ael-code/daikin-control


I will the the new changes later this week and will reply feedback :) thanks!

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Wednesday 04 January 2017 17:33

Fully agree, I did not know about the existence of the python framework. The reason I worked with LUA instead of Python was that I can use these scripts inside domoticz whereas I need to call external scripts to use python (native python seems to work if you build your own domoticz, but I don't). I use python on a daily basis, should not be too hard to make a Daikin plugin (and an NAD7050 for that matter)!

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Wednesday 04 January 2017 19:18

I looked a bit into the Python framework and for me it is still too much a work in progress, I will stick with the LUA implementation for a while.

From the documentation I deduce that the python framework will become the new native implementation. Good choice, much easier to implement support using python than using C-code (even makes me think why Domoticz is using C at all, would it not be much easier to develop everything in python?).

rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Saturday 07 January 2017 13:09

HI Rob, thanks so much for the updated script, quicker then I'd expected :-D I'll do some testing over the weekend and give you some more feedback. As for your question: "However, I don't understand how I can create a humidity setpoint, anyone with ideas?"

Maybe you should implement this as a selector switch instead of a setpoint. With the display options LOW/MED/HIGH/CONT like on the US-remote, translating to the command values "40","45","50","CONTINUE". E.g. just like you did for the fan speed control.

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Saturday 07 January 2017 15:20

Updated wiki.

rjnl
Posts: 28
Joined: Friday 27 June 2014 11:08
Target OS: Linux
Domoticz version: Beta
Contact:

Re: Daikin integration

Postby rjnl » Tuesday 10 January 2017 14:50

I have amended the script into 2 new variants to provide the exact same level of control and more as the daikin app, specifically for the R32 ranges Ururu Sarara (FTXZxxN) and Daikin Comfort or Bluevolution (FTXMxxM) variants. Note that for all types of units, I have added flow direction control to the LUA.

We will start with the FTXM25M, which has additional control options for "advanced modes", being the Powerfull- and Econo mode as well as the flash streamer. Note they cannot be combined as discussed earlier (did not know how to do that in LUA, perhaps a real dev can help). For now I can live without the streamer when econo or powerfull is activated. I intend to automate the use of econo (when my car is charging at 11KW) and set powerfull when entering a room where climate was disabled before, e.g. after power off and dT is larger then say 3 degrees C).

First we add a selector switch type dummy device for flow direction control, name it "DaikinFdir" and set the levels als pictured below:
Image

Next we add a selector switch type dummy device for advanced options control, name it "DaikinAdv" and set the appropriate levels:
Image

Now we paste the below script into the event editor (note you need to set LUA script type to "device", or you'll get an eval error line in the log). If you have multiple units like myself, you can add a pretext to the device names, e.g. Office_DaikinMode, Living_DaikinMode etc. and repeat for other units. Use find/replace to amend the scripts accordingly.

Code: Select all

commandArray = {}
if (devicechanged['DaikinMode']) or (devicechanged['DaikinSetTarget']) or (devicechanged['DaikinFrate']) or (devicechanged['DaikinFdir']) or (devicechanged['DaikinAdv']) then
    daikin_ip = '10.0.1.xxx'
    stemp = otherdevices_svalues['DaikinSetTarget']
-- Checking if device is off
    if (otherdevices['DaikinMode'] == 'Off') then
        pow = 0
        mode = 0
    else
-- Set the operation mode
        pow = 1
        if (otherdevices['DaikinMode'] == 'Heat') then
            mode = 4
        elseif (otherdevices['DaikinMode'] == 'Cool') then
            mode = 3
        elseif (otherdevices['DaikinMode'] == 'Auto') then
            mode = 0
        elseif (otherdevices['DaikinMode'] == 'Dry') then
            mode = 2
        end
    end
-- Set airflow rate
    if (otherdevices['DaikinFrate'] == 'Auto') then
        f_rate = 'A'
    elseif (otherdevices['DaikinFrate'] == 'Silent') then
        f_rate = 'B'
    elseif (otherdevices['DaikinFrate'] == 'L1') then
        f_rate = '3'
    elseif (otherdevices['DaikinFrate'] == 'L2') then
        f_rate = '4'
    elseif (otherdevices['DaikinFrate'] == 'L3') then
        f_rate = '5'
    elseif (otherdevices['DaikinFrate'] == 'L4') then
        f_rate = '6'
    elseif (otherdevices['DaikinFrate'] == 'L5') then
        f_rate = '7'
    end
-- Set airflow direction
    if (otherdevices['DaikinFdir'] == 'Off') then
        f_dir = 0
    elseif (otherdevices['DaikinFdir'] == 'Vertical') then
        f_dir = 1
    elseif (otherdevices['DaikinFdir'] == 'Horizontal') then
        f_dir = 2
    elseif (otherdevices['DaikinFdir'] == '3D') then
        f_dir = 3
    end
-- Set advanced options
    if (otherdevices['DaikinAdv'] == 'Off') then
        adv = 0
    elseif (otherdevices['DaikinAdv'] == 'Powerfull') then
        adv = 2
    elseif (otherdevices['DaikinAdv'] == 'Econo') then
        adv = 12
    elseif (otherdevices['DaikinAdv'] == 'Clean') then
        adv = 13
    end
-- Execute command using curl
    cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum=0&f_rate='..f_rate..'&f_dir='..f_dir..'&adv='..adv..'"'
    os.execute(cmd)
end
return commandArray


And now we will do the same for the Ururu Sarara variants which do not support the advanced modes, but does support humidity control. Let's start again by creating again the selector switch for the airflow direction and call it "DaikinFdir":
Image

And create another selector switch for the humidity modes called "DaikinHumid" (note "Zwitsal Mode" seems not to be supported through the wifi controller):
Image

Now use the event editor to create another LUA script, set script type to device and paste the below code:

Code: Select all

commandArray = {}
if (devicechanged['DaikinMode']) or (devicechanged['DaikinSetTarget']) or (devicechanged['DaikinFrate']) or (devicechanged['DaikinFdir']) or (devicechanged['DaikinHumid']) then
    daikin_ip = '10.0.1.xxx'
    stemp = otherdevices_svalues['DaikinSetTarget']
-- Checking if device is off
    if (otherdevices['DaikinMode'] == 'Off') then
        pow = 0
        mode = 0
    else
-- Set the operation mode
        pow = 1
        if (otherdevices['DaikinMode'] == 'Heat') then
            mode = 4
        elseif (otherdevices['DaikinMode'] == 'Cool') then
            mode = 3
        elseif (otherdevices['DaikinMode'] == 'Auto') then
            mode = 0
        elseif (otherdevices['DaikinMode'] == 'Dry') then
            mode = 2
        end
    end
-- Set Airflow rate
    if (otherdevices['DaikinFrate'] == 'Auto') then
        f_rate = 'A'
    elseif (otherdevices['DaikinFrate'] == 'Silent') then
        f_rate = 'B'
    elseif (otherdevices['DaikinFrate'] == 'L1') then
        f_rate = '3'
    elseif (otherdevices['DaikinFrate'] == 'L2') then
        f_rate = '4'
    elseif (otherdevices['DaikinFrate'] == 'L3') then
        f_rate = '5'
    elseif (otherdevices['DaikinFrate'] == 'L4') then
        f_rate = '6'
    elseif (otherdevices['DaikinFrate'] == 'L5') then
        f_rate = '7'
    end
-- Set Airflow direction
    if (otherdevices['DaikinFdir'] == 'Off') then
        f_dir = 0
    elseif (otherdevices['DaikinFdir'] == 'Vertical') then
        f_dir = 1
    elseif (otherdevices['DaikinFdir'] == 'Horizontal') then
        f_dir = 2
    elseif (otherdevices['DaikinFdir'] == '3D') then
        f_dir = 3
    end
-- Set Ururu Sarara Humidity
    if (otherdevices['DaikinHumid'] == 'Off') then
        shum = '0'
    elseif (otherdevices['DaikinHumid'] == 'Low') then
        shum = '40'
    elseif (otherdevices['DaikinHumid'] == 'Medium') then
        shum = '45'
    elseif (otherdevices['DaikinHumid'] == 'High') then
        shum = '50'
    elseif (otherdevices['DaikinHumid'] == 'Continue') then
        shum = 'CONTINUE'
    end
-- Execute command with curl
    cmd = 'curl "http://' .. daikin_ip .. '/aircon/set_control_info?pow='..pow..'&mode='..mode..'&stemp='..stemp..'&shum='..shum..'&f_rate='..f_rate..'&f_dir='..f_dir..'"'
    os.execute(cmd)
end
return commandArray


Now you're all set, works like a charm for me now!

robhuls
Posts: 28
Joined: Monday 23 March 2015 20:20
Target OS: Raspberry Pi
Domoticz version: beta
Location: Zwolle
Contact:

Re: Daikin integration

Postby robhuls » Thursday 02 February 2017 23:12

Philos31 wrote:Hello all, made a little change to the script so now you can use cooling too.
How it works: Just the same as the old script, but the script now checks: If room temp is lower then the programmed temperature then heat, if room temp is higher then programmed temperature then cool.

Will this work reliably? The typical fear with this implementation is that the unit will cycle between cooling and heating due to the big difference between measured and true temperature (because the sensor is inside the unit). What I think will happen is that the unit will switch from heating to cooling and very soon the sensor will say that it is pretty cold (because it is very close to the cold unit), so it will start heating again. If you use a separate temperature sensor in the room you will still face similar problems (it is hard to perform decent control with a large time delay). I had a similar feature in the past and the main reason I removed it was that I never heat and cool on the same day (for that matter, typically not even in the same month). Maybe the feature is handy for poorly isolated houses. Oh, by the way, why not just use the auto feature of the unit itself?

Philos31
Posts: 48
Joined: Friday 15 August 2014 22:37
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Daikin integration

Postby Philos31 » Wednesday 08 February 2017 23:50

robhuls wrote:Will this work reliably? The typical fear with this implementation is that the unit will cycle between cooling and heating due to the big difference between measured and true temperature (because the sensor is inside the unit). What I think will happen is that the unit will switch from heating to cooling and very soon the sensor will say that it is pretty cold (because it is very close to the cold unit), so it will start heating again. If you use a separate temperature sensor in the room you will still face similar problems (it is hard to perform decent control with a large time delay). I had a similar feature in the past and the main reason I removed it was that I never heat and cool on the same day (for that matter, typically not even in the same month). Maybe the feature is handy for poorly isolated houses. Oh, by the way, why not just use the auto feature of the unit itself?


It will set to heat or cool only when starting up the device. So it will not switch from heating to cooling when in operation.
So it looks at the room temperature and your set temp. If the set temp is higher then it will hesat, if the set temp is lower then room temperature it will cool.

But as I said, the bash script is a proof of concept, it is now old and there are better options in the wiki.
Half of Daikin support is even native in domoticz, so we might see a native Daikin support in the future.
RasPi2/KaKu/MiLight/HomeEasy/Impuls/Byron/Daikin 3,5kw Ururu Sarara all working together with domoticz


Return to “Scripts [cleaning in progress]”

Who is online

Users browsing this forum: No registered users and 4 guests