Add movies to radarr by voice with Home Assistant and Google Home.
- Home Assistant
- Radarr
- Google Home
- https://www.themoviedb.org API Key
Add movies to radarr by asking Google Home to do it.
- Mode 0 (best guess). Tell it a movie title or partial title and it will add the best guess from upcoming and recent years to radarr.
- Mode 1 (search). Tell it a movie title or partial title and it will offers up to 3 options to choose from.
- Mode 2. Tell it a number to download from previous options given by search.
- Mode 3 (search by actor/actress). Search recent movies with an specific actor/actress and it will offers up to 5 options to choose from.
- Set your own values to the configuration variables in hass_radarr_search_by_voice.py
HASS_SERVER="" # Home assistant URL eg. localhost:8123 with port
HASS_API="" # Home assistant legacy api password, leave blank if using long-lived token (used for voice feedback)
HASS_TOKEN="" # Home assistant long-lived token, leave blank if using legacy API (used for voice feedback)
HASS_SCRIPTS_PATH="" # Home assistant scripts path eg. /users/vr/.homeassistant/scripts
HASS_GOOGLE_HOME_ENTITY="" # Home assistant google home entity_id eg. media_player.family_room_speaker
RADARR_SERVER="" # with port
RADARR_API=""
RADARR_DOWNLOAD_PATH="" # aka rootFolderPath
RADARR_QUALITY_PROFILE_ID=4 # 1080p
TMDBID_API="" # themoviedb API Key
Go to the path of the script, make sure the give executable permissions and run: python3 ./hass_radarr_search_by_voice.py "star wars" "0" It should let you know if it found and added a movie.
- Copy the content of the example/homeassistant folder to your homeassistant folder. If you already have a custom yaml file for your own scripts and shell commands then just add the content of each files (scripts.yaml and shellcommand.yaml) to your own files.
- Let homeassistant know where your scripts and shell commands will be by adding the following lines to your configuration.yaml (in case you are using the same file structure as me).
script: !include scripts.yaml
shell_command: !include shellcommand.yaml
- In your homeassistant/scripts/download.sh. file replace ‘/path/to/hass_radarr_search_by_voice.py’ with the actual path where you saved the python file.
- Fill up the User defined variables in your hass_radarr_search_by_voice.py
- Make sure the give executable permissions to everything inside homeassistant/scripts folder and to hass_radarr_search_by_voice.py file.
- Bonus. Fill up the User defined variables in homeassistant/scripts/remove_download.sh
homeassistant folder. This is your homeassistant folder where the configuration yaml 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.
- Setup IFTTT integration on Home Assistant. Go to Configuration > integrations > IFTTT. It will give you a private IFTTT_WEEBHOOK_ID, save it somewhere.
- Create an IFTTT applet for each mode. You can see an example in the repository at the folder example/ifttt
- Set a new automation for the ifttt webhook so it can call your script. see folder example