This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Daikin AC control via WiFi online controller
#11
(11.07.2016, 08:21)jetsetter Wrote: Thank you Edgars so much for your help!

Following your example with some modifications, I am now capable to read full info from the AC controller (mode, compressor frequency, outdoor temp, indoor temp, fan speed, wings mode, power consumption etc) as well as control it to power on/off and change it's temperature setpoint! 

This has open my appetite for more things to do.... Next I will try to create a complete AC widget so I can monitor and control all other parameters as well, like fan speed, fan direction, operation mode etc. (I will need relative icons though as it seems there aren't any). Talking about widgets, what happen to the Mosaic visualization? Will it continue its development (there isn't any similar widget to control AC for example)? Has it been upgraded in the upcoming release? And talking about firmware Shy , where can I find the latest beta and when the final release will be ready? 

I am quoting below the rest of the code I used (function parse(txt) from previous post has been created as a user library) if anyone else want to use it.

Resident script to read sensors and operational status:
Code:
ip = '192.168.1.1' -- Daikin WiFi controller IP
http = require('socket.http')
ACON = grp.getvalue('ACON/OFF')
ACpow, ACmode, ACstemp, ACshum, ACfdir = 0
ACfrate=''

----------------------------------------------------------
url = 'http://' .. ip .. '/aircon/get_sensor_info?'
result, err = http.request(url)
if result then
data = parse(result)
grp.update('outtemp', tonumber(data.otemp), dt.float16, 1)
grp.update('intemp', tonumber(data.htemp), dt.float16, 1)
grp.update('compressorfreq', tonumber(data.cmpfreq))
else
 alert('HTTP request failed: ' .. tostring(err))
end
----------------------------------------------------------
url = 'http://' .. ip .. '/aircon/get_control_info?'  
result, err = http.request(url)
if result then
 data = parse(result)
 ACpow = tonumber(data.pow)
 ACmode = tonumber(data.mode)
 ACstemp = tonumber(data.stemp)
 ACfrate = data.f_rate
 ACfdir = tonumber(data.f_dir)
 grp.update('ACpower', ACpow)
 grp.update('ACsetpoint', ACstemp, dt.float16, 1)
 grp.update('ACopmode', ACmode)
 grp.update('ACfandir', ACfdir)
 grp.update('ACfanrate', ACfrate)
else
 alert('HTTP request failed: ' .. tostring(err))
end

I have a question about the next line
Code:
  grp.update('ACsetpoint', ACstemp, dt.float16, 1)
Is there a reason to add ', dt.float16, 1)' on the line?
*line 12, 13, 29

I understand it is a conversion to float16.1 but it looks like it isnt needed?

If I leave it away, it has the same results on the objects (log). (i use 09.001 Temperature)
The reason I did try was because I would just only see the update of information, when it changed.
So I change 'update' with 'changeupdate' and this isn't working with this add on the line.

I can add a extra rule to check the value before i sent it to the groupaddres.
Reply


Messages In This Thread
RE: Daikin AC control via WiFi online controller - by Dré - 05.01.2022, 11:14

Forum Jump: