Read the statement by Michael Teeuw here.
MMM-Page-Selector: A page switcher that can set positions of modules
-
@Brandenborg
This is not a default function of this module. However, if you can edit a small amount of code, it should be easy to implement.
Just copy these lines of code right after line 235 ofMMM-Page-Selector.js
. This lines should beselectPage(payload);
clearTimeout(self.default_timeout); if(![0, this.config.defaultPage].includes(payload)){ self.default_timeout = setTimeout(() => { selectPage(this.config.defaultPage); }, TIME) }
Then just replace
TIME
with the number of milliseconds you want to remain on the page before it automatically switches back to default. You may also have to change the0
in the if statement if your default page isn’t at the 0th position. -
@Veldrovive thanks a lot. I should manage that.
I recon the 0 position is the first page I define the contents of? -
@Brandenborg
The 0 should be the position of your default page in the page list. The furthest left is 0. -
@Veldrovive
Thanks. And thank you for a really useful module! -
@Brandenborg
The latest version of this module now has this as a (Not very well tested) feature.
You can now specify arestoreDefault
prop in the MMM-Page-Selector config with the number of seconds you want before it returns to the default page. -
Hi first of all thanks for this great module, Works great. I wanto to remotely change the pages which works with this commands:
http://ip:8080/remote?action=NOTIFICATION¬ification=PAGE_DOWN
http://ip:8080/remote?action=NOTIFICATION¬ification=PAGE_UPBut if I want to go to a specific page it does noct work with this command:
http://ip:8080/remote?action=NOTIFICATION¬ification="SELECT_PAGE"&payload="0"
Can somebody tell me whats wrong?
-
@m1scha
Hello, glad you’re enjoying the module.I am assuming that your page has some name that is not
"0"
.I haven’t extensively tested with magic mirror remote, but I imagine the issue is with setting
payload
to be a string. When it gets a string,MMM-Page-Selector
assumes it is the name of the page, not a page index. If an integer is sent, it assumes it is a page index.I don’t know how remote works, but you might be able to use
http://ip:8080/remote?action=NOTIFICATION¬ification=“SELECT_PAGE”&payload=0Or you could specify your page name as
http://ip:8080/remote?action=NOTIFICATION¬ification=“SELECT_PAGE”&payload=“YOUR_PAGE_NAME” -
@veldrovive said in MMM-Page-Selector: A page switcher that can set positions of modules:
remote?action=NOTIFICATION¬ification=“SELECT_PAGE”&payload=0
Hi, thanks for you reply.
I tested this in several variations, but I get a sucess Message, but change of page. -
@m1scha
I checked out MMM-Remote-Control and it is just a problem with string representations.remote?action=NOTIFICATION¬ification=“SELECT_PAGE”&payload=0
sends the literal notification “SELECT_PAGE” including the quotes. A more correct request would beremote?action=NOTIFICATION¬ification=SELECT_PAGE&payload=Main
which would switch the the page called main.However, in order to support other modules, pages are 1 indexed by notification so to switch to the first page, you would send
remote?action=NOTIFICATION¬ification=SELECT_PAGE&payload=1
Strings that are numbers are handled correctly by MMM-Page-Selector.
-
@veldrovive Hello! I want to use this module for
- An intro screen - only for 10 secs
- Move into screen 2 - stay there
Can I only have one screen to have a time interval and the other doesn’t? If so how?