MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    How to send a notification

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    35 Posts 3 Posters 8.4k Views 3 Watching
    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.
    • A Offline
      Alyx @sdetweil
      last edited by

      @sdetweil Hi sam,

      Great so i can see that the notification isnt being sent via the dev console, it shows up via Alexa app but isnt communicating to the MM. Would you happen to know the cause?

       {
              module: 'MMM-AlexaControl',
              position: 'middle_center',
      	
      
      	config:{
      		
                  image: true,
      	    deviceName: "mirror",
                  pm2ProcessName: "mm",
                  vcgencmd: "hide",
      	    startPort: 11001,
      	    refresh: true,
      	    restart: true,
      	    //stop: true,
      	    reboot: true,
      	    shutdown: true,
      	    monitorToggle: true,
      	    //cecAddress: "0.0.0.0",
      	    //usb: false
      	    pages: 3,
      	    notifications:[
          {
              name: 'Next page',
              port: 11102,
              OnOff: false,
              notification: ["PAGE_INCREMENT", 'payload']
          },
           {
              name: 'Previous page',
              port: 11103,
              OnOff: false,
              notification: ["PAGE_DECREMENT", 'payload']
          },
          {
              name: 'Selfie',
              port: 11104,
              OnOff: false,
              notification: ["SELFIE_SHOOT", 'payload']
          }
      ],
              }
          },
      
      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @Alyx
        last edited by sdetweil

        @alyx not really. if u stop MagicMirror, and then tell Alexa to turn on your notification device, you should get a ‘not responding’ message from alexa

        that will tell you the two are really connected.

        Alexa turn on selfie

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        A 1 Reply Last reply Reply Quote 0
        • A Offline
          Alyx @sdetweil
          last edited by

          @sdetweil Yep that makes sense but it isnt popping up below is a quick snapshot of the dev panel

          
          MMM-MotionDetector.js:75 MMM-MotionDetector: DiffCamEngine init successful.
          module.js:195 MMM-AlexaControl is suspended.
          module.js:195 MMM-NASA is suspended.
          module.js:195 MMM-ISS-Live is suspended.
          module.js:195 MMM-MotionDetector is suspended.
          module.js:195 lifecounter is suspended.
          module.js:195 compliments is suspended.
          module.js:195 MMM-chromecast is suspended.
          MMM-NASA.js:132 Hailing NASA
          module.js:202 MMM-page-indicator is resumed.
          module.js:202 MMM-Selfieshot is resumed.
          module.js:202 MMM-Astro is resumed.
          module.js:202 MMM-MoonPhase is resumed.
          module.js:202 clock is resumed.
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          eventtracking-log.services.video.ibm.com/eventtracking.web.player/:1 Failed to load resource: net::ERR_BLOCKED_BY_CLIENT
          MMM-AlexaControl.js:75 RECEIVE monitor NOTIFICATION=SLEEP_WAKE
          MMM-AlexaControl.js:75 RECEIVE monitor NOTIFICATION=SLEEP_HIDE
          MMM-AlexaControl.js:75 RECEIVE monitor NOTIFICATION=SLEEP_WAKE
          MMM-pages.js:97 
          

          The errors lead to this page
          400 Bad Request
          ‘json’ or ‘msgpack’ parameter is required

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

            @alyx said in How to send a notification:

            Yep that makes sense but it isnt popping up below is a quick snapshot of the dev panel

            one thing at a time

            you didn’t answer the question about connection

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              Alyx @sdetweil
              last edited by

              @sdetweil Apoligies, tested there.

              So I stopped magic mirror/ restarted the pi and it came up with device unresponsive.

              S 1 Reply Last reply Reply Quote 1
              • S Offline
                sdetweil @Alyx
                last edited by

                @alyx ok, and when MM is running you get the completion sound from alexa, correct?

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  Alyx @sdetweil
                  last edited by

                  @sdetweil what do mean by a completion sound? Do you mean the confirmation of ‘ok’ after? If so then yes

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

                    @alyx when u turn on or off a device, alexa does tada sound… to says it processed your request

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      Alyx @sdetweil
                      last edited by

                      @sdetweil ah my one says ‘ok’ but id assume its the same

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

                        @alyx I added your config to my MM and added debugging… and it works as expected

                        samplemodule reports Selfie_shoot was received

                        SampleModule received a module notification: SELFIE_SHOOT from sender: MMM-AlexaControl
                        

                        and because u have is as onOff:false
                        u get a notification every time (on or off)

                        I did this using the alexa app…

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        A 1 Reply Last reply Reply Quote 0
                        • A Offline
                          Alyx @sdetweil
                          last edited by

                          @sdetweil oh… where do you think I went wrong so?

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

                            @alyx i don’t know… i didn’t change anything in your config…

                            if you use the alexa app to turn the plug on or off, do you see the notifications?

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

                            A 1 Reply Last reply Reply Quote 0
                            • A Offline
                              Alyx @sdetweil
                              last edited by

                              @sdetweil ok I re added the selfie device on the alexa app and it found it fine but its now coming up as unresponsive

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

                                @alyx so, discovery records the IP address of the ‘device’ and the port.

                                so, if your pi changes ip address during boot, then it won’t work again …

                                all my pi type devices have fixed addresses to avoid this problem…

                                Sam

                                How to add modules

                                learning how to use browser developers window for css changes

                                A 1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Alyx @sdetweil
                                  last edited by

                                  @sdetweil ah ok I’ll set a static! TBH I did have that concern but i was wrong to assume it was dynamic with the IP’s

                                  I’ll come back if this works or not , I have a call rn

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

                                    @alyx yeh the Alexa design is devices don’t move around, and one would only do discovery occasionally

                                    then u have to delete the devices and rediscover

                                    Sam

                                    How to add modules

                                    learning how to use browser developers window for css changes

                                    A 1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      Alyx @sdetweil
                                      last edited by

                                      @sdetweil ok so after fighting with my interfaces file for a few days I have a static IP

                                      Only issue is that I can discover devices on the Alexa app but they arent usable and just come up an unresponsive…

                                      It seems the static IP has messed with that feature ? Any advise on this please?

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

                                        @alyx no after u get a static IP, and your mm config.js has

                                        address:"0.0.0.0",
                                        ipWhitelist:[],
                                        

                                        to allow incoming connections from outside the pi machine

                                        it should work

                                        Sam

                                        How to add modules

                                        learning how to use browser developers window for css changes

                                        A 1 Reply Last reply Reply Quote 0
                                        • A Offline
                                          Alyx @sdetweil
                                          last edited by

                                          @sdetweil I did that but still isnt working

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

                                            @alyx sorry, don’t know how u to debug this. it’s really hard

                                            you config works perfectly here
                                            your devices are found (that means the module is running) and the ssdp discovery worked

                                            now alexa will call back at the server (MM system) ip address and port for each switch
                                            which goes into the node_helper and is then sent up to the modulename.js to send to other modules

                                            Sam

                                            How to add modules

                                            learning how to use browser developers window for css changes

                                            A 2 Replies Last reply Reply Quote 0

                                            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
                                            • 1
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy