Skip to content
Web form with button that calls sendNotification() to all other modules
JavaScript CSS
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore Initial commit Oct 17, 2019
LICENSE Initial commit Oct 17, 2019
MMM-SendNotificationButton.css first version Oct 18, 2019
MMM-SendNotificationButton.js first version Oct 18, 2019
README.md first version Oct 18, 2019
screenshot.png first version Oct 18, 2019

README.md

MMM-SendNotificationButton

Web form with button that calls sendNotification() to all other modules

Screenshot

This shows the MMM-SendNotificationButton module below the MMM-ViewNotifications module. The top module shows a line anytime any module calls this.sendNotification(), which sends a message to all modules in MagicMirror.

The SendNotificationButton module has a web form you can fill out with the arguments to sendNotification(). Clicking the button just calls sendNotification().

Use this for testing your own modules that respond to broadcast messages via sendNotification().

The "Notification type:" text box at top is the first argument taken unchanged as an arbitrary string. The bottom "Body / payload:" textarea must either be empty, or be a valid JSON document. This module converts the text from the textarea into a JavaScript object and sends it.

Check the web browser's console for any error messages or faults sending to this.sendNotification(). No errors appear in the browser main window.

You can’t perform that action at this time.