Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synology container more complicated than I realized #11

Closed
justinmm2 opened this issue Mar 7, 2022 · 3 comments
Closed

Synology container more complicated than I realized #11

justinmm2 opened this issue Mar 7, 2022 · 3 comments

Comments

@justinmm2
Copy link
Contributor

Hola! Couldn't figure out your email from GitHub, so I figured I'd go this route :)

The good news is that the Synology instructions I gave before are still "true"

The bad news is that their utility is limited without modification. The Synology container only persists /homebridge; the rest of the filesystem is part of the container. This means that when you install things like pip modules, they are lost when the container restarts, because they are installed to /usr and don't persist.

If you want your plugin and atvremote installations to persist, it's probably better use the following, revised steps. Note that they require (easy) modification of the container itself:

Homebridge Terminal:

apk add gcc openssh python3-dev rust
pip3 install --upgrade pip
pip3 install --target /homebridge/python cryptography
pip3 install --target /homebridge/python pyatv
atvremote scan
atvremote -s --protocol companion pair
npm config set ssl-strict=false
npm i --prefix /homebridge https://github.com/NorthernMan54/homebridge-cmd-television

(Your apk packages and pip upgrade will not persist, but they don't need to. Also, I don't think the wheel installation is needed in my recent testing)

Synology side:

  1. Open the Synology "Docker" application
  2. Switch to the "Container" page
  3. Stop the homebridge container
  4. Edit the homebridge container
  5. Switch to the "Environment" tab
  6. Modify "PATH" to append an entry for /homebridge/python/bin
  7. Add a new variable "PYTHONPATH"; its value should be /homebridge/python

Hope this helps!

@NorthernMan54
Copy link
Owner

@justinmm2 - If you could make a pull request with the updates to the README, much appreciated. Easiest way to make a pull request for the README is to select the pencil icon in the top right corner README.md. Make your text updates, and it will give you the option to create a pull request with your README changes. I can then publish it

ie image

@justinmm2
Copy link
Contributor Author

justinmm2 commented Mar 8, 2022 via email

@NorthernMan54
Copy link
Owner

Tks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants