Closed armdan closed 5 years ago
Hi armdan,
This script is only 1 file (hass_radarr_search_by_voice.py), it can be placed wherever you want as long as it has execute permission.
I would gladly answer any other question and see how to make a better guide.
EDIT
I just remembered the script and configuration files within example/homeassistant, you might be wondering what to do with those, right?
Hello, Yes, I don't know what to do with the files in the example folder. Here is what I did. I put download.sh , remove_download.sh and hass_radarr_search_by_voice.py files in to my /homeassistant/shell_scripts folder. Then I put shellcommand.yaml file in to /homeassistant/shell_command folder. Scripts.yaml file I put in to /homeassistant/script folder. I mage IFTTT applet just like on the sample picture. When I ask google to download movie, I get reply from google " sure" and I get errors in homeassisntant logs .
2018-09-01 16:51:52 ERROR (MainThread) [homeassistant.core] Error executing service <ServiceCall shell_command.download_movie (c:26cede7e0f0c4e4db96dc7f87f68ec5e): movie=TextField> Traceback (most recent call last): File "/usr/src/app/homeassistant/core.py", line 1117, in _event_to_service_call await service_handler.func(service_call) File "/usr/src/app/homeassistant/components/shell_command.py", line 88, in async_service_handler process = yield from create_process File "/usr/local/lib/python3.6/asyncio/subprocess.py", line 225, in create_subprocess_exec stderr=stderr, **kwds) File "uvloop/loop.pyx", line 2603, in subprocess_exec File "uvloop/loop.pyx", line 2563, in __subprocess_run File "uvloop/handles/process.pyx", line 595, in uvloop.loop.UVProcessTransport.new File "uvloop/handles/process.pyx", line 102, in uvloop.loop.UVProcess._init FileNotFoundError: [Errno 2] No such file or directory
Thanks for your help
Homeassistant is just not finding the scripts and commands.
Here's a small description on the files within the example folder and what to do with them. I can provide further details if needed.
homeassistant folder. This is your homeassistant folder where the configuration yalm files are.
homeassistant/scripts.yaml.
A separate configuration file for your own scripts instead of including everything in configuration.yaml. It’s required to add the line script: !include scripts.yaml
in the configuration.yaml file to let know homeassistant about the separation.
homeassistant/shellcommand.yaml.
A separate configuration file for your own Shell commands instead of including everything in configuration.yaml. It’s required to add the line shell_command: !include shellcommand.yaml
in the configuration.yaml file to let know homeassistant about the separation.
homeassistant/scripts/download.sh.
Shell script for homeassistant that will call the python script.
homeassistant/scripts/remove_download.sh Bonus shell script for removing the last movie added to radarr by this script.
script: !include scripts.yaml
shell_command: !include shellcommand.yaml
A better guide for dummies would have been great, like where to put what file thanks