MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED How to send notification with MMM-EasyPix

    Troubleshooting
    2
    4
    138
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      Sven1894 last edited by

      How can I send notifications with the MMM-EasyPix module?
      I tried

      image.onerror = this.sendNotification('Pic is not exisiting');
      

      but nothing happened.
      If I do

      image.onerror = console.log('Pic is not exisiting');
      

      it logs ‘Pic is not existing’ in the console.

      Any Ideas?

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @Sven1894 last edited by

        @Sven1894 where are u trying to send the notification?

        this only works in the modulename.js
        not in the node_helper

        Sam

        Create a working config
        How to add modules

        S 1 Reply Last reply Reply Quote 0
        • S
          Sven1894 @sdetweil last edited by

          @sdetweil In the MMM-EasyPix.js

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @Sven1894 last edited by sdetweil

            @Sven1894 what module are u sending it to?

            and you know what ‘this.’ means.
            sometimes you have to take special care.

            have you debugged w the developer window ?

            ctrl-shift-i, select the sources tab, find the module source, click
            put a stop on the line where it is about to send and examine the ‘this.’ pointer

            if it’s in a callback it might be pointing to somewhere unexpected

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy