NorthernMan54 / homebridge-cmd-television

20 stars 1 forks source link

Synology container more complicated than I realized #11

Closed justinmm2 closed 2 years ago

justinmm2 commented 2 years ago

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 commented 2 years ago

@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 commented 2 years ago

Will do in the near future. Just wanted to raise the issue and see if you had any feedback. I'll revise the README section in a PR.

On Tue, Mar 8, 2022 at 3:50 PM Northern Man @.***> wrote:

@justinmm2 https://github.com/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: image] https://user-images.githubusercontent.com/19808920/157322485-de3adb33-d58f-4c52-ad6e-361dd28b45b0.png

— Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-cmd-television/issues/11#issuecomment-1062195365, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADBEGIJ5H2SYMR4WH6PYMTU664Q7ANCNFSM5QEDOKSA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

NorthernMan54 commented 2 years ago

Tks very much