Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


  • 0
calza

Virtual device for Daikin HVAC - command and get room temp

Question

Hi there guys,

 

I have 3 Daikin HVAC air conditioners in my house, each unit has a wifi module that allows me to control it thru the iphone app from local and from remote...that works really fine and I found on the web all the APIs to control them from HTTP strings (GET and POST).

 

Now the question is...is there any way to create a virtual device in fibaro system for control them? (like sonos i think)...that would be really nice and it could even get room temp from the HVAC unit!!

 

 

APIs have found here  

Please login or register to see this link.

 

 

Share this post


Link to post
Share on other sites

Recommended Posts

  • 1

Hi, your Daikin must have a fixed IP.

 

Then try this lua script in button on a virtual device:

 

local Daikin = Net.FHttp("192.168.1.31", "80") -- fixed ip of Daikin AirConditioner on lan
local a = {}    -- array
local b = {}    -- array
local parametri = ""
local uri = "aircon/get_control_info"; 
 
result, status, errorCode = Daikin:GET(uri) 
 
-- fibaro:debug("result: " .. result)
-- fibaro:debug("status: " .. status)
-- fibaro:debug("errorCode: " .. errorCode)
 
if errorCode == 0 then
i=0
for valore in string.gmatch(result, '([^,]+)') do
     i=i+1  
     a = valore
end
-- INFO of array and value of different parmeter
-- a[2] - pow=   [Valori 0=OFF | 1=ON]
-- a[3] - mode=  [Valori 2=DEHUMDIFICATOR | 3=COLD | 4=HOT | 6=FAN | 0-1-7=AUTO (standard valore 0)]
-- a[5] - stemp= [Range AUTO 18-31 | HOT 10-31 | COLD 18-33]
-- a[6] - shum=0 [0]
-- a[7] - dt1=   [Range AUTO 18-31 | HOT 10-31 | COLD 18-33]
 
  stemp = tonumber(string.sub(a[7], -4))
  a[6] = "shum=0"
-- Starting to change a parameter. Exp POWER ON
a[2]="pow=1" -- ON
  a[5] = "stemp=" .. stemp
-- End to change the parameter
 
parametri = a[2] .. "&" .. a[3] .. "&" .. a[5] .."&" .. a[6]
uri = "aircon/set_control_info?" .. parametri
fibaro:debug(uri) -- For debug
result, status, errorCode = Daikin:GET(uri) -- execution of the command
if errorCode == 0 then
  fibaro:log("OK")
  else
fibaro:log("Command NOT executed")
end
else
fibaro:log("NO connection")
end 
 
This example power on the air contioner
  • Like 1

Share this post


Link to post
Share on other sites
  • 0

Implementing this is super easy if you want basic control. Have you had a look att the API? Have you tried setting up a basic example of a virtual device making a http request? This is entry level stuff mate...

 

I've attached my virtual device for you to have a look at. I'm always using the same settings so I never bothered making control any more granular than on/off but that's easily done if desired.

Please login or register to see this link.

Share this post


