• Register
    • Login
    • Search

    Solved Return to Main Page after set time.

    EXT-Pages
    3
    9
    78
    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.
    • J
      japmagicmirror33 last edited by

      Hello
      Im sorry if its obvious or been discussed before, but how can I return pages back to home page (Page 0) after a set amount of time.I have tried MMM-Pages and it has rotationHomePage that works awesome.Is it possible with EXT-Pages.

      1 Reply Last reply Reply Quote 0
      • V
        venditti69500 Donators last edited by

        Bonjour, oui je pense que vous recherchez rotationTimes: {temps} qui renvoi a home page.

        1 Reply Last reply Reply Quote 0
        • J
          japmagicmirror33 last edited by

          Thank you for your reply.
          Could you give me a example of code in order to accomplish what I am after?

          V 2 Replies Last reply Reply Quote 0
          • V
            venditti69500 Donators @japmagicmirror33 last edited by

            @japmagicmirror33 je ne sais pas si cela peut vous aider, mais vous pouvez vous aider de cela pour créer votre propre recette, vous n’aurez qu’à modifier le nom des pages concernées et le délai : link text

            1 Reply Last reply Reply Quote 0
            • V
              venditti69500 Donators @japmagicmirror33 last edited by

              @japmagicmirror33 exemple : ```
              var recipe = {
              transcriptionHooks: {
              “Page2”: {
              pattern: “mets la page 2”,
              command: “PAGE2”
              },
              },
              commands: {
              “PAGE2”: {
              moduleExec: {
              module: () => {
              this.sendNotification(“EXT_PAGES-CHANGED”, 2)
              setTimeout(() => {
              this.sendNotification(“EXT_PAGES-HOME”)
              }, 15000)
              }
              }
              }
              }
              }

              exports.recipe = recipe

              Cette recette affichera la page 2 pendant 15 secondes puis retournera à la page principale.
              1 Reply Last reply Reply Quote 0
              • J
                japmagicmirror33 last edited by

                Hello
                Thank you for your help, unfortunately I could not get it to work.
                I really appreciate you taking the time to assist me.

                1 Reply Last reply Reply Quote 0
                • J
                  japmagicmirror33 last edited by

                  var recipe = {
                    transcriptionHooks: {
                      "PAGEHOME": {
                        pattern: "go to main page",
                        command: "PAGEHOME"
                      },
                      "PAGE1": {
                        pattern: "go to page 1",
                        command: "PAGE1"
                      },
                      "PAGE2": {
                        pattern: "go to page 2",
                        command: "PAGE2"
                      },
                      "ADMIN": {
                        pattern: "go to admin",
                        command: "PAGEADMIN"
                      }
                    },
                    commands: {
                      "PAGEHOME": {
                        notificationExec: {
                          notification: "EXT_PAGES-HOME"
                        }
                      },
                      "PAGE1": {
                        notificationExec: {
                          notification: "EXT_PAGES-CHANGED",
                          payload: 1
                        }
                      },
                      "PAGE2": {
                        moduleExec: {
                          module: () => {
                            this.sendNotification("EXT_PAGES-CHANGED", 2)
                            setTimeout(() => {
                              this.sendNotification("EXT_PAGES-HOME")
                            }, 15000)
                          }
                        }
                      },
                      "PAGEADMIN": {
                        notificationExec: {
                          notification: "EXT_PAGES-HIDDEN_SHOW",
                          payload: "admin"
                        }
                      }
                    }
                  };
                  
                  exports.recipe = recipe;
                  
                  1 Reply Last reply Reply Quote 0
                  • bugsounet
                    bugsounet Main Coder last edited by

                    I think this is better for “PAGE2” in commands

                        "PAGE2": {
                          moduleExec: {
                            module: ["Gateway"],
                            exec: (module) => {
                              module.sendNotification("EXT_PAGES-CHANGED", 2)
                              setTimeout(() => {
                                module.sendNotification("EXT_PAGES-HOME")
                              }, 15000)
                            }
                          }
                        },
                    

                    My place in France Top committers of Github:
                    committers.top badge

                    1 Reply Last reply Reply Quote 1
                    • J
                      japmagicmirror33 last edited by

                      @bugsounet
                      I have been pulling my hair out trying to figure it out.
                      While pulling my hair out a bugsnounet comes along and whips up some code and it works 100%
                      Thank You for an awesome project and being involved in the community.
                      😃 😃 😃

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Powered by NodeBB | @bugsounet ©2023