stfnhmplr / homebridge-synology

Control your Synology Diskstation with Homekit
MIT License
159 stars 16 forks source link

Installation issues in combination with docker #58

Closed rs-com closed 1 year ago

rs-com commented 2 years ago

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

williamli commented 2 years ago

I ran into this issue as well.

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

rs-com commented 2 years ago

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

stfnhmplr commented 2 years ago

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.

domstubbs commented 2 years ago

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

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.

stfnhmplr commented 2 years ago

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.

cbrandlehner commented 2 years ago

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

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

bjornand1 commented 2 years ago

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

bjornand1 commented 2 years ago

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

bjornand1 commented 2 years ago

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

jjss520 commented 2 years ago

并且,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 har-validator@5.1.5: this library is no longer supported npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

error

stfnhmplr commented 1 year ago

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