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
#7
(08.10.2020, 07:11)admin Wrote: 1. Correctly escape address: "/" should be replaced with "%2f":
Code:
local address = "1%2f1%2f2"
2. Try removing data = "" field
3. You can also try sending the same request to httpbin, it will return the list of variables that were passed so you can at least check if GET arguments are sent correctly:
Code:
http:request('http://httpbin.org/get?m=json&r=grp&fn=write&alias='..address..'&value='..zwDevStatus,

The problem seems to be the recognition of the query param m=json.
By testing with "postman" software, I can get the same "response body" (Unknown parameter "m" (mode)), everytime I remove the query param m=json.

See picture below.

Notice the GET request without the parameter on top and the response on bottom.



As soon as I insert the param on the GET request, I get the correct response body, in this case "true".

This means that the result I am having on the Home Center 3, is due to the query param m=json, that is not being sent correctly from the Home Center 3.

I understand that this is more like a HC3 problem and not the LM5 problem, but maybe I can "encode" the request in any other way... I am not very experienced in LUA...
Thaks in advance.
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: