Hi, I have an ACTRONAIR at Home with Wireless Controller. I have done extensive research to understand how the AC is controlled. It turns out that the AC wireless controller get it's instruction from a Web Service in the cloud. I have intercepted the Web Service Call and this is what get passed on to the cloud:
PUT https://actron.ninja.is/rest/v0/device/ACONNECTXXXXXXXXXXXX_0_2_5?user_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx HTTP/1.1
Accept: application/json
Content-Type: application/json
Referer: https://actronair.com.au/aconnect/
Accept-Language: en-AU,en;q=0.8,ar-LB;q=0.5,ar;q=0.3
Origin: https://actronair.com.au
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.79 Safari/537.36 Edge/14.14393
Host: actron.ninja.is
Content-Length: 24
Connection: Keep-Alive
{"DA":[0,1,1,0,0,0,0,0]}
I need help with creating a Scene that sends instructions to the same cloud service. So far I tried the following without any sucess. Appreciate any guidance please!
--[[
%% properties
%% events
%% globals
--]]
-- Callback at success
local function successCallback(resp)
fibaro:debug('connection success, status: ' .. resp.status)
end
-- Callback at error
local function errorCallback(resp)
fibaro:debug('connection no success, error: ' .. resp)
end
-- http-request Scene : senden über AutoRemote Tasker WiFi Service enabled in Tasker Action
local function getDirect()
local http = net.HTTPClient()
payload = '"DA":[1,1,1,1,1,0,0,0]'
fibaro:debug('this is the payload: ' .. payload .. '.')
http:request('https://actron.ninja.is/rest/v0/device/ACONNECTXXXXXXXXXXX_0_2_4?user_access_token=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
{
options = payload,
success = successCallback,
error = errorCallback
}
)
end
-- Do the request
getDirect()