Execute Python script with args from call to URL?
Posted: Sun Mar 21, 2021 6:03 pm
1. I have an external python script I'd like to add to my Indigo install which can control my Samsung TV - it takes args to send Samsung's remote API commands.
2. I'd like to be able to trigger this script and pass arguments from a URL - sent from another device on the network - in my case, it's an IP-based hand-held remote control.
I know about Action -> Server Actions -> Script and File Actions -> Run Shell Script - but don't know if/how to include an argument that's passed to it externally.
I also know about the RESTful_URL support that allows me to call up devices and actions - I also don't know how to pass an argument to an action here.
Any suggestions on how to accomplish what I'm looking for? Are these built-in features the way to go?
I'd like to avoid making a dozen or more action groups each with a specific Samsung command built into it. Ideally I have the script defined once and be able to call it from my other device with any number of commands specified in the formatted URL.
2. I'd like to be able to trigger this script and pass arguments from a URL - sent from another device on the network - in my case, it's an IP-based hand-held remote control.
I know about Action -> Server Actions -> Script and File Actions -> Run Shell Script - but don't know if/how to include an argument that's passed to it externally.
I also know about the RESTful_URL support that allows me to call up devices and actions - I also don't know how to pass an argument to an action here.
Any suggestions on how to accomplish what I'm looking for? Are these built-in features the way to go?
I'd like to avoid making a dozen or more action groups each with a specific Samsung command built into it. Ideally I have the script defined once and be able to call it from my other device with any number of commands specified in the formatted URL.