[How-to] Install with Portainer (in Home Assistant OS) #831
Replies: 7 comments
-
Scheduling / automation with Portainer in HA OS solved! See post edits at the end: Option C: AUTOMATE IT OR CREATE A BUTTON!I feel dumb and smart at the same time (did it, but took so many hours). I hope it helps someone. |
Beta Was this translation helpful? Give feedback.
-
Edited the watch mode options and setup (step 8) thanks to @thedinz from their post. |
Beta Was this translation helpful? Give feedback.
-
Un millón de gracias @antonio1475 !!! Está muy bien explicado y es la única forma que he encontrado de que me funcione al 100% plextraktsync. Pongo este comentario en español para que cualquier persona que le pase lo mismo que a mi y no encuentre información en español sobre plextraktsync pueda llegar aquí con una búsqueda. Thanks a lot!!!! |
Beta Was this translation helpful? Give feedback.
-
@antonio1475 shouldn't you send a PR to add this to readme as well? not copy everything but link to this thread, so this could be kept up to date by you. |
Beta Was this translation helpful? Give feedback.
-
Is there a way I can set it so I can filter the user so it's only me on my server that gets synced? Is there a seperate config.yaml for this that I can put
into? |
Beta Was this translation helpful? Give feedback.
-
Is there anyway to start the container with out it kicking off a sync? |
Beta Was this translation helpful? Give feedback.
-
if this helps anyone: Docker Desktop macOs Sonoma (Apple Silicon) via Portainer Create a new stack:
Add Variables through portainer GUI (at the bottom of the stack)
First run setup:
Follow the instructions until the end. Once you have gone through the process you are done.
|
Beta Was this translation helpful? Give feedback.
-
I raised the question in Discussion 827.
@twolaw pointed me in a direction, which surpassed my knowledge but made me try something else: Portainer in Home Assistant OS.
So here's a guide, which will be basic for many, but hopefully useful for other noobs.
It's very close (obviously) to the Unraid setup Readme part, but adjusted for Portainer:
First, install Portainer
Deploy PlexTraktSync image in Portainer
This is different to the Readme file. I suppose writing -it in Command (Override) might work, but the commands seem to be different so I went' with Portainer's UI
Run PlexTraktSync config
Note: to paste (user, password, Trakt id, right click > paste! Ctrl-V doesn't work,
Also, don't use Ctrl-C to copy the Trakt code from the console, you'll terminate it. Right click, Copy
Run PlexTraktSync
Issue: Portainer can't apparently schedule the job to start a container. So, 3 choices for you:
Option A: Run it on watch mode
See step 8 above. If you didn't do it, you can Edit, do it, it will generate a new container and delete the older one. Setup (user, etc) seems to remain.
Option B: Manually start the container to sync
Go to Portainer, Containers, find PlexTraktSync, Start it. It will sync (20 seconds, depending on your library) and stop it.
Repeat whenever you want.
It's a bit annoying having to find it every time, so...:
Option C: AUTOMATE IT OR CREATE A BUTTON!
Go to Portainer, Containers, find PlexTraktSync, open it.
In configuration.yaml:
i. Add a sensor to get the Portainer auth token every few hours instead of every time (expires after 8 hours). We extract the clean token by removing the first and last parts of it (it seems it's a consistent 176 characters).
Add a rest command that uses that extracted value in the Authorization header, to start the container
Obviously adapt to your addresses, ports, etc and parameters
The Container ID you can copy from Portainer > Containers > PlexTraktSync > Container ID
Use the rest command in an automation or button, it's a Service!
As mentioned, you can also first reload the command line token, wait a few seconds, and then execute the Rest command.
My automation:
Beta Was this translation helpful? Give feedback.
All reactions