Show notification on the MagicMirror



  • Hey there,

    is there a way to directly show notification emited by other modules on the ui? I tried the alert module, but it does not show anything. Is this config correct:

                    {
                            module: "alert",
                            position: "top_center",
                    },
    

    I only see the text “alert” and “module_0_alert” on that position. If this is correct maybe there is no notification and the module I want to test (MMM-Motion-Detection) does not work as intended…

    Regards,
    Anduril



  • @AnduriI The rendering of the alert module is special and not like the other modules. you shouldn’t specify a position for it.

    {
      module: 'alert'
    }
    

    if the notifications do not show up, thats most likely an issue with the module you tested. You can also try other modules, like the mmm-alarmclock where you can trigger notifications to specified times for testing.



  • @strawberry-3.141 are you the dev of this module? I tried this and seems to work… until the alarm time comes. Then my website goes black and does not do anything. How does the alarm show?
    After reloading the page it’s back and working with the alarm passed by.

    just in case it is needed, my config:

                    {
                            module: "MMM-AlarmClock",
                            position: "top_right",
                            config: {
                                    alarms: [
                                            {time: "20:18", days: [1,2,3,4,5,6,7], title: "Test", message: "Es geht!!!"},
                                    ],
                            }
                    },
    

  • Module Developer

    @AnduriI

    Does the alarm ring and is the alert module enabled? If so, have you looked at the config options in the readMe file?



  • @AnduriI could you run the alarm clock with npm start dev to see the developer console and check that for errors when the page goes black?

    Also you should check the config options to prevent surprises in the future. The day range is from 0 to 6, so there exists no day with the index 7



  • @AnduriI said in Show notification on the MagicMirror:

    {time: “20:18”, days: [1,2,3,4,5,6,7], title: “Test”, message: “Es geht!!!”}

    Yes that part should be:

    {time: “20:18”, days: [0,1,2,3,4,5,6], title: “Test”, message: “Es geht!!!”}



  • @mykle1 there is no sound ringing or similar. I think the alert module is enabled by default or is that wrong? As stated by strawberry in #2 it should be working the way it is now.
    @strawberry-3.141 I run the module with the mirror started as npm start dev but don’t see any. Here is my log:

    pi@Spieglein:~/MagicMirror $ npm start dev
    
    > magicmirror@2.1.3 start /home/pi/MagicMirror
    > sh run-start.sh "dev"
    
    Starting MagicMirror: v2.1.3
    Loading config ...
    Loading module helpers ...
    No helper found for module: alert.
    Initializing new module helper ...
    Module helper loaded: updatenotification
    No helper found for module: MMM-AlarmClock.
    No helper found for module: clock.
    Initializing new module helper ...
    Module helper loaded: calendar
    No helper found for module: compliments.
    No helper found for module: currentweather.
    No helper found for module: weatherforecast.
    Initializing new module helper ...
    Module helper loaded: newsfeed
    All module helpers loaded.
    Starting server on port 8080 ...
    You're using a full whitelist configuration to allow for all IPs
    Server started ...
    Connecting socket for: updatenotification
    Connecting socket for: calendar
    Starting node helper for: calendar
    Connecting socket for: newsfeed
    Starting module: newsfeed
    Sockets connected & modules started ...
    Launching application.
    Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/[XXX]/basic.ics - Interval: 300000
    Create new calendar fetcher for url: https://calendar.google.com/calendar/ical/[XXX]/basic.ics - Interval: 300000
    Create new news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml - Interval: 300000
    Use existing news fetcher for url: http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml
    {here it went black, but no notification}
    

    @all sorry for taking the wrong config options for the module, didn’t read them carefully. Again here my config, just in case there is something wrong with other modules influencing this:

            modules: [
                    {
                            module: "alert",
                    },
                    {
                            module: "updatenotification",
                            position: "top_bar"
                    },
                    {
                            module: "MMM-AlarmClock",
                            position: "top_right",
                            config: {
                                    alarms: [
                                            {time: "21:14", days: [0,1,2,3,4,5,6], title: "Test", message: "Es geht!!!"},
                                    ],
                            }
                    },
                    {
                            module: "clock",
                            position: "top_left"
                    },
                    {
                            module: "calendar",
                            header: "Termine",
                            position: "top_left",
                            config: {
                                    calendars: [
                                            {
                                                    symbol: "calendar-check-o ",
                                                    url: "https://calendar.google.com/calendar/ical/[XXX]$
                                            },
                                            {
                                                    symbol: "calendar-check-o ",
                                                    url: "https://calendar.google.com/calendar/ical/[XXX]$
                                            }
                                    ]
                            }
                    },
    some more modules, but all standard without any changes
    

  • Module Developer

    @AnduriI said in Show notification on the MagicMirror:

    I think the alert module is enabled by default or is that wrong?

    Well, some people change things. For instance, you put a position for the alert module. I’ve never seen that done before. Have you changed or added anything else to the module files? alarm sound? any of the defaults in the js file?

    Does your mirror work when you remove the AlarmClock entry?



  • @AnduriI I was more interested in the logs from the developer console in electron, because you said everything is working fine until the alarm goes off, so i guess there is a javascript exception in a render process


  • Module Developer

    I had plans for an alarm clock as soon as my brother gave me his old, “useless” 10 inch netbook. Started messing around with it just to see what I could do with it and to see if I had any issues with installation. Made a few modifications as well.


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.