Add initial notifications page

Chris van Marle
2019-04-01 11:48:47 +02:00
parent 98a900e8e1
commit e1f791a773

33
Notifications.md Normal file

@@ -0,0 +1,33 @@
# Introduction
That MagicMirror core has the ability to send notifications to modules. Or even better: the modules have the possibility to send notifications to other modules. This page tries to create a central overview of
Additional technical information on the notifications can be found in the [modules README](https://github.com/MichMich/MagicMirror/blob/master/modules/README.md):
- [notificationReceived](https://github.com/MichMich/MagicMirror/tree/master/modules#notificationreceivednotification-payload-sender)
- [sendNotification](https://github.com/MichMich/MagicMirror/tree/master/modules#thissendnotificationnotification-payload)
# System notifications
The system sends three notifications when starting up. These notifications could come in handy!
Notification | Payload | Description
------------ | ------- | -----------
`ALL_MODULES_STARTED` | _none_ | All modules are started. You can now send notifications to other modules.
`DOM_OBJECTS_CREATED` | _none_ | All dom objects are created. The system is now ready to perform visual changes.
`MODULE_DOM_CREATED` | _none_ | This module's dom has been fully loaded. You can now access your module's dom objects.
## Default module notifications
Notification | Payload | Description
------------ | ------- | -----------
`SHOW_ALERT` | [message details](https://github.com/MichMich/MagicMirror/tree/master/modules/default/alert#notification-params) | Sent to [alert module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/alert) to show an alert or notification.
`HIDE_ALERT` | _none_ | Sent to [alert module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/alert) to hide the current alert or notification.
`CALENDAR_EVENTS` | [calendar events](https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar) | Sent by [calendar module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/calendar) to inform modules of the calendar events. The [currentweather module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/currentweather) uses this event to display the weather for the location of an upcoming event.
`CURRENTWEATHER_DATA` | _TBC_ | Sent by [currentweather module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/currentweather)
`INDOOR_TEMPERATURE` | _number_ | Sent to [currentweather module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/currentweather) to show indoor temperature.
`INDOOR_HUMIDITY` | _number_ | Sent to [currentweather module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/currentweather) to show indoor humidity.
| `ARTICLE_NEXT` | _none_ | Shows the next news title in [newsfeed module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed).
| `ARTICLE_PREVIOUS` | _none_ | Shows the previous news title in [newsfeed module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed).
| `ARTICLE_MORE_DETAILS` | _none_ | Shows more details in [newsfeed module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed).
| `ARTICLE_LESS_DETAILS` | _none_ | Hides the summary or full news article and only displays the news title of the currently viewed news item in [newsfeed module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed).
| `ARTICLE_TOGGLE_FULL` | _none_ | Toogles article in fullscreen in [newsfeed module](https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed).
# 3rd Party Module notifications
_TBC_