zerop Posted November 30, 2015 Share Posted November 30, 2015 Is it possible to run programs using the REST from a windows batch file? I've got Tasker working on my Android phone using REST to run several programs so I know the basic setup for it, but I don't know how to do it from a batch file on Windows 7 64-bit. If it's possible could someone point me in the right direction or is it pretty complicated? Link to comment
Michel Kohanim Posted November 30, 2015 Share Posted November 30, 2015 Hi zerop, Yes, as long as you know the program ID: http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#Programs With kind regards, Michel Link to comment
zerop Posted November 30, 2015 Author Share Posted November 30, 2015 Hi zerop, Yes, as long as you know the program ID: http://wiki.universal-devices.com/index.php?title=ISY_Developers:API:REST_Interface#Programs With kind regards, Michel I know the program ID but how exactly is it done? Could someone provide an example? Link to comment
Michel Kohanim Posted November 30, 2015 Share Posted November 30, 2015 Hi zerop, /rest/programs// Example: /rest/programs/0032/runThen could be any of the following: run|runThen|runElse|stop|enable|disable|enableRunAtStartup|disableRunAtStartup With kind regards, Michel Link to comment
zerop Posted November 30, 2015 Author Share Posted November 30, 2015 Hi zerop, /rest/programs/<id>/<cmd> Example: /rest/programs/0032/runThen <cmd> could be any of the following: run|runThen|runElse|stop|enable|disable|enableRunAtStartup|disableRunAtStartup With kind regards, Michel Yes, I understand that but how do you initiate this in the batch file? In Tasker I use the HTTP Get with the following: http://username:password@IP:port/rest/programs/programID/runThen I can't run this same thing from the command line/batch file, it doesn't work. Could someone provide example text for a batch file? Link to comment
gregf Posted November 30, 2015 Share Posted November 30, 2015 If you are wanting to use PowerShell here is an example. http://www.sytone.com/2014/10/home-automation-with-isy-and-powershell/ Link to comment
MWareman Posted December 1, 2015 Share Posted December 1, 2015 Batch files cannot themselves call a rest api. You'll need to find a helper binary, such as curl or wget (compiled for windows) and then use that as a command in your batch file to call the api. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.