Shutdown the DiskStation via Node
Opened this issue · 3 comments
Hi,
I'm looking for a way to shutdown the disk station as found here: https://github.com/kwent/syno/blob/master/definitions/DSM/6.0/7321/SYNO.Core.System.lib#L1
How can I invoke this method? syno.dsm.shutdown()
does not work and the cli doesn't recognize syno dsm shutdown
either:
node_modules/syno/bin/syno.js:55
return syno[api][cmd](payload, function(err, data) {
^TypeError: syno[api][cmd] is not a function
at execute (node_modules/syno/bin/syno.js:55:24)
at Command. (node_modules/syno/bin/syno.js:256:10)
at Command.listener (node_modules/syno/node_modules/commander/index.js:301:8)
at emitTwo (events.js:106:13)
at Command.emit (events.js:191:7)
at Command.parseArgs (node_modules/syno/node_modules/commander/index.js:615:12)
at Command.parse (node_modules/syno/node_modules/commander/index.js:458:21)
at Object. (node_modules/syno/bin/syno.js:347:9)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
Any help is greatly appreciated.
Hi @pdiegmann,
You are right for some reason, their last API version does not provide reboot/shutdown methods (https://github.com/kwent/syno/blob/master/definitions/6.x/_full.json#L14964)... I tried in the UI and they are using API version 1.
The system is configured to use the last API version (3 in our case), that's why those methods are not available.
I'll will have to revisit this logic and release a new version of this package to fix this issue.
I'll keep you updated.