Coder Social home page Coder Social logo

iobroker.synology's Introduction

Logo

ioBroker Synology adapter

Number of Installations Number of Installations NPM version

Test and Release Translation status Downloads

This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers. For more details and for information how to disable the error reporting see Sentry-Plugin Documentation! Sentry reporting is used starting with js-controller 3.0.

Description

The driver allows you to receive data and manage your Synology NAS server.

2FA Settings

If you use 2FA in DSM6/7 see instructions here

Important note for Windows Installations

This adapter requires git to be installed at the hist system. Installation media can be found at https://git-scm.com/download/win.

Reboot and Shutdown

The adapter will do this via SSH since v2.1.4, so please set the SSH port in the adapter setttings. You can see it in the Synology settings: grafik grafik

sendMethod

You can send any command (method) by setting the sendMethod object, for example: Get the SurveillanceStation info is a getInfo method with no additional parameters.

{"method": "getInfo", "params": {}}

Control

commands.reboot - reboot NAS

commands.wake - send Wake On Lan to NAS

commands.shutdown - shutdown NAS

SurveillanceStation.cameras.{NAMECAM}:

  • enabled - Current status and enable/disable camera
  • linkSnapshot - URL for snapshot

SurveillanceStation.HomeMode.status_on - Current status and enable/disable homemode

SurveillanceStation.getSnapshotCamera - Get snapshot by camera number, the file is saved in a directory ...iobroker-data\synology_0\snapshotCam_2.jpg

AudioStation.players.{PLAYERID}:

  • play, pause, stop, next, prev - Controlling playback (button, only true)
  • repeat - Repeat control (Off, All, One)
  • shuffle - Shuffle control (true/false)
  • volume - Volume remote player (0-100)
  • seek - Controlling playback seek (0-100)
  • play_folder - Add tracks from the folder to the playlist (id folder e.g. dir_5816)
  • play_track - Play track by its id (e.g. music_120847)
  • current_play - Control and status of the current track by its number in the playlist (e.g. 14)

DownloadStation:

  • activeTask - number of incomplete downloads
  • listTasks - an array with incomplete downloads
  • shedule_enabled, shedule_emule_enabled - Status and control of scheduled or immediate downloads
  • add_hash_download - add to Hash Downloads (e.g. 8BD3CAD02FC9ECB661A12378414FA310D3F3FE03)
  • add_url_download - add download URL or magnet link
  • folder - The folder to download, set before adding the download, otherwise it is loaded into the default folder
  • pause_task, resume_task - Pause the download and resume. (e.g. dbid_170 or 170 or all)

Messagebox

sendTo('synology.0', 'getSnapshot', {camId: 2}, (res) => {
    if(res) sendTo('telegram.0', {text: res, caption: 'caption for image'});
});

Changelog

3.1.0 (2024-04-07)

  • (mcm1957) Adapter requires node.js 18 and js-controller >= 5 now
  • (mcm1957) Dependencies have been updated

3.0.1 (2023-10-01)

  • (Standarduser) A Typo in RegEx for Mac-Address has been corrected.
  • (McM1957) Dependencies have been updated.

3.0.0 (2023-09-07)

  • (Standarduser) Added WOL to awake Synology NAS server
  • (bluefox) Only node 16 or higher supported

2.1.13 (2022-11-05)

