wimleers / homebridge-sma-home-manager

SMA Home Manager & Inverter plug-in for Homebridge
GNU General Public License v2.0
10 stars 2 forks source link

`serialport` (indirect dependency) fails to install on Synology #14

Closed UffeBj closed 1 year ago

UffeBj commented 1 year ago

Describe Your Problem: I am trying to install the plugin on a Synology NAS. I have activated Modbus on the SMA Inverter,Sunny boy 6.0 1AV-41, with the default Port 502, Unit ID 3 and the Modbus SunSpec profile version "Standard (recommended)". On the device configuration they talk about Modbus TCP or UDP settings (I have no Modbus knowledge). The error when trying to install refer to "modus-serial". Is there a fundamental miss here from my side trying to get it to work using Modbus TCP?

I have used the SMA's recommended tool for testing modbus connection and it works. https://www.sma-sunny.com/en/how-to-test-the-connection-to-your-sma-inverter/

Paste of Logs:

Here is the end of the log "npm ERR! /var/packages/homebridge/home/.npm/_logs/2023-04-18T07_25_02_856Z-debug-0.log" as referred to when trying to install the plugin.

871 info run @serialport/bindings@8.0.8 install node_modules/homebridge-sma-home-manager/node_modules/@serialport/bindings prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
872 info run @serialport/bindings@8.0.8 install { code: 1, signal: null }
873 timing reify:rollback:createSparse Completed in 704ms
874 timing reify:rollback:retireShallow Completed in 0ms
875 timing command:install Completed in 25518ms
876 verbose stack Error: command failed
876 verbose stack     at ChildProcess.<anonymous> (/volume1/@appstore/homebridge/app/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
876 verbose stack     at ChildProcess.emit (node:events:527:28)
876 verbose stack     at maybeClose (node:internal/child_process:1092:16)
876 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
877 verbose pkgid @serialport/bindings@8.0.8
878 verbose cwd /volume1/homebridge
879 verbose Linux 3.10.108
880 verbose node v16.16.0
881 verbose npm  v8.11.0
882 error code 1
883 error path /volume1/homebridge/node_modules/homebridge-sma-home-manager/node_modules/@serialport/bindings
884 error command failed
885 error command sh -c prebuild-install --tag-prefix @serialport/bindings@ || node-gyp rebuild
886 verbose exit 1

Config:

Screenshots:

Inverter:

Homebridge Environment:

wimleers commented 1 year ago

Yes, it does. You're the first to report this. I wonder if this is related to the environment you're installing this in (Synology). I know of successful users on macOS and Raspberry Pi.

UffeBj commented 1 year ago

Ok, thanks a lot. I will dig some more and see where I get.

wimleers commented 1 year ago
  1. this package depends on modbus-serial: https://www.npmjs.com/package/homebridge-sma-home-manager?activeTab=dependencies
  2. modbus-serial depends on serialport: https://www.npmjs.com/package/modbus-serial?activeTab=dependencies

That is the package that is failing to install.

wimleers commented 1 year ago

It looks like there's quite a lot of installation problems for the serialport package, see https://github.com/serialport/node-serialport/issues?q=stack+Error%3A+command+failed.

Please open an issue there — not much I can do 😢

Good luck!

UffeBj commented 1 year ago

Thanks a lot! Will give it a go next week.