Link to post
Share on other sites
  • 0
  • Inquirer
  • yeah thats great! 

     

    Thanks a lot! I know this is entry level stuff...but I am entry level 

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" /> 

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" /> 

    Please login or register to see this image.

    /emoticons/default_icon_biggrin.gif" alt=":-D" />

     

    now, I can work  on it!

    • Like 1

    Share this post


    Link to post
    Share on other sites
    • 0

    Does anyone have any idea how to make this work with the 4P362955-2E WLAN Controller (Module) From daikin?
    I tried installing this but have no idea how to get it to work.

    Share this post


    Link to post
    Share on other sites
    • 0
  • Inquirer
  • i cant find anything on the web regarding your module...can you post an image?

     

    I think apis for daikin should be all the same...

    Share this post


    Link to post
    Share on other sites
    • 0

    This thingy

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

     

    Please login or register to see this link.

     

    I have looked at the script pasted above but i have no idea what to exactly set in that lua stuff

    Please login or register to see this image.

    /emoticons/default_sad.png" alt=":(" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    I know the wifi module of the Airco unit is on 192.168.1.19, but apart from that have no idea how to 'get' to it.

    Share this post


    Link to post
    Share on other sites
    • 0
  • Inquirer
  • Strage, your module is the same of mine...and the plugin should work with you...Try this:

     

    Open your web browser and write this:

    Please login or register to see this link.

    (with your daikin ip address obviously)

     

    you shoud get a white page with this infos from your hvac:

     

    ret=OK,pow=0,mode=3,adv=,stemp=27.0,shum=0,dt1=25.0,dt2=M,dt3=27.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=27.0,b_shum=0,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=5,dfr2=5,dfr3=3,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

    Share this post


    Link to post
    Share on other sites
    • 0

    Strage, your module is the same of mine...and the plugin should work with you...Try this:

     

    Open your web browser and write this:

    Please login or register to see this link.

    (with your daikin ip address obviously)

     

    you shoud get a white page with this infos from your hvac:

     

    ret=OK,pow=0,mode=3,adv=,stemp=27.0,shum=0,dt1=25.0,dt2=M,dt3=27.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=27.0,b_shum=0,alert=255,f_rate=3,f_dir=0,b_f_rate=3,b_f_dir=0,dfr1=5,dfr2=5,dfr3=3,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

     

    Yes, I get that output aswell

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> what settings did you change in the vfib file/lua code?

    Share this post


    Link to post
    Share on other sites
    • 0

    So i have this under the virtual device:

    Please login or register to see this code.

    But it only gives this error when running it:

    Debug: error code.

     

    The IP of the Daikin is 192.168.1.19 help?

    Please login or register to see this image.

    /emoticons/default_tongue.png" alt=":P" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Share this post


    Link to post
    Share on other sites
    • 0

     

    Hi, your Daikin must have a fixed IP.

     

    Then try this lua script in button on a virtual device:

     

    local Daikin = Net.FHttp("192.168.1.31", "80") -- fixed ip of Daikin AirConditioner on lan
    local a = {}    -- array
    local b = {}    -- array
    local parametri = ""
    local uri = "aircon/get_control_info"; 
     
    result, status, errorCode = Daikin:GET(uri) 
     
    -- fibaro:debug("result: " .. result)
    -- fibaro:debug("status: " .. status)
    -- fibaro:debug("errorCode: " .. errorCode)
     
    if errorCode == 0 then
    i=0
    for valore in string.gmatch(result, '([^,]+)') do
         i=i+1  
         a = valore
    end
    -- INFO of array and value of different parmeter
    -- a[2] - pow=   [Valori 0=OFF | 1=ON]
    -- a[3] - mode=  [Valori 2=DEHUMDIFICATOR | 3=COLD | 4=HOT | 6=FAN | 0-1-7=AUTO (standard valore 0)]
    -- a[5] - stemp= [Range AUTO 18-31 | HOT 10-31 | COLD 18-33]
    -- a[6] - shum=0 [0]
    -- a[7] - dt1=   [Range AUTO 18-31 | HOT 10-31 | COLD 18-33]
     
      stemp = tonumber(string.sub(a[7], -4))
      a[6] = "shum=0"
    -- Starting to change a parameter. Exp POWER ON
    a[2]="pow=1" -- ON
      a[5] = "stemp=" .. stemp
    -- End to change the parameter
     
    parametri = a[2] .. "&" .. a[3] .. "&" .. a[5] .."&" .. a[6]
    uri = "aircon/set_control_info?" .. parametri
    fibaro:debug(uri) -- For debug
    result, status, errorCode = Daikin:GET(uri) -- execution of the command
    if errorCode == 0 then
      fibaro:log("OK")
      else
    fibaro:log("Command NOT executed")
    end
    else
    fibaro:log("NO connection")
    end 
     
    This example power on the air contioner

     

     

    That seems to work, thank you

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Now we only need to see if we can show in some way if it's on or off (get current status somehow) and show that in the virtual device.

    And how to make a button for warming, cooling, humidication exactly? << bad at script reading

    Please login or register to see this image.

    /emoticons/default_tongue.png" alt=":P" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi Guys

     

    I have been running my Daikin on Fibaro for a few months now. It is implemented very badly, but it works as I wanted.

    I had to do a few hack to get there but in a nutshell, this is what I did.

    First, I made sure I can chat to my Daikin Wifi controller via API

    Then I created a VD to switch it on and off with the following Lua on each button

    ON

    Please login or register to see this code.

    OFF

    Please login or register to see this code.

    It looks like the newer firmware requires a few setting to make the API except it.. (Use to be able to just to send the pow=0 or pow=1)

     

    Now for the fun part.

    I followed this post with Google Translate and managed to get the Plugin to install.

    Please login or register to see this link.

     

    What I have worked out, the Plugin work 50%. Getting the status like on and off, the temperature for my unit inside and outside works. But the buttons don't work.

    I am not a programmer but have spend days looking at the code and I have worked out that there is no code implemented for the buttons. (I Think)

     

    So at the moment, I can switch my unit on via a scene using the VD and get the status via the Plugin. 

     

    If anyone got time to help me fixing the Plugin I am happy to work trough it. 

    I just don't know where to begin. I am doing a few learning lessons online to learn Lua

     

    Hope this help you guys a bit.

     

    Chris

    Share this post


    Link to post
    Share on other sites
    • 0

    So, after going wild with all kinds of different codes and examples, I now simply made the basics available in Fibaro and we even use it in a combination with our Nest Thermostat and Netatmo. If the temperature goes above 24.5 degrees celsius it will switch on our Daikin. If Nest's or Netatmo's temp goes below 23 it will turn the airco off

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> The only thing missing with this Virtual device is a way to see what the airco is currently doing, but then again... better something then nothing at all

    Please login or register to see this image.

    /emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

     

    And here I have an example for all of you wanting to do a simple ON, OFF, Cool, Heat and Humidify

    Please login or register to see this image.

    /emoticons/default_wink.png" alt=";)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" /> with Daikin Wifi controlled units. Ofcourse you may edit the temperature setting for each value to your liking. In the IPADDRESSOFDAIKINWIFI you simply fill in the local LAN IP address of your Daikin Wifi unit (ex. 192.168.1.90).

     

    Simply create a new virtual device, and add 2 bigger buttons and 3 smaller ones below it.

     

    For button 1 (Label: On) switch to LUA code and enter:

    Please login or register to see this code.

    For button 2 (Label: Off) switch to LUA code and enter:

    Please login or register to see this code.

    For button 3 (Label: Humidify) switch to LUA code and enter:

    Please login or register to see this code.

    For button 4 (Label: Cool) switch to LUA code and enter:

    Please login or register to see this code.

    For button 5 (Label: Heat) switch to LUA code and enter:

    Please login or register to see this code.

    Please login or register to see this link.

    icons for each function.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    • 0

     

    Now for the fun part.

    I followed this post with Google Translate and managed to get the Plugin to install.

    Please login or register to see this link.

     

    What I have worked out, the Plugin work 50%. Getting the status like on and off, the temperature for my unit inside and outside works. But the buttons don't work.

    I am not a programmer but have spend days looking at the code and I have worked out that there is no code implemented for the buttons. (I Think)

     

    So at the moment, I can switch my unit on via a scene using the VD and get the status via the Plugin. 

     

    If anyone got time to help me fixing the Plugin I am happy to work trough it. 

    I just don't know where to begin. I am doing a few learning lessons online to learn Lua

     

    Hope this help you guys a bit.

     

    Chris

     

    I'm not a programmer but I have managed make this work for me

    1.-edit the file Daikin.lua

    2.-Put this code in the functions on / off

    Please login or register to see this code.

    3.-generates again the zip file

    4.-and follow the same steps to upload the plugin

     

    it off with the current values and turn on with the values stored in the split

     

    It can be used with the panel AC

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi rls46

     

     

    Thank you for setting me on the right track.

    I think you have updated you urls for the set. so I changed that..

     

    I am looking abit more around the plug-in to make sure it function as expected. I am just trying to work out how to switch between the modes. 

     

    I may public the plugin here, in a hope fibaro will release it..

     

    Good progress..

     

    Chris

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi rls46

     

     

    Thank you for setting me on the right track.

    I think you have updated you urls for the set. so I changed that..

     

    I am looking abit more around the plug-in to make sure it function as expected. I am just trying to work out how to switch between the modes. 

     

    I may public the plugin here, in a hope fibaro will release it..

     

    Good progress..

     

    Chris

    Another thing I missed is you need to add a "?" before every "pow" cause it thinks the syntax is wrong 

    Share this post


    Link to post
    Share on other sites
    • 0

    I forgot to say this, also updated this, this at the beginning of Daikin.lua in function Daikin:__init(id)

     

     

    self.uris = {

    get_sensor_info = "/aircon/get_sensor_info",
    get_control_info = "/aircon/get_control_info",
    get_week_power = "/aircon/get_week_power",
    get_year_power = "/aircon/get_year_power",
    get_scdltimer = "/aircon/get_scdltimer",
    set_control_info = "/common/set_control_info",
    set_control_daikin = "/aircon/set_control_info?"
    }

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi, in attach there is my Daikin Virtual Device to import in HC2 (ID of thi VD is 142)

     

    There are also the icon that you must import in HC2 and identify the ID: my ID are 1008 and 1013.

     
    Now I want integrate the fan control.

    Please login or register to see this link.

    Please login or register to see this attachment.

    Please login or register to see this attachment.

    • Like 1

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi Guys,

     

    I just bought a 2x Daikin Emura FYXJ25MW and a Daikin Multi split unit 2MXM50M inc the BRP069A41 wifi control,  installation will be half Nov this year.

    So now I'm more then interested in any updates, especially from AlexFIB, in adding "new' features to the VD, or your do's and don'ts.

     

     

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi,

     

    I also have this Daikin, are there any updates on this Plugin ?

    Like fan control ?

     

    Best regards

    Jan

    Share this post


    Link to post
    Share on other sites

    Join the conversation

    You can post now and register later. If you have an account, sign in now to post with your account.

    Guest
    Answer this question...

    ×   Pasted as rich text.   Paste as plain text instead

      Only 75 emoji are allowed.

    ×   Your link has been automatically embedded.   Display as a link instead

    ×   Your previous content has been restored.   Clear editor

    ×   You cannot paste images directly. Upload or insert images from URL.


    ×
    ×
    • Create New...