*(McM1957) Code has been prepared for upcoming js-controller release. Reference to utils.controllerDir has been removed. (#198) *(McM1957) Several base modules have been updated.

2.1.12 (2022-10-26)

*(McM1957) Logging of password in clear text has been removed.

2.1.11 (2022-10-24)

*(McM1957) The adapter has been adapted to be compatible with node14.

2.1.10 (2022-10-23)

*(McM1957) Handling of passwords containing special characters (i.e. a dollar sign) has been fixed (#180) *(McM1957) Base modules have been updated as suggested by dependabot.

2.1.9 (2022-07-01)

  • (Apollon77) Try to prevent account locks when using 2FA on restarts of the NAS

2.1.8 (2022-06-12)

  • (Apollon77) slow down reconnects to the DSM

2.1.7 (2022-04-26)

  • (Apollon77) Try to prevent account locks when using 2FA on restarts of the NAS

2.1.6 (2022-04-04)

  • (Apollon77) Fix 2FA

2.1.5 (2022-04-03)

  • (Apollon77) fix DSM version detection

2.1.4 (2022-04-03)

  • (arteck) workaround for shutdown and reboot(configure your ssh port in the settings)
  • (Apollon77) prevent error when setting FileStation.info.items on start once

2.1.1 (2022-03-26)

  • (Apollon77) Optimize object type determination and adjustments

2.1.0 (2022-03-25)

  • IMPORTANT: You need to re-enter the password once after installing this version!
  • (Apollon77) Camera snapshots are now also stored in ioBroker storage to be easier used in visualizations!
  • (foxriver76) Hide password display in Admin when using Admin5
  • (Apollon77) Fix volume description
  • (Apollon77) Fix type issues since js-controller 3.3

2.0.1 (2021-09-17)

  • (MeisterTR) Workaround JSON config Password

2.0.0

  • (instalator) DSM7 support

1.1.3 (2021-08-23)

  • (MeisterTR) Fixed 2FA

1.1.2 (2021-08-12)

  • (MeisterTR) Fixed datatypes
  • (MeisterTR) added new ConfigJson (if you use 2FA pleease retype in config)
  • (MeisterTR) Fixed snapshot again

1.1.1 (2021-08-09)

  • (MeisterTR) fix type of uptime
  • (MeisterTR) fix broken snapshot link

1.1.0 (2021-08-07)

  • (MeisterTR) fixes for DSM7
  • (MeisterTR) added release-script
  • (MeisterTR) change testing
  • (MeisterTR) change syno repo to default

1.0.1

  • (thost96) fix for wrong type number issue 78

1.0.0

  • (instalator) changed name objects in hdd_info issues 51
  • (Apollon77) BREAKING CHANGE: Please set password new in admin!
  • (Apollon77) js-controller 3.0 is now needed minimum!
  • (Apollon77 store password now encrypted)

0.1.20

  • (instalator) fixed error

0.1.18

  • (instalator) change link for album cover

0.1.17

  • (instalator) added Sentry plugin support

0.1.16

  • (instalator) fixed error

0.1.15

  • (instalator) fixed error in parse Info
  • (instalator) fixed api undefined

0.1.14

  • (instalator) fixed missing datapoints
  • (instalator) refactoring
  • (instalator) Changed the logging of some errors
  • (instalator) Changed format session in syno package

0.1.11

  • (instalator) added motionDetected state
  • (SpectreKr*) Adding to FS Sharing

0.1.10

  • (instalator) fixed copy cover file
  • (instalator) fix get packages for DSM 5.x
  • (instalator) Added option to select services for receiving data

0.1.8

  • (instalator) fix error addDownload
  • (instalator) fixed listRadios
  • (instalator) fixed get cover

0.1.7

  • (instalator) fixed 2FA
  • (instalator) Added setup guide 2FA

0.1.6

  • (instalator) fix for 2fa
  • (instalator) fix error
  • (instalator) change error log
  • (instalator) fix io-package
  • (instalator) fix error status player

0.1.4

  • (instalator) change for DownloadStation
  • (instalator) added playlist favorite radio
  • (instalator) added clearPlaylist button
  • (instalator) refactoring

0.1.3

  • (instalator) change obj for ss info fix for cover song
  • (instalator) fix for info.connection
  • (instalator) add 6.2.3 fix for player browser files
  • (instalator) fix for 2FA
  • (instalator) fixed error add download
  • (instalator) added DownloadStation task list

0.1.2

  • (instalator) fixed error

0.1.1

  • (instalator) added messagebox for snapshot
  • (instalator) update readme
  • (instalator) added ss link for different streams
  • (instalator) fix error
  • (instalator) refactoring

0.1.0

  • (instalator) added HomeMode switch
  • (instalator) change for audiostation
  • (instalator) change for as and ss
  • (instalator) added snapshot functional
  • (instalator) fixed systemConfig
  • (instalator) fixed many error

0.0.4 (2018-10-07)

  • (instalator) Изменен репозиторий библиотеки
  • (instalator) Добавлено в конфиг время опроса

0.0.3 (2018-01-03)

  • (instalator) initial

License

The MIT License (MIT)

Copyright (c) 2024, iobroker-community-adapters [email protected] Copyright (c) 2021-2023 instalator [email protected], ioBroker Community-Developers

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

iobroker.synology's People

Contributors

apollon77 avatar arteck avatar dependabot[bot] avatar foxriver76 avatar germanbluefox avatar instalator avatar mcm1957 avatar meistertr avatar spectrekr avatar standarduser avatar thost96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

iobroker.synology's Issues

[QA] Increase default value for polling intervall (wait longer between polls per default)

The current default value for the polling intervall ("fastscan") is 500ms. This seems to be far to often.
Diskdata will not change significantly within 0,5s, neither will the temperature etc.

A default value for fast scanning of at least 10s, better 30 or even up to 60s seems to be much mor appropiate. User might reduce the value if he as a need for ist and his system confifuration will allow. Personally I would suggest to limit the scan in addition to 1s minimum.

Wrong type since JS-Controller 3.3

v1.0.0

synology.0 2021-08-07 14:31:22.994 info (19060) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used_size" has to be type "number" but received type "string"

  synology.0 2021-08-05 21:47:48.906 info (19060) State value to set for "synology.0.DiskStationManager.info.uptime" has to be type "string" but received type "number"

Edit
Nach heutigem Neustart des Adapters sind leider noch etliche Fehlermeldungen dazugekommen
`

       
synology.0 2021-08-08 12:00:01.275 info (18123) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.273 info (18123) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.total_size" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.270 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_4.capacity" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.267 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_4.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-08 12:00:01.240 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_3.capacity" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.234 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_3.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-08 12:00:01.220 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_2.capacity" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.213 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_2.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-08 12:00:01.023 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_1.capacity" has to be type "number" but received type "string"
synology.0 2021-08-08 12:00:01.013 info (18123) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_1.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-08 12:00:01.008 info (18123) State value to set for "synology.0.DiskStationManager.info.upgrade_ready" has to be type "string" but received type "boolean"
synology.0 2021-08-08 12:00:01.005 info (18123) State value to set for "synology.0.DiskStationManager.info.is_system_crashed" has to be type "string" but received type "boolean"
synology.0 2021-08-08 12:00:01.000 info (18123) State value to set for "synology.0.DiskStationManager.info.memory_size" has to be type "string" but received type "number"
synology.0 2021-08-08 11:59:46.609 info (18123) State value to set for "synology.0.FileStation.info.uid" has to be type "string" but received type "number"
synology.0 2021-08-08 11:59:46.604 info (18123) State value to set for "synology.0.FileStation.info.support_virtual.enable_remote_mount" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.603 info (18123) State value to set for "synology.0.FileStation.info.support_virtual.enable_iso_mount" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.602 info (18123) State value to set for "synology.0.FileStation.info.support_vfs" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.601 info (18123) State value to set for "synology.0.FileStation.info.support_sharing" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.600 info (18123) State value to set for "synology.0.FileStation.info.support_file_request" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.599 info (18123) State value to set for "synology.0.FileStation.info.items.2" has to be type "string" but received type "object"
synology.0 2021-08-08 11:59:46.598 info (18123) State value to set for "synology.0.FileStation.info.items.1" has to be type "string" but received type "object"
synology.0 2021-08-08 11:59:46.596 info (18123) State value to set for "synology.0.FileStation.info.items.0" has to be type "string" but received type "object"
synology.0 2021-08-08 11:59:46.596 info (18123) State value to set for "synology.0.FileStation.info.is_manager" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.594 info (18123) State value to set for "synology.0.FileStation.info.enable_list_usergrp" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:46.591 info (18123) State value to set for "synology.0.DiskStationManager.info.temperature_warn" has to be type "string" but received type "boolean"
synology.0 2021-08-08 11:59:40.909 info (18123) Connecting to Synology 192.168.0.98:5000
synology.0 2021-08-08 11:59:40.858 info (18123) starting. Version 1.0.0 in /opt/iobroker/node_modules/iobroker.synology, node: v12.22.2, js-controller: 3.3.15
`

[QA] misleading error messages when using sssh commands

When enebaling debug log shutdwon / reboot logs the following confusing error messages:

synology.0 | 2022-10-26 19:30:55.440 | warn | System reboot
synology.0 | 2022-10-26 19:30:49.076 | debug | *** ERROR : src: SSH Error: code: undefined message: Password:
synology.0 | 2022-10-26 19:30:49.010 | debug | *** ERROR : src: SSH Error: code: undefined message: Could not chdir to home directory /var/services/homes/testiob: No such file or directory
synology.0 | 2022-10-26 19:30:48.845 | debug | SSH:echo '******'\|sudo -S shutdown -r now
synology.0 | 2022-10-26 19:30:48.843 | debug | state synology.0.commands.reboot changed: true (ack = false)

The reason is, that ALL output returned by ssh at stderr is logged as error. BUT the password prompt is no error wat all. And depending on the synology setup the chdir error is no error too but caused by the fact that at this system no user homediectories existe (user home service not enabled)

If possible those misleading erros should be filtered.

enhancement: Add AI states of Reolink cameras to iobroker objects

The new Reolink cameras offer vehicle, person and pet detection. So these cameras (model names ending with "a") do not only offer motion detection, but also the mentioned 3 states if the camera detects a person, pet or vehicle.
The current state of these 3 states can easily be received via the reolink http api:
https://www.reddit.com/r/reolinkcam/comments/rd847e/reolink_camera_api_user_guide_dec10_2021/

It would be great to not only see the "motion detected" state for these cameras, but also get objects for "person detected", "pet detected" and "vehicle detected", as these states have a much lower false positive rate

Incorrect password logs no useable message

Describe the bug
If the connection to the synology fails due to a bad password, no information pointing to the problem is logged.

Changing the password at either side (so the the password is incorrect) results i n the follwoing logs only:

synology.0 | 2022-10-23 11:51:33.390 | info | Connecting to Synology 10.17.2.7:5000
synology.0 | 2022-10-23 11:50:55.805 | info | Connecting to Synology 10.17.2.7:5000

Expected behavior
I would expect a clear error message and measures againts filling the log with identical but useless information

Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.

Versions:

  • Adapter version: 2.1.9

commands - reboot/shutdown - not work

Describe the bug
reboot/shutdown - not work

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'object' -> 'synology' -> 'coommands'
  2. Click on 'shutdown' or 'reboot'
  3. Set anthing u want (tested boolean, number, string, json)
  4. See ... nothing

Expected behavior
obvisly shutdown or reboot... :D

Screenshots & Logfiles
Logfiles empty.
Only 'not ACK' make entry
grafik
grafik
aaaaand... still online... am I doing something wrong?

Versions:

  • Adapter version: Testet with 1.1.3 and 2.0.1
  • JS-Controller version: 3.3.18
  • Node version: Tested with 12.22.5 and 12.22.6
  • Operating system: Linux in Docker on Synology

Additional context
Tested on: DS620slim, DS718+, DS418, DS1817+
all are DSM 7.0-41890

No MotionDetected update for Reolink RLC-410-5MP camera

Hi,

I have 3 cameras in surveillance station. 2 of them are working fine, unfortunately the third one only partly.
in iobroker I get all information about the camera, but the object "MotionDetected" is never updated.
What steps could I perform to get it working or help you to identify if there is an issue in adapter?
One hint: I am getting notifications via iOS App DS Cam from that camera - so in general the motion sensor is working.

Bildschirm­foto 2022-11-14 um 09 26 51

object/data point "volume description" empty

In earlier Adapter-versions (and under DSM 6.x) the name of the volume was shown as a text string under ioBroker data point Volume/desc:

grafik

Is it possible to get this function back?

Thanks

No connection to synology diskstation

Since a few days adapter does not connect to synology diskstatio (tarffic light remains yellow).
My configuration is as follows:

Node.js:v16.15.1
NPM:8.11.0
Node 4.0.23
Adapter 2.1.7

Here is an extract of the debug.log:
2022-06-19 16:30:14.284 - �[34mdebug�[39m: synology.0 (99010) * Get info from (firstPoll) api: DSM method: listPackages params: {"version":1}
2022-06-19 16:30:14.704 - �[34mdebug�[39m: synology.0 (99010) * No response, read next.
2022-06-19 16:30:14.704 - �[34mdebug�[39m: synology.0 (99010) *** ERROR : src: *sendPolling syno[dsm][listPackages] code: 402 message: Permission denied
2022-06-19 16:30:14.704 - �[34mdebug�[39m: synology.0 (99010) -----------------------------------------------------------------------------------------------------
2022-06-19 16:30:14.704 - �[34mdebug�[39m: synology.0 (99010) * sendPolling. namePolling = firstPoll | iteration = 0 | typeof poll = object | poll = {"api":"dsm","method":"listPackages","params":{"version":1}}

Warnmeldungen für den Synology Adapter

Folgende Warnmeldungen erhalte ich
`

synology.0 2022-03-09 17:35:30.464 warn This object will not be created in future versions. Please report this to the developer.
synology.0 2022-03-09 17:35:30.460 warn Object synology.0.SurveillanceStation.getSnapshotCamera is invalid: Default value has to be type "string" but received type "number"
` Plattform linux Betriebssystem linux Architektur arm CPUs 4 Geschwindigkeit 1500 MHz Modell ARMv7 Processor rev 3 (v7l) RAM 3.8 GB System-Betriebszeit 00:09:30 Node.js v14.19.0 time 1646844221693 timeOffset -60 Anzahl der Adapter 400 NPM 6.14.16 js-controller 4.0.19

Surveillance Station 9 Update gibt keine motionDetected Werte zurück

Nach dem Update der Surveillance Station auf die Version 9.0.0-6860 wird das Objekt
synology.0.SurveillanceStation.cameras.Carport.motionDetected
nicht mehr gefüllt.

Versionen:

  • Adapter version: v2.1.7
  • JS-Controller version: 4.0.23
  • Node version: v14.19.3
  • Operating system: Debian Buster

Der Adapter bleibt grün. Auch die Objekte werden augenscheinlich aktualisiert (Blinken kurz grün auf). Ändern aber die Werte nicht

Bildschirmfoto 2022-06-08 um 13 51 14

.

[Feature] notifications by the nas in ioBroker object

Hey there,
I was always wondering, why there isn't an iobroker object which shows the notifications of the nas. For example, that there is a new update:

grafik

Would it be possible to implement this into the iobroker adapter?

If you need any information, don't hesitate to ask. :)

Thanks!

Type mismatch for some states

According to a feedback report received for 2.1.11/2.1.13 at forum (https://forum.iobroker.net/post/886513) some state types seem to have a mismatch:

State value to set for "synology.0.FileStation.info.enable_view_microsoft" has to be type "string" but received type "boolean"
State value to set for "synology.0.FileStation.info.enable_view_google" has to be type "string" but received type "boolean"
State value to set for "synology.0.FileStation.info.enable_send_email_attachment" has to be type "string" but received type "boolean"

Problem should be investigated and fixed

Adapterversion 2.1.11/2.1.12/2.1.13

wrong type of datapoints after upgrade

I'm sorry, but after updating to v1.1.1, the same log entries sometimes appear again.
I stopped the adapter and deleted all data points on the objects. The v1.1.1. installed via GitHub Link over it and restarted the adapter 2x. What did 1 wrong?

`

synology.0 2021-08-09 11:48:00.704 info (30961) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used_size" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.654 info (30961) State value to set for "synology.0.DiskStationManager.vol_info.volume_1.total_size" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.653 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_4.capacity" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.648 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_4.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-09 11:48:00.646 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_3.capacity" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.645 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_3.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-09 11:48:00.640 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_2.capacity" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.639 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_2.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-09 11:48:00.631 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_1.capacity" has to be type "number" but received type "string"
synology.0 2021-08-09 11:48:00.630 info (30961) State value to set for "synology.0.DiskStationManager.hdd_info.sata_drive_1.ebox_order" has to be type "string" but received type "number"
synology.0 2021-08-09 11:48:00.624 info (30961) State value to set for "synology.0.DiskStationManager.info.upgrade_ready" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:48:00.623 info (30961) State value to set for "synology.0.DiskStationManager.info.is_system_crashed" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:48:00.621 info (30961) State value to set for "synology.0.DiskStationManager.info.memory_size" has to be type "string" but received type "number"
synology.0 2021-08-09 11:47:42.968 info (30961) State value to set for "synology.0.FileStation.info.uid" has to be type "string" but received type "number"
synology.0 2021-08-09 11:47:42.966 info (30961) State value to set for "synology.0.FileStation.info.support_virtual.enable_remote_mount" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.964 info (30961) State value to set for "synology.0.FileStation.info.support_virtual.enable_iso_mount" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.963 info (30961) State value to set for "synology.0.FileStation.info.support_vfs" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.962 info (30961) State value to set for "synology.0.FileStation.info.support_sharing" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.961 info (30961) State value to set for "synology.0.FileStation.info.support_file_request" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.959 info (30961) State value to set for "synology.0.FileStation.info.items.2" has to be type "string" but received type "object"
synology.0 2021-08-09 11:47:42.958 info (30961) State value to set for "synology.0.FileStation.info.items.1" has to be type "string" but received type "object"
synology.0 2021-08-09 11:47:42.925 info (30961) State value to set for "synology.0.FileStation.info.items.0" has to be type "string" but received type "object"
synology.0 2021-08-09 11:47:42.918 info (30961) State value to set for "synology.0.FileStation.info.is_manager" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.916 info (30961) State value to set for "synology.0.FileStation.info.enable_list_usergrp" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:42.914 info (30961) State value to set for "synology.0.DiskStationManager.info.temperature_warn" has to be type "string" but received type "boolean"
synology.0 2021-08-09 11:47:41.584 info (30961) DSM 6
synology.0 2021-08-09 11:47:36.166 info (30961) Connecting to Synology 192.168.0.98:5000
synology.0 2021-08-09 11:47:36.060 info (30961) starting. Version 1.1.1 in /opt/iobroker/node_modules/iobroker.synology, node: v12.22.2, js-controller: 3.3.15
synology.0 2021-08-09 11:47:12.205 info (24661) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason

[Feature] Show status USB-USV

Hello,

it's not really a Bub, but I would like to use the USB-USV status as a trigger for other automations. Would it be possible to add this info in your adapter?

Thanks for your work!!

please make password 'invisible`

As said, the password in the config is plain text.
This should be asterisks or anything like this

I hope teh oassword is not stored as plain text too

no widget available

Is there any chance to get my beloved widget in 1.12.1 back? I use a sonnenBattery 10.

Thanks for your work!!!

Password Fehler (als Password Feld verschwindet die Eingabe)

Describe the bug
Input field for password disappears and it is not possible to enter a password. With copy paste of the password I get in the log of Synology that the user fails to login.
Thus, the password is also not stored correctly.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Adapter instance settings'
  2. Click on 'Password input field'

Expected behavior
Entering a password

Versions:

  • Adapter version: v1.1.2
  • JS-Controller version: 3.3.15
  • Node version: v12.22.4
  • Operating system: Linux -> RP4

How to use sendMethod ?

I want to use the following method: Disable from category: SYNO.SurveillanceStation.ActionRule

It seems all I can use is the methods in SYNO.SurveillanceStation (i.e. getInfo). I have no way to set the category to ActionRule.

Is that possible?

For instance:
{"method": "getInfo", "params": {}} works but not what I want
{"method": "ActionRule.Disable", "params": {"idList":"1"}} is what I want, but doesn't work
or
{"category": "ActionRule", "method": "Disable", "params": {"idList":"1"}}
but that doesn't exist either

Could also be a global sendMethod with the following params:
{"name": "SurveillanceStation",
"category": "ActionRule",
"version": "1",
"params": {}
}
which would make the most sense, cover all usecases and follow the Synology API definition.

In the current state, sendMethod doesn't seem to offer much capability at all, but maybe I am entirely missing the usage.

enhancement: Get UPS infos

It would be great to get the UPS information as objects in iobroker. This would allow to detect a blackout when the system is buffered by an UPS. On the synology system, UPS information are available for battery percentage and grid power availability (if a UPS is connected)

snapshot link does not work

Using the link of the snapshot does not work.

Screenshots & Logfiles

Browser responds:
{"error":{"code":105},"success":false}
link of snapshot:
http://IP:port/webapi/entry.cgi?api=SYNO.SurveillanceStation.Camera&method=GetSnapshot&version=7&cameraId= 2&_sid=undefined

Versions:

  • Adapter version: 1.1.1
  • JS-Controller version: 3.3.15
  • Node version: 12.22.4
  • Operating system: Linux

Think about to fix the issues found by adapter checker

I am an automatic service that looks for possible errors in ioBroker and creates an issue for it. The link below leads directly to the test:

https://adapter-check.iobroker.in/?q=https://raw.githubusercontent.com/iobroker-community-adapters/ioBroker.synology

Thanks,
your automatic adapter checker.

DSM shown as off, temperatur 0 degrees

I can install the plugin and set it up, but in HomeKit, the disk station always shows as off, despite being on, and the temperature readings are always zero degrees.

I can see no log entries for the plugin/device to help troubleshoot.

Anmeldung schlägt fehl DSM 7

Hi,
ich habe den Adapter inst.und versucht ihn online zu bringen.

Keine Chance ob mit oder ohne 2fa .

Extra ein Konto bei der DSM angelegt, der Adapter wird nicht grün.
Wo finde ich die API Version was muss ich einstellen.

Wenn ich das Passwort eingebe kann ich nicht sehen was ich eingebe, das Feld verschwindet.

Ich bitte um Hilfe.

Kann nach dem Update das PW nicht mehr eingeben

Gibt's hier schon Neuigkeiten zu vermelden?
Nach heutigem Upgrade auf 1.1.3 habe ich die selben Probleme.
Ein Downgrade auf 1.0.0 ist nicht möglich.

Ich kann das PW nicht mehr eingeben und meine NAS meckert
wegen einem falschen PW.

Habt ihr ne Idee?

No Connection to Sysnology

I am running my sysnology on dsm 7.0. Since 2-3 days the adapter could not establish a connection to my synology nas. I am running adapter version 1.1.3 on API 6.2.2

If I try to reset credentials ro login password field disappears and could not be filled.

Any ideas how to solve this issue?

2FA Code required / bug?

hi,

i will fight with iobroker.synology adapter since my update from dsm6 to dsm7.

i try to delete the 1.0.0 stable and install these newest version which will include "dsm7 fix" in release notes.

I always get these error in debug mode "*** ERROR : src: *sendPolling syno[dsm][getPollingData] code: 403 message: 2-step verification code required"

the correct 2FA code is stored in instanz settings and will checked aprox 10 times?!

can't get homemode enable to work

Hello all,

maybe it's just me, but i can't figure out, how to send a command, so that homemode gets switched.

i tried several things, but it just will not work.
can someone provide an example of how to properly use it?
my last approach looks like

sendTo("synology.0", "send", {
   "parameter1": {"method": "SurveillanceStation.HomeMode.status_on", "params": {"status_on":"true"}}
});

also the MessageBox example

sendTo('synology.0', 'getSnapshot', {camId: 2}, (res) => {
    if(res) sendTo('telegram.0', {text: res, caption: 'caption for image'});
});

doesn't work for me. at least i'm not getting any message via telegram (where a simple "test" message works, so telegram-adapter works, too)

a simple getInfo gives me all information about my Diskstation, so i think the adapter works, but i just can't get it to send a command.

sendTo("synology.0", "send", {
   "parameter1": {"method": "getInfo", "params": {}}
});

thank you in advance

restart der DS führt zu Anspringen des Kontoschutzes und damit Fehler im Adapter

Hallo zusammen,

ich habe mit meiner neuen DS und somit DSM 7 folgendes Problem:
wenn die Syno startet oder rebootet, toggelt der synology.0.info.connection dauerhaft zwischen true und false.

Bemerkbar macht sich das bei mir durch ein Überwachungsscript, was mich mit Zustandsinformationen versorgt.

Was passiert: der aktivierte Kontoschutz schlägt zu und sperrt den user.

Wenn ich die Sperre löse und den Adapter neu starte, ist alles gut, login klappt.

DS: DS1821+
DSM: 7.0.1-42218 update 3
JS-controller: 4.0.21
Node-Version: v12.22.12
OS: raspberry PI OS 64 bit (Linux raspi02 5.15.32-v8+ #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022 aarch64 GNU/Linux
)
HW: raspberry 4 8 GB

adapter: 2.1.6 (aber auch zuvor mit der 1.x)
adapter config:
2FA
eigener user in der Gruppe admin auf der DS
port 5001 und https true (auch bei 5000 und https false)
API-Version 7.x.x

Wenn ihr mehr Infos braucht, meldet euch gerne.

Danke für Eure Unterstützung
Dennis

wrong repository link in iobroker plugins list

Describe the bug
Installation from adapter's list doesn't work due to an GET error of npm.

To Reproduce
Steps to reproduce the behavior:

  1. Go to the adapter page in ioBroker
  2. Click on "+" of Synology NAS
  3. Click "more" while running the installation
  4. See error: npm ERR! 404 Not Found - GET https://github.com/homeinstalator/syno/tarball/master/

Expected behavior
A flawless installation and a pop up of the settings of the adapter.

Additional context
I already tried to open the repository by myself. It resulted also in an error 404. I would assume, the repository link is just very old and needs to be updated.

Wrong type since JS-Controller 3.3

Unfortunately, after updating to 1.1.3, I still have error messages regarding the data point specifications:

`

synology.0 2021-09-27 20:50:34.710 info State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used_size" has to be type "number" but received type "string"
synology.0 2021-09-27 20:50:10.279 info State value to set for "synology.0.DiskStationManager.vol_info.volume_1.used" has to be type "number" but received type "string"
`

I have already deleted the affected data points and had the adapter recreate them. Unfortunately, the mistake remains.

fehlende Berechtigung admin-user für shutdown

Hallo @arteck,

damit man den Fehler und spätere Lösung unter einem passenden Titel wiederfinden kann, mache ich ein neues issue auf #153:

Fehlerbild:
shutdown der DS mit dem synology-adapter funktioniert nicht

Auszug Log:
2022-07-01 20:38:11.204 - debug: synology.0 (1062269) state synology.0.commands.shutdown changed: true (ack = false)
2022-07-01 20:38:11.304 - debug: synology.0 (1062269) *** ERROR : src: SSH Error: code: undefined message:
2022-07-01 20:38:14.925 - debug: synology.0 (1062269) *** ERROR : src: SSH Error: code: undefined message: Sorry, try again.
2022-07-01 20:38:14.926 - debug: synology.0 (1062269) *** ERROR : src: SSH Error: code: undefined message: sudo: no password was provided
2022-07-01 20:38:14.926 - debug: synology.0 (1062269) *** ERROR : src: SSH Error: code: undefined message: sudo: 1 incorrect password attempt
2022-07-01 20:38:14.928 - warn: synology.0 (1062269) System shutdown

Vermutung: der verwendete user braucht über die sudoers noch ein Recht auf init oder shutdown

user: über die Oberfläche eingerichtet
syno_admin_iob_01
syno_admin_iob_02

user in gängigen files:
$ sudo grep mein-admin-konto-iob /etc/passwd /etc/group /etc/sudoers
/etc/passwd:mein-admin-konto-iob:x:1036:100::/var/services/homes/mein-admin-konto-iob:/bin/sh
/etc/group:administrators:x:101:admin,mein-admin-konto-persönlich,mein-admin-konto-iob
$

Test mit dem user auf der Konsole:
mein-admin-konto-iob@dsdk02:~$ shutdown
Must be root.
mein-admin-konto-iob@dsdk02:~$ init 0
Failed to execute operation: Access denied
Must be root.
mein-admin-konto-iob@dsdk02:~$

Future of possible stale syno.js base project / remove dependency to meisterTR github repo

ioBroker.synology is based on syno.js, located at https://github.com/kwent/syno. This repo did not get real updates since a longer timeframe (last non dependa bot commit from Oct 2020, last commit not related to dependencies longer ago).

I've open an issue questioning whether a official support of DSM 7 is planned:
kwent/syno#72

This isse has not yet been answered / processed. In case syno.js is really dead we should discuss whether the code should be moved into ioBroker.synology all together and expanded to support DSM 7.

IMPORTANT:
As I just detected to package.json links the follwoing dependencies requesting syno direct form meisterTR github:

"syno": "git+https://github.com/MeisterTR/syno"

Compatibility check to js-controller 4.0

Dear Adapter developer,

with js-controller 4.0 object definitions are now also checked that min/max in only provided for number/mixed objects and that the type of the default value matches to the object type.

If something is not correct this is logged as 'warning' or 'info' log.

Please also make sure to update to the lastest @iobroker/testing dependency 2.5.4 or to accept the PR from Apollon77 for legacy testing!

Please spent some time to verify your adapter by ideally starting with a fresh instance and do some actions and verify the log. If you see a warn or info log there from these checks please adjust the adapter and fix the relevant cases.

For questions please refer to ioBroker/ioBroker.js-controller#1749

Please close the issue after you checked it.

Thank you very much for your support to get the best experience for the growing numbers of ioBroker users!

Mass DNS Querys

Hello Developer,

my pihole shows massive DNS Querys from IO-Broker.

It seems that the Synology adapter wants to resolve the IP of the disk station several times per query. Stopping the adapter also stops the DNS querys.

BR
Nico

Adapter generates 3 logins simultaneously on the Synology

Describe the bug
By chance I found that the Adapter now creates 3 logins simultaneously on the Synology.

When I close one of the 3 sessions via the Synology console, 2 sessions are closed at the same time. The 3rd session remains and cannot be closed. The Synology must be restarted.

To Reproduce
Steps to reproduce the behavior:
Start the adapter and there are 3 logins on the NAS.

Versions:

  • Adapter version: 2.1.13
  • JS-Controller version: 4.0.24
  • Node version: v16.19.0
  • DSM system: DSM 7.1.1-42962 Update 4

Reduce logging in case of NAS offline / unreachable

If a NAS is not reachable, the adapter logs excessiv messages with level info:

synology.0 | 2022-10-13 12:21:09.260 | info | Connecting to Synology 10.17.2.7:5701
synology.0 | 2022-10-13 12:20:35.349 | info | Connecting to Synology 10.17.2.7:5701
synology.0 | 2022-10-13 12:20:01.420 | info | Connecting to Synology 10.17.2.7:5701
synology.0 | 2022-10-13 12:19:27.259 | info | Connecting to Synology 10.17.2.7:5701
synology.0 | 2022-10-13 12:18:53.341 | info | Connecting to Synology 10.17.2.7:5701
synology.0 | 2022-10-13 12:18:19.419 | info | Connecting to Synology 10.17.2.7:5701

The adapter should log ONE message if the connection is lost and one message if the connection is restored again.
The meassage above resulting from retryies should be logged with debug level only.

DSM 7 Keine Verbindung

Ich bekomme mit DSM7 leider keine Verbindung. Aktuell verwendet ich die Version 2.0.1.
Meine Synology ist per 2FA gesichert. Dies habe ich testweise auch deaktiviert um zu schauen ob es daran liegt. Geblockt ist nicht die IP zum Anmelden.

Beim verbinden bekomme ich folgende Fehlermeldung
Bildschirmfoto 2022-01-22 um 10 04 17
:

Nach einem Neustart vom ioBroker:
Bildschirmfoto 2022-01-22 um 10 21 05

ssh errors logged with level "debug" instead of "error"

Describe the bug
Errors ocurring during ssh commands are not visible, they are logged with .debug level only.

synology.0 2022-09-30 17:42:03.905 warn System reboot
synology.0 2022-09-30 17:42:03.900 debug *** ERROR : src: SSH Error: code: undefined message: sudo: 1 incorrect password attempt
synology.0 2022-09-30 17:42:03.899 debug *** ERROR : src: SSH Error: code: undefined message: sudo: no password was provided
synology.0 2022-09-30 17:42:03.898 debug *** ERROR : src: SSH Error: code: undefined message: Sorry, try again.Password:

Expected behavior
I would expect to see above error with severity "error" (and not severiyt "debug".

Versions:

  • Adapter version: synology 2.1.9

DSM is 7.1, Command was "reboot"

Note:
The "function error" is a little bit confusing - it looks like every error is output as debug log if output at all:

   if (!~src.indexOf('getSongCover')){
        adapter.log.debug(`*** ERROR : src: ${src || 'unknown'} code: ${code} message: ${message}`);
    }

[QA] activate eslint

eslint should be actrivated with standard setting as it is provided by current adapter creator.

This would require some code correctsion like replacin let with const and checking varianble snot used at all.

Adapter Version: 2.1.12

Add "NAS Server is on battery"

Hey there,
thanks for the adapter.
Is it possible to implement the information, that the NAS is working on battery as an object in ioBroker?

  • Synology DS720+
  • Adapter v. 1.1.3

grafik

grafik

Thanks for the upcoming answer.
Best regards
DcFamas

Release New Stable Version 2.1.6

Hi,
I wanted to ask when version 2.1.6 will be officially released.
So that you can download it normally in ioBroker without the diversions via the GitHub installation.
Since ioBroker currently warns against an installation via GitHub, an official release of version 2.1.6 would be really great.

Should the current version 2.1.6 not be released for the time being,
then official instructions on how to install the Apdater correctly via GitHub would be very helpful.

Many thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.