MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. Veldrovive
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    V
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 53
    • Groups 1

    Posts

    Recent Best Controversial
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @m1scha
      I checked out MMM-Remote-Control and it is just a problem with string representations.

      remote?action=NOTIFICATION&notification=“SELECT_PAGE”&payload=0 sends the literal notification “SELECT_PAGE” including the quotes. A more correct request would be remote?action=NOTIFICATION&notification=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&notification=SELECT_PAGE&payload=1

      Strings that are numbers are handled correctly by MMM-Page-Selector.

      posted in System
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @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&notification=“SELECT_PAGE”&payload=0

      Or you could specify your page name as
      http://ip:8080/remote?action=NOTIFICATION&notification=“SELECT_PAGE”&payload=“YOUR_PAGE_NAME”

      posted in System
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @Brandenborg
      The latest version of this module now has this as a (Not very well tested) feature.
      You can now specify a restoreDefault prop in the MMM-Page-Selector config with the number of seconds you want before it returns to the default page.

      posted in System
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @Brandenborg
      The 0 should be the position of your default page in the page list. The furthest left is 0.

      posted in System
      V
      Veldrovive
    • RE: 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 of MMM-Page-Selector.js. This lines should be selectPage(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 the 0 in the if statement if your default page isn’t at the 0th position.

      posted in System
      V
      Veldrovive
    • RE: How to run as "https"?

      I’m not familiar with how a PWA works so I’m not quite sure what you are asking here. Are you saying that you have a PWA running that has a valid ssl encryption and you want to send requests from the PWA to your magic mirror, but they are being blocked due to mixed content policies?
      What happens when you request to the magic mirror that is using the unsigned certificate?
      A wildcard certificate handles subdomains so if you wanted to use the same certificate you would need to point a subdomain to your magic mirror.

      posted in Troubleshooting
      V
      Veldrovive
    • RE: How to run as "https"?

      @Lorenz
      In order to get a signed certificate, you need to go through a CA or certificate authority. Most of the time, magic mirrors are run on localhost and therefore cannot get a signed certificate so you just have to trust the IP on your browser and deal with the fact that it is not “trusted”.
      If you do happen to have a domain lying around, you can get a signed certificate for that and then use it to have a trusted website, but that’s a bunch of work and usually not worth it. If you do decide to go that route, there are a couple of places to sign certificates for free and I would suggest a quick google search to find them.

      posted in Troubleshooting
      V
      Veldrovive
    • RE: How to run as "https"?

      @Lorenz
      Could you post your server.js file so we can just make sure there aren’t many spelling mistakes?

      • The first thing that you should do is make sure that the path you supplied to the key and cert is correct. This error can arise if you are not pointing to the correct files.
      • Second, you can try to remake the cert and key and see if there was just some error the first time.
      • Third, I would try to figure out if the SSL version is correct. I’m not especially sure how this works, but when I ran into this issue once, somebody had said that the TLS version was incorrect.
      • Last, I would just try to reinstall openSSL and generate a new key.
      posted in Troubleshooting
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @rudibarani
      If I am understanding what you are asking for correctly, this function seems to be out of the scope that Page-Selector encompasses. I would develop a module to include this functionality, but I have been inactive in the world of Magic Mirror as of lately. As it stands, I would post this request to the module suggestions forum or ask somebody to include it in a module that has a closer association with this type of purpose. MMM-Remote-Control could be a good candidate.

      posted in System
      V
      Veldrovive
    • RE: MMM-Page-Selector: A page switcher that can set positions of modules

      @Johans,
      Ah, I believe the confusion comes from the fact that old discussions on this forum do not reflect the current functionality of the module. I try not to make any changes that break old config files, but one was necessary.
      In order to fix this config, you need to replace any instance of pages: "all" with pages: {"all": "some_position"}
      New versions don’t require you to have a position prop at all and you can just use the pages one.
      For more information, refer to the README.
      Hope this helps.

      posted in System
      V
      Veldrovive
    • 1 / 1