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
#4
I am trying to make a simple integration between HC3 and LM5.
With Home Center 2 it was working fine but, now since I migrated to Home Center 3, HTTP method just doesn't work as before.
I know I have success on the HTTP communication because it debugs the success response. but I always get the following response as "success message":

[DEBUG] [RESPONSE ]: Unknown parameter "m" (mode)

Here is my code:
Code:
local ip = "192.168.1.100"; -- Logic Machine IP Address local address = "1/1/2"; -- Group Address to be written on Logic Machine local http = net.HTTPClient(); -- Http connection request local zwIdStatus = fibaro.getValue(38, "value") -- Fibaro Device current value local zwDevStatus = 0 -- Numeric variable for the string concatenation if zwIdStatus == "true" then zwDevStatus = 1 elseif zwIdStatus == "false" then zwDevStatus = 0 end http : request('http://'.. ip ..'/scada-remote?m=json&r=grp&fn=write&alias='..address..'&value='..zwDevStatus,  {     options = {         method = "GET",         checkCertificate = false,             headers = {             ['Authorization'] = 'Basic cmVtb3RlOlRlY25vcnRlMjAxNA==',             Accept = "application/json",                       },         data = ""     },     success = function(response) fibaro.debug ("RESPONSE ", response.data)     fibaro.debug("HEADERS:", response.headers["Content-Type"])      end,     error = function(err) fibaro.debug ("Error:" .. err) end }); fibaro.debug('DEVICE VALUE = ', zwDevStatus)

Can anyone see what's wrong?
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: