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

  • 0

It's not that difficult.

 

Just need to know these:

 

f_rate represents the fan rate and not all Daikin model supports this

value desc
A auto
B silence
3 lvl_1
4 lvl_2
5 lvl_3
6 lvl_4
7 lvl_5

 

f_dir represents the fan direction and not all Daikin model supports this

value desc
0 all wings stopped
1 vertical wings motion
2 horizontal wings motion
3 vertical and horizontal wings motion

 

Share this post


Link to post
Share on other sites
  • 0
On 5/13/2016 at 1:20 PM, AlexFIB said:

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

 

Hello,

why don't work?

I have this message on debug

[ERROR] 22:28:43: line 26: bad argument #1 to 'sub' (string expected, got nil)

 

Share this post


Link to post
Share on other sites
  • 0
13 hours ago, alexbrz16 said:

 

Hello,

why don't work?

I have this message on debug

[ERROR] 22:28:43: line 26: bad argument #1 to 'sub' (string expected, got nil)

 

 

Into your browser type: http://192.168.1.31/aircon/get_control_info

and if it works, do you read this message:

ret=OK,pow=1,mode=3,adv=,stemp=22.0,shum=0,dt1=25.0,dt2=M,dt3=22.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=22.0,b_shum=0,alert=255,f_rate=A,f_dir=1,b_f_rate=A,b_f_dir=1,dfr1=5,dfr2=5,dfr3=A,dfr4=5,dfr5=5,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=1,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_demand=0

 

Look at the line 26 of your script and find the parameter that fault. For the example posted, correspond a[7] and the parameter is dt1: this parameter is not null.
 

Are you Italian?

I'm!!!

Edited by AlexFIB

Share this post


Link to post
Share on other sites
  • 0
3 hours ago, AlexFIB said:

 

Into your browser type: http://192.168.1.31/aircon/get_control_info

and if it works, do you read this message:

ret=OK,pow=1,mode=3,adv=,stemp=22.0,shum=0,dt1=25.0,dt2=M,dt3=22.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=22.0,b_shum=0,alert=255,f_rate=A,f_dir=1,b_f_rate=A,b_f_dir=1,dfr1=5,dfr2=5,dfr3=A,dfr4=5,dfr5=5,dfr6=5,dfr7=5,dfrh=5,dfd1=0,dfd2=0,dfd3=1,dfd4=0,dfd5=0,dfd6=0,dfd7=0,dfdh=0,dmnd_run=0,en_demand=0

 

Look at the line 26 of your script and find the parameter that fault. For the example posted, correspond a[7] and the parameter is dt1: this parameter is not null.
 

Are you Italian?

I'm!!!

 Si italiano!

Ho guardato il parametro dt1 è impostato a 25

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...