Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use sendMethod ? #124

Open
Sungray opened this issue Feb 9, 2022 · 8 comments
Open

How to use sendMethod ? #124

Sungray opened this issue Feb 9, 2022 · 8 comments
Labels
question Further information is requested

Comments

@Sungray
Copy link

Sungray commented Feb 9, 2022

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.

@Sungray Sungray closed this as completed Feb 9, 2022
@Sungray Sungray reopened this Feb 9, 2022
@Apollon77
Copy link
Member

Ok when I see the code:
sendMethod uses the name from the state-id where you set the value on ... Thsi means when using synology.0.SurveillanceStation.sendMethod then "name" is automatically set to "SurveillanceStation".

The value is then JSON parsed.

Then it is checked that "method" key exists and it is extracted and send as parameter
And "param" key as sub object is used as parameters

Then calls are done ...

So what does log say when you execute something?

@Apollon77 Apollon77 added the question Further information is requested label Mar 25, 2022
@spcqike
Copy link

spcqike commented Jun 2, 2022

@Sungray have you found any solution on how to send commands?

@Sungray
Copy link
Author

Sungray commented Jun 2, 2022

@spcqike I have not unfortunately, I'm using a workaround using node-red.
exec node:
node /opt/iobroker/node_modules/syno/bin/syno.js -c /opt/userscripts/config.yaml ss enableActionRule --payload '{"idList": "2,3,5", "version":"1"}' --pretty

@stale
Copy link

stale bot commented Sep 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix This will not be worked on label Sep 9, 2022
@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically closed because of inactivity. Please open a new issue if still relevant and make sure to include all relevant details, logs and reproduction steps. Thank you for your contributions. Dieses Problem wurde aufgrund von Inaktivität automatisch geschlossen. Bitte öffnet ein neues Issue, falls dies noch relevant ist und stellt sicher das alle relevanten Details, Logs und Reproduktionsschritte enthalten sind. Vielen Dank für Eure Unterstützung.

@stale stale bot closed this as completed Sep 20, 2022
@Apollon77 Apollon77 removed the wontfix This will not be worked on label Sep 21, 2022
@Apollon77 Apollon77 reopened this Sep 21, 2022
@stale
Copy link

stale bot commented Dec 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix This will not be worked on label Dec 20, 2022
@mcm1957
Copy link
Member

mcm1957 commented Dec 21, 2022

Reset stale-bot

@stale stale bot removed the wontfix This will not be worked on label Dec 21, 2022
@stale
Copy link

stale bot commented Mar 23, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs within the next 7 days. Please check if the issue is still relevant in the most current version of the adapter and tell us. Also check that all relevant details, logs and reproduction steps are included and update them if needed. Thank you for your contributions. Dieses Problem wurde automatisch als veraltet markiert, da es in letzter Zeit keine Aktivitäten gab. Es wird geschlossen, wenn nicht innerhalb der nächsten 7 Tage weitere Aktivitäten stattfinden. Bitte überprüft, ob das Problem auch in der aktuellsten Version des Adapters noch relevant ist, und teilt uns dies mit. Überprüft auch, ob alle relevanten Details, Logs und Reproduktionsschritte enthalten sind bzw. aktualisiert diese. Vielen Dank für Eure Unterstützung.

@stale stale bot added the wontfix This will not be worked on label Mar 23, 2023
@mcm1957 mcm1957 removed the wontfix This will not be worked on label Mar 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

4 participants