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

[enhancement]: Actions performed on notifications #2829

Open
1 task done
foxriver76 opened this issue Jul 2, 2024 · 2 comments
Open
1 task done

[enhancement]: Actions performed on notifications #2829

foxriver76 opened this issue Jul 2, 2024 · 2 comments
Assignees

Comments

@foxriver76
Copy link
Collaborator

No existing issues.

  • There is no existing issue for my request.

Description

We should discuss if it makes sense to extend the interactivity of notifications.

Use cases: e.g. on OS updates -> Perform all updates button, or on reboot required -> Perform system reboot
Also for Firmware updates which could be done by adapter, yes this would be redundant to Device Manager Tab, but would be a more interactive approach which could co-exist.

Why?

It is nice to know that e.g. updates are available, but we have no possibility to trigger reactions.

How?

Notifications could be extended by actions, then e.g. admin could show buttons and perform the linked sendTo call. The receptionist then acknowledges the sendTo, if it is acked, admin could delete the message.

For some adapters which support notification manager like telegram it might be also possible to show the actions in the messages, for some like mail it might not.

interface NotificationOptions {
    actions: NotificationAction[];
}

interface NotificationAction {
    desc: { en: string }; // ioBroker I18n
    command: 'text';
    message: Record<string, unknown>;
    to: string; // adapter instance or host sendTo receptionist
}

Maybe make the actions even more generic, not only allow sendTo but also e.g. opening links by clicking a button.

@foxriver76 foxriver76 added enhancement ⬆️ refinement 🔍 Needs refinement with core developers labels Jul 2, 2024
@Apollon77 Apollon77 assigned Apollon77 and foxriver76 and unassigned Apollon77 Jul 10, 2024
@Apollon77
Copy link
Collaborator

Great Idea, we discussed the idea and want to do it. @foxriver76 will add more details as protocol of the plans

@foxriver76
Copy link
Collaborator Author

We discussed that our concept would allow to define basic actions in io-package notifications object. Triggering one of the actions would then send a message to the backend as in the initial proposal. Furthermore, the adapter could respond with additional actions like if it needs text input, another button option etc, this could be pretty similar to the mechanics in device manager and allows for a lot of flexibility. Of course some of these topics would then be admin related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants