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.

    MMM-Pages and Alexa

    Scheduled Pinned Locked Moved Forum
    13 Posts 3 Posters 5.5k Views 4 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.
    • R Offline
      radioman
      last edited by

      I have a problem with MMM-Pages (only have MMM-Pages installed) and Alexa
      I’ve already managed to change the 2 sides see code:

      {
              module: 'MMM-pages',
              config: {
              animationTime: 0,
      		rotationTime: 10000,
      		rotationDelay: 0,
      		pages: 2,
      		         modules:
                          [[ "calendar", "weatherforecast"],
                           [ "MMM-RAIN-RADAR" ]],
                      fixed: ["clock", "MMM-OpenmapWeather", "MMM-page-indicator"],
               }        
              },
      		
      
      

      Now I would like to switch the pages on or switch over with Alexa see code:

      {
                  module: 'MMM-AlexaControl',
                  position: 'bottom_left',
                  config:{
                      image: false,
                      pm2ProcessName: "mm",
                      refresh: true,
                      restart: true,
                      reboot: false,
                      monitorToggle: true,
                      vcgencmd: 'vcgencmd',
                      deviceName: "Spiegel",
                      startPort: 12000,
                      notifications: [
          							  {
             			 					name: 'Radar',
             			    			    port: 11101,
              					        OnOff: true,
              		 					notification: [["SHOW_RADAR", null],["HIDE_RADAR", null]]
                   						},
                   						{
              							name: 'Seite eins',
             								port: 11102,
              							OnOff: true,
              							notification: ["PAGE_CHANGED", 0]
              							},
              							{
              							name: 'Seite zwei',
             								port: 11103,
              							OnOff: true,
              							notification: ["PAGE_CHANGED", 1]
              							}
      				]
                
               }
             	 },	
            
      
      

      Unfortunately that doesn’t work.
      Now the question where is my mistake
      P.S. Alexa finds my devices

      S J 2 Replies Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @radioman
        last edited by sdetweil

        @radioman open the developers window, ctrl-shift-i on the keyboard then select the console tab and look for the notification being sent

        u can filter on the module name, part.in the filter field, Alexa for example.
        and u are saying (All in your language)

        Alexa turn on Seite eins

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • R Offline
          radioman
          last edited by

          OK
          is the code correct in terms of reasoning
          Because I cannot switch pages in the Alexa app

          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @radioman
            last edited by sdetweil

            @radioman I don’t know. not my module. did the notification get sent? use debug to see

            radar works

            are u using the right command?

            do u need two notifications? one for on and one for off?

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 0
            • R Offline
              radioman
              last edited by

              Unfortunately, I’m not the kind of programmer that debugging is concerned
              But switching radar is possible in the Alexa app and by voice

              S 1 Reply Last reply Reply Quote 0
              • S Do not disturb
                sdetweil @radioman
                last edited by sdetweil

                @radioman open the console and watch.

                look at the console where u start mm,

                npm start or pm2 logs --lines=???
                ??? is a number 15 default

                gotta learn

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • R Offline
                  radioman
                  last edited by

                  I also use the MMM remote control module.
                  The Pages tab is empty on the smartphone or in the browser

                  S 1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @radioman
                    last edited by

                    @radioman sorry, don’t use pages

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      radioman
                      last edited by

                      I will try tommorow, now its time for me to go to bed

                      1 Reply Last reply Reply Quote 0
                      • J Offline
                        JoChef2 Module Developer @radioman
                        last edited by

                        @radioman Hi. You made one mistake in the configuration for your page devices. You set OnOff to true. If it’s set to true you can send different notifications for on and off. So you have to set it to false for this two devices. Your config looks then like this:

                        {
                            module: 'MMM-AlexaControl',
                            position: 'bottom_left',
                            config:{
                                image: false,
                                pm2ProcessName: "mm",
                                refresh: true,
                                restart: true,
                                reboot: false,
                                monitorToggle: true,
                                vcgencmd: 'vcgencmd',
                                deviceName: "Spiegel",
                                startPort: 12000,
                                notifications: [
                                                    {
                                                        name: 'Radar',
                                                        port: 11101,
                                                        OnOff: true,
                                                        notification: [["SHOW_RADAR", null],["HIDE_RADAR", null]]
                                                    },
                                                    {
                                                        name: 'Seite eins',
                                                        port: 11102,
                                                        OnOff: false,
                                                        notification: ["PAGE_CHANGED", 0]
                                                    },
                                                    {
                                                        name: 'Seite zwei',
                                                        port: 11103,
                                                        OnOff: false,
                                                        notification: ["PAGE_CHANGED", 1]
                                                    }
                                                ]
                            }
                        },
                        

                        Instead of this you could also use the pages option and set it to the number of pages you have. You can then change the names in the Alexa app.

                        S 1 Reply Last reply Reply Quote 0
                        • S Do not disturb
                          sdetweil @JoChef2
                          last edited by

                          @JoChef2 so, if OnOff is true, then you expect an array of notifications? if false, only one notification, right?

                          you could add a check for array and output a message to help the user…
                          and switch to false…

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          J 1 Reply Last reply Reply Quote 0
                          • J Offline
                            JoChef2 Module Developer @sdetweil
                            last edited by

                            @sdetweil Yes you are right. That’s a good idea. I will do it in the next week.

                            1 Reply Last reply Reply Quote 0
                            • R Offline
                              radioman
                              last edited by

                              :slightly_smiling_face: :ok_hand:
                              Thank You it works

                              1 Reply 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 / 1
                              • 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