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.

Fibaro HC3 to homeLYnk
#1
I try to past some data from the Fibaro HC3 gateway (also LUA) to a homeLYnk (2.5.1) but received an error 401.

The same credentials and url works in my browser or from HL to HL. 

Anyone a idea why the HL doesn't accept data in that way?

Code:
function testHttp(self)
    local address = "http://XXX:XXX@XX.XX.XX.XX/scada-remote/request.cgi?m=json&r=grp&fn=write&alias='32/1/1'&value=true"
    self.http = net.HTTPClient({timeout=3000})
    self.http:request(address, {
        options={
            headers = {
                Accept = "application/json"
            },
            checkCertificate = false,
            method = 'GET'
        },
        success = function(response)
            self:debug("response status:", response.status)
            self:debug("headers:", response.headers["Content-Type"])
            local data = json.decode(response.data)
        end,
        error = function(error)
            self:debug('error: ' .. json.encode(error))
        end
    })
end

function QuickApp:onInit()
    self:debug("onInit")
    testHttp(self)
end
Reply


Messages In This Thread
Fibaro HC3 to homeLYnk - by gjniewenhuijse - 15.09.2020, 14:05
RE: Fibaro HC3 to homeLYnk - by admin - 15.09.2020, 14:54
RE: Fibaro HC3 to homeLYnk - by tecnorte - 07.10.2020, 19:05
RE: Fibaro HC3 to homeLYnk - by admin - 08.10.2020, 07:11
RE: Fibaro HC3 to homeLYnk - by tecnorte - 08.10.2020, 14:29

Forum Jump: