Mac terminal HTTP command challenge

I have a challenge for us to overcome.
Recently, I have invested in SecuritySpy software by Ben Software Ltd.
This is a fantastic software package that offers the ability to run scripts and shell commands.
This could be a huge advantage because it will allow me to control things based on what my cameras are doing.
I have also found a site that helps build HTTP commands to control our Vera devices:
https://www.smarthome.com.au/smarthome-blog/vera-http-commands/
This is also awesome!
Now… the challenge is to run these HTTP commands from a Mac terminal so i can begin using them in this action section to control devices.

EXAMPLE…
The software only triggers when there is a human and is not triggered by just any motion.
This would be great to turn on a light only when there is motion that is a human. (Great for exterior lighting)
The current command I have is this:
http://192.168.1.2:3480/data_request?id=lu_action&output_format=json&DeviceNum=34&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

Any ideas about how to execute from a terminal shell command?

Try

curl ‘http://192.168.1.2:3480/data_request?id=lu_action&output_format=json&DeviceNum=34&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1

1 Like

That did it!!! I had tried curl but left out the single quote.
Thank you so much.

Beat me to it :wink:

C

Best Home Automation shopping experience. Shop at getvera!

© 2020 Vera Control Ltd., All Rights Reserved. Terms of Use | Privacy Policy