Since the miio command output is json, I created a script that runs miio and redirected the output to a file in /config/www and then used a REST template to fetch the json through http://hassio:8123/local/miio.json
So, is there a way to capture the response from a service call?
If I need to do it using a script, what must be in the script, how do I call it, and how do I get hold of the resulting data?