Read the statement by Michael Teeuw here.
MMM-NotifCustomActions
-
Description:
MMM-NotifCustomActions is a technical module designed to do the glue between modules or do simple JS function.
It reacts on module notifications.
For example, it can send a specific notification to a module or execute a shell command when another module broadcasts a notification.
JS functions can be executed on browser side or on server side (ex: shutdown).
For simple JS code, all can be written in module config; for complex JS functions 2 specific files are automatically loaded and are accessible by the module.Example of simple configuration
This example does:
- a
shutdowncommand (node side) when notificationACTION_SHUTDOWNis received. - a sent of notification
PAGE_SELECTwith payload"musicPage"(client side) when notificationSPOTIFY_CONNECTEDis received.
actions: [ { notification: "ACTION_SHUTDOWN", action_node: function(self, sender, payload) { exec("sudo shutdown -h now"); } }, { notification: "SPOTIFY_CONNECTED", action_client: function(self, sender, payload) { self.sendNotification("PAGE_SELECT", "musicPage"); } }, ]Download:
- a
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login