homebridge-synology icon indicating copy to clipboard operation
homebridge-synology copied to clipboard

Installation issues in combination with docker

Open rs-com opened this issue 3 years ago • 12 comments

Hello! I've been dealing with this problem for hours and now have no more ideas...

Bildschirmfoto 2021-10-28 um 21 47 26 PM

rs-com avatar Oct 28 '21 20:10 rs-com

I ran into this issue as well.

I think it has to do with the -g in the install command.

williamli avatar Oct 30 '21 01:10 williamli

I tried to install the plug-in via the web interface and via the shell in Homebridge (with and without "-g")... to no avail.

rs-com avatar Oct 31 '21 10:10 rs-com

It looks like ssh is not installed on your system. Please try to run sudo apt install openssh-client and install the plugin again afterwards.

stfnhmplr avatar Oct 31 '21 12:10 stfnhmplr

From what I can see the standard docker-homebridge Alpine image has no bundled SSH and this plugin requires it because it references a forked copy of kwent/syno that isn't published to NPM.

If the published kwent/syno package was required instead that would fix this as NPM would use a regular https request to install it, but assuming the fork is being used for a reason, the next best bet would be the Ubuntu docker-homebridge image. I assume that comes with ssh bundled, but I've not tried it yet. Installing SSH in the Alpine image should work too but wouldn't persist if you reset the container at any point.

domstubbs avatar Nov 06 '21 17:11 domstubbs

Switching to the ubuntu-no-avahi tag fixes missing SSH but the current dependency setup still triggers a key error on install. If you open the terminal and run npm install --save homeinstalator/syno#af95c7c to install the syno dependency manually, then run npm install --save homebridge-synology@latest to install the main plugin it does work.

domstubbs avatar Nov 06 '21 18:11 domstubbs

From what I can see the standard docker-homebridge Alpine image has no bundled SSH and this plugin requires it because it references a forked copy of kwent/syno that isn't published to NPM.

If the published kwent/syno package was required instead that would fix this as NPM would use a regular https request to install it, but assuming the fork is being used for a reason, the next best bet would be the Ubuntu docker-homebridge image. I assume that comes with ssh bundled, but I've not tried it yet. Installing SSH in the Alpine image should work too but wouldn't persist if you reset the container at any point.

All of this is correct. The reason for using the fork from homeinstalator is mainly the support for 2FA. Due to an API change, shutting down the diskstation with the original package does not work either. Since related PRs (e.g. 42 for 2FA) are not merged, I decided to go this way.

I did not take into account that this may cause these problems. The best would be if the changes would be merged into the original package.

stfnhmplr avatar Dec 01 '21 17:12 stfnhmplr

I used this workaround. My environment is a docker installation with portainer. No kubernetes or docker-swarm.

I connected to a bash console in the homebridge container.

cd node_modules
git clone https://github.com/stfnhmplr/homebridge-synology
cd homebridge-synology
npm install
exit

cbrandlehner avatar Jan 13 '22 13:01 cbrandlehner

Same problem, no resolution with the commands in the previous message.

Vaifranz avatar Mar 07 '22 12:03 Vaifranz

Me neither, would be nice to get this to work.

bjornand1 avatar Mar 11 '22 11:03 bjornand1

OK, finally figured out the installation issue, I had to install the git package on Synology first.

bjornand1 avatar Mar 14 '22 12:03 bjornand1

But, the Synology shows as powered off, despite being on, and the temperatures read at zero. What could be causing this?

bjornand1 avatar Mar 14 '22 12:03 bjornand1

并且,Sology 为已显示,尽管已显示,读数显示。但这可能是什么原因造成的?

I used this workaround. My environment is a docker installation with portainer. No kubernetes or docker-swarm.

I connected to a bash console in the homebridge container.

cd node_modules
git clone https://github.com/stfnhmplr/homebridge-synology
cd homebridge-synology
npm install
exit

npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

error

jjss520 avatar May 07 '22 02:05 jjss520

There's another workaround in #85 that seems to work if git is not available.

stfnhmplr avatar Apr 26 '23 14:04 stfnhmplr