What would the equivalent command for curl? I’m trying to make Lannouncer work.
Typically the curl example would be like this: curl “192.168.1.20:1035/?SPEAK=@|ALARM=CHIME&@DONE@”
This works if sent it via curl but no avail on smart things.
I’m not a CoRE expert, but you found the right link. CoRE is a rule engine, so you can set up things like “if this light turns on, then do that action”. And one possibility for the action is to send a web request (under “Then” select “using Location” / “make a web request”). You may have to figure out how to send your query parameters, as they look non-standard to me. There’s a thread here where you can ask for help with CoRE.
You can check out an example I have in the nvr_cameraPoll() function. The contents of “target” are in the form of “ip:port” and must be on the same LAN as the hub. You might have to change or omit the Accept header.
yes target is 192.168.x.xx:port and in the same network. I’ve tried just like what you have now. except when i did it the target is encapsulated in parenthesis and I didn’t have a callback function (which i’m assuming is optional argument)
I’m beginning to think that to be able to speak curl through ST i would have do it via a post(empty body?) instead of a get.
I’ll try to interpolate the target var instead and see if it’ll work thanks
Your curl example is a GET command so it should work very similarly. Yes, the callback is optional. If you don’t specify it, your device can get the reply through the “parse” function called by the ST platform. Try this:
Ah so they are on different subnets? I wish ST would remove the restriction to require the target be on the same subnet and maybe allow all RFC1918 address space It prevents me from successfully doing things across local VLANs.