Daikin HVAC Thermostat Plugin

Posted on
Mon Jun 18, 2018 2:45 pm
Albatros offline
Posts: 132
Joined: Feb 07, 2015

Daikin HVAC Thermostat Plugin

I have 4 Daikin FTXG50LW Emura Air Heatpumps. I use them for cooling and heating. I am using in Indigo a python script see below and the Smart Devices Thermostat Plugin but this doesn't work good. Unfortunately the Smart Devices Thermostat has never been finished and only heating is working and not cooling. The last update is from 2014.

I am not a programmer and with some effort I can now control it with some python script. Is there anybody who could maybe finish the Smart Devices pluging or even better based upon this plugin or the Indigo Tado Thermostat Pluging create a plugin for Daikin devices. The Api is known and their are a few examples from domotics and homey. For me setting device on/of, set temperature, mode (cooling/heating) would be fine.

Indigo Smart Devices Plugin: viewforum.php?f=154
Indigo Tado Plugin: viewtopic.php?f=196&t=16181


    Daikin API: https://github.com/ael-code/daikin-control
      Domoticz Plugin https://www.domoticz.com/wiki/Daikin_wifi
        Homey App https://github.com/PeterEIER/nl.climate.daikin


        --------------------------------------------------
        The python script I am using:

        import requests

        pow = indigo.variables[1769655104].value # "pow"
        mode = indigo.variables[1741863173].value # "mode"
        stemp = indigo.variables[839605723].value # "stemp"
        f_rate = indigo.variables[1619577686].value # "f_rate"

        url = "http://192.168.X.XX/aircon/set_control_info?pow=" + pow +"&mode=" + mode + "&stemp=" + stemp + "&shum=0&f_rate=" + f_rate + "&f_dir=0"
        requests.get(url)
        --------------------------------------------------

        Posted on
        Mon Jun 18, 2018 3:07 pm
        mat offline
        Posts: 766
        Joined: Nov 25, 2010
        Location: Cambridgeshire - UK

        Re: Daikin HVAC Thermostat Plugin

        Lots of edits as tired, but hope this helps....(shout if I've not explained it too well as had about 3 hours sleep.

        Not sure if this is any help (and its apple-script) but i use this with my dakin. Just create 4 variables, and run the following applescript when any of the variables changes - you can then control the variables from a control page - This is one of two outstanding plugins I need to write, but its been 18 months so far and not enough time.


        Copy the following, or use your python in an action group. call it say "change AC settings".

        Then set up four triggers for your 4 variables - trigger on a variable change, and your "action" is to run the action group "change AC settings"

        Set up a control page so that you can set the four variables separately. ie press button "cool mode" and the variable "mode" is changed to integer "3". The trigger will then run either your python or my applescript and will set the ac.

        Repeat for the other 4 modes, 3 fan direction and temperature you want, each time running the same action group.

        You can do the same script to switch it off with "pow" in the url = 0

        Any other changes to the variables will switch the unit on.





        Code: Select all
        set mode to value of variable "Gymaircon_mode"
        set temp to value of variable "Gymaircon_temp"
        set fan to value of variable "Gymaircon_fandir"
        set fanspeed to value of variable "Gymaircon_fan"

        set theURL to "http://xxx.xxx.xxx.xxx/aircon/set_control_info?pow=1&mode=" & mode & "&stemp=" & temp & "&shum=0&f_rate=" & fanspeed & "&f_dir=" & fan


        do shell script "curl " & quoted form of theURL




        Mode 2 is dehumidify
        Mode 3 is cool
        Mode 4 is heat
        Mode 6 is fan
        Mode 0-1-7 is auto

        Fan speed is 3 to 7 (there may be lower but I don't use them

        Fan direction is
        1 = horizontal
        2= vertical
        3= both directions

        pow in the url is 0 for off and 1 for on

        The following gets the states (python). I have this in a schedule that runs every minute and updates a variable to tell me if the AC is on or off. You will need to create a variable referenced at the end of the script and change the id:

        Code: Select all
        #get data in HTMl Response from Daikin HVAC

        import urllib2

        urlReturned = urllib2.urlopen('http://xxx.xxx.xxx.xxx/aircon/get_control_info')

        data_getStatus = urlReturned.read()


        #transform HTMl Response in JSON format
        # Split the result into bits
        split_response = data_getStatus.split(',')


        # Split the bits into variable/value pairs
        new_list = []
        for element in split_response:
           new_list.append(element.split('='))


        # Convert the variable/value pairs into something json-y
        new_dict = {}
        for element in new_list:
           new_dict[element[0]] = element[1]



        #get new json string variables to python variables

        pow=str(new_dict['pow'])



        #update indigo variables
        indigo.variable.updateValue(493056778, ((pow)))


        This is probably very similar to the above, but gets the current inside and outside temps(python. Put this in a schedule and run it every few minutes). You will need to create two variables referenced at the bottom of the script to hold the two temperatures, and amend the variable id's at the bottom of the script:

        Code: Select all
        #get data in HTMl Response from Daikin HVAC

        import urllib2

        urlReturned = urllib2.urlopen('http://xxx.xxx.xxx.xxx/aircon/get_sensor_info')

        data_getStatus = urlReturned.read()


        #transform HTMl Response in JSON format
        # Split the result into bits
        split_response = data_getStatus.split(',')


        # Split the bits into variable/value pairs
        new_list = []
        for element in split_response:
           new_list.append(element.split('='))


        # Convert the variable/value pairs into something json-y
        new_dict = {}
        for element in new_list:
           new_dict[element[0]] = element[1]



        #get new json string variables to python variables

        htemp=str(new_dict['htemp'])
        otemp=str(new_dict['otemp'])


        #update indigo variables
        indigo.variable.updateValue(75127650, ((htemp)))
        indigo.variable.updateValue(194583233, ((otemp)))

        Late 2018 mini 10.14

        Posted on
        Tue Jun 19, 2018 2:45 pm
        Albatros offline
        Posts: 132
        Joined: Feb 07, 2015

        Re: Daikin HVAC Thermostat Plugin

        Thanks for you post. Would have been nice to have this info a time ago. I have now figured it out with python script. Similar to what you have done. I am not using control pages but the smart devices thermostat and setting a heatpoint from a schedule. Than the thermostat decides based upon room temperature measurement what to do

        The nice thing of a Daikin plugin would be the thermostat functions, Which would run automatically base upon the temperature set. So if anybody could take the Smart devices plugin or the Tado Plugin and create a daikin.... :lol: It want to pay money for it...

        And having a Daikin thermostat device in indigo would make it to be controlled via the homekit bridge in the Home App on Iphone and Ipad. And of course Siri...

        Posted on
        Tue Jun 19, 2018 4:15 pm
        mat offline
        Posts: 766
        Joined: Nov 25, 2010
        Location: Cambridgeshire - UK

        Re: Daikin HVAC Thermostat Plugin

        Why not give it a go yourself. You have almost all the code.

        There is a model plugin and an explanation on what to do in the wiki.

        It would be a really good place to start as you have the code, you just need to create the plugin wrapper.

        Late 2018 mini 10.14

        Page 1 of 1

        Who is online

        Users browsing this forum: No registered users and 0 guests