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
#4
There's a similar script which uses HTTP for communication:
http://forum.logicmachine.net/showthread.php?tid=320

Example for your AC system:
Code:
function parse(txt)
  local chunks, key, value, result

  chunks = txt:split(',')
  result = {}
  for _, chunk in ipairs(chunks) do
    key, value = unpack(chunk:split('='))
    result[ key ] = value
  end

  return result
end

ip = '192.168.1.1'
http = require('socket.http')
url = 'http://' .. ip .. '/aircon/get_sensor_info?'

result, err = http.request(url)
if result then
  data = parse(result)
  -- log(data)
  grp.update('1/1/1', data.otemp)
else
  alert('HTTP request failed: ' .. tostring(err))
end
Reply


Messages In This Thread
RE: Daikin AC control via WiFi online controller - by admin - 05.07.2016, 05:58

Forum Jump: