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-Assistantmk2

    Scheduled Pinned Locked Moved General Discussion
    11 Posts 2 Posters 3.7k Views 2 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.
    • ? Offline
      A Former User @fri4end
      last edited by

      @fri4end
      Try this;

      onIdle: {
        timer: 1000 * 30,  // in 30sec after last Assistant Query, command "PAGE_1" will be activated.
        command: "PAGE_1"
      },
      
      onActivate: { //When you wakeup Assistant, command "PAGE_2" will be activated.
        timer: 0,
        command: "PAGE_2"
      },
      
      command: {
        "PAGE_1": {
          notificationExec: {
            notification: "PAGE_CHANGED",
            payload: 1
          }
        },
        "PAGE_2": {
          notificationExec: {
            notification: "PAGE_CHANGED",
            payload: 2
          }
        }
      },
      

      I didn’t test, but this could be a help to understand.

      F 1 Reply Last reply Reply Quote 0
      • F Offline
        fri4end @Guest
        last edited by

        @sean

        I’ve tested it,
        You will be redirected to another page instead of 1, 2.0_1544614195972_eacf22b0-19c3-4f76-9027-23240fb4433d-image.png

        ? 1 Reply Last reply Reply Quote 0
        • ? Offline
          A Former User @fri4end
          last edited by

          @fri4end said in MMM-Assistantmk2:

          You will be redirected to another page instead of 1, 2.

          What does it mean? These commands just emit notification "PAGE_CHABGED" with payload 1(or 2), if it doesn’t work as your expectation, give me details more.

          F 1 Reply Last reply Reply Quote 0
          • F Offline
            fri4end @Guest
            last edited by

            @sean

            Here’s what it says

             {
            		module: "MMM-AssistantMk2",
            		position: "bottom",
            		config:
            		{
            			useScreen: true,
            			youtubeAutoplay: true,
            			responseAlert: false,
            			alertError: false,
            			pauseOnYoutube:false,
            
            			deviceLocation:
            			{
            				coordinates: 
            				{
            					latitude: 37.57,
            					longitude: 126.98
            				},
            			},
            			profiles: 
            			{
            				"default": 
            				{
            					lang: "en-EN"
            				}
            			},
            			notifications: 
            			{
                				ASSISTANT_ACTIVATED: "HOTWORD_PAUSE",
            				ASSISTANT_DEACTIVATED: "HOTWORD_RESUME",
            			},
            			
            
            	
            			onIdle: {
            

            timer: 1000 * 30, // in 30sec after last Assistant Query, command “PAGE_1” will be activated.
            command: “PAGE_1”
            },

            onActivate: { //When you wakeup Assistant, command "PAGE_2" will be activated.
               timer: 0,
              command: "PAGE_2"
            

            },

            command: {
               "PAGE_1": {
               notificationExec: {
                  notification: "PAGE_CHANGED",
                  payload: 0
                }
              },
            "PAGE_2": {
               notificationExec: {
                  notification: "PAGE_CHANGED",
                  payload: 1
               }
              }
            },   
                      		}
               	},
            
            ? F 2 Replies Last reply Reply Quote 0
            • ? Offline
              A Former User @fri4end
              last edited by

              @fri4end
              So, onIdle or onActivate doesn’t work? or not your expectation?

              F 1 Reply Last reply Reply Quote 0
              • F Offline
                fri4end @fri4end
                last edited by

                This post is deleted!
                1 Reply Last reply Reply Quote 0
                • F Offline
                  fri4end @Guest
                  last edited by

                  @sean

                  No, onIdle and onActivate operate normally
                  We checked the status using the notification viewer module.

                  Manual operation below
                  0_1544615172984_1.png
                  Below, when onActivate
                  0_1544615183173_2.png
                  I think the payload return is incorrect.

                  ? 2 Replies Last reply Reply Quote 0
                  • ? Offline
                    A Former User @fri4end
                    last edited by

                    @fri4end
                    Ah, I got it.And I’ve found what was wrong. Wait a min. I’ll patch for it. I assumed each payload should be object type.

                    1 Reply Last reply Reply Quote 0
                    • ? Offline
                      A Former User @fri4end
                      last edited by

                      @fri4end
                      fixed. git pull and try again.

                      F 1 Reply Last reply Reply Quote 0
                      • F Offline
                        fri4end @Guest
                        last edited by

                        @sean

                        It works well. Thank you very much.^^

                        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