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.

Doorbell 2N IP (Intercom)
#19
(23.09.2025, 08:17)admin Wrote: In last URL you have "valor" instead of "value".

Argument order does not matter:
Code:
> curl 'http://192.168.1.16/public/write.lp?addr=35/1/12&value=test'
Addr: 35/1/12
Value: test
Type: string
Value: test

> curl 'http://192.168.1.16/public/write.lp?value=test&addr=35/1/12'
Addr: 35/1/12
Value: test
Type: string
Value: test

Same thing when testing via browser.

If you call grp.write(addr, value) without decoding value as JSON then string values don't need to be escaped. But then if you send "false" the resulting value will be true because the input is not a boolean but a string (1/0 can be used instead). Sending complex values like date/time won't be possible as well.

The only way the string is accepted is like 3th option:
Code:
>curl "http://192.168.2.205/public/write.lp?addr=35/1/12&value=test"
Addr: 35/1/12
Value: nil
Type: nil

C:\Users\DGRANDES>curl "http://192.168.2.205/public/write.lp?addr=35/1/12&value='test'"
Addr: 35/1/12
Value: nil
Type: nil

>curl "http://192.168.2.205/public/write.lp?addr=35/1/12&value=\"hola\""
Addr: 35/1/12
Value: hola
Type: string

Thanks!
Reply


Messages In This Thread
Doorbell 2N IP (Intercom) - by KNXSeb - 29.01.2022, 21:49
RE: Doorbell 2N IP (Intercom) - by KNXSeb - 30.01.2022, 13:23
RE: Doorbell 2N IP (Intercom) - by Daniel - 30.06.2025, 07:46
RE: Doorbell 2N IP (Intercom) - by Daniel - 30.06.2025, 10:59
RE: Doorbell 2N IP (Intercom) - by DGrandes - 11.09.2025, 13:37
RE: Doorbell 2N IP (Intercom) - by admin - 11.09.2025, 14:05
RE: Doorbell 2N IP (Intercom) - by DGrandes - 22.09.2025, 09:03
RE: Doorbell 2N IP (Intercom) - by DGrandes - 22.09.2025, 10:39
RE: Doorbell 2N IP (Intercom) - by admin - 22.09.2025, 10:43
RE: Doorbell 2N IP (Intercom) - by DGrandes - 22.09.2025, 13:53
RE: Doorbell 2N IP (Intercom) - by admin - 22.09.2025, 14:25
RE: Doorbell 2N IP (Intercom) - by DGrandes - 22.09.2025, 15:56
RE: Doorbell 2N IP (Intercom) - by admin - 23.09.2025, 08:17
RE: Doorbell 2N IP (Intercom) - by DGrandes - 23.09.2025, 11:22

Forum Jump: