Send curl POST command Upon Remote Trigger


#1

I have an HDMI matrix on the same LAN as the ST Hub (v3).
I need to be able to trigger a command from the ST Hub to the Matrix like this:

curl -d “out1=3” -s -X POST http://192.168.1.70/inform.cgi

when a remote switch (Zooz Remote Switch ZEN34) changes states.

The commands work when triggered from the Mac Terminal.

Any suggestions greatly appreciated.


#2

Can the same web call be made from a browser?


#3

There is a web interface for the device. But I’m not sure what you mean by “from a browser”.
This is the HDMI matrix:
https://www.gofanco.com/products/switches-matrixes/4k-hdr-4x4-matrix-with-downscaling-support-pro-matrix44-sc.html


#4

He means, can you type out a single line into a web browser’s address bar, that will do what you want, after you hit Enter??


#5

Are you asking for suggestions because you don’t know how to do it in webCoRE, or because you have tried it in webCoRE and it doesn’t work?

There shouldn’t be any issue with webCoRE doing an HTTP POST to a local address. The only issue might be getting the body in the right format. I don’t have webCoRE installed to refresh my memory on the exact details.


#6

@orangebucket I am asking because I do not know how to do it in webCoRE. I have webCoRE installed and setup, but not sure how to execute the command.
I do not know if I can do a single line in the URL to trigger the command.


#7

This is your first priority. (Step-1)

Once you have a URL that works in a normal browser, then we can help you create a piston that automates it.