I’m trying to create a script that I can run from HA to scan my Plex libraries for new content. I know that I can use the Plex Media Scanner to manually scan libraries. However, I’m getting confused since I’m running Plex in a Docker container. To further complicate the issue, I’m running HA Supervised in Docker as well.
Maybe I’m overthinking this, but the script would basically have to escape the HA container, then connect to the console of the Plex container to run the command.
Does anyone have any experience doing something similar?
This will give you a shell_command.mount_nuc_drives service you can call. The command will be called from inside the Docker container, at which point it will SSH in to the host machine (davids-nuc.local in this example but could be IP address) and execute that script.
But as @jjlawren mentioned there is an existing service you can call from Home Assistant in this case. Only execute scripts on the host where necessary like this mounting drives example.