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

    Topics

    • P

      My new Magic Mirror

      Watching Ignoring Scheduled Pinned Locked Moved Show your Mirror
      12
      3
      8 Votes
      12 Posts
      6k Views
      S
      @rachee who did u reply to?
    • P

      Issues enabling https on RP 4

      Watching Ignoring Scheduled Pinned Locked Moved Troubleshooting
      1
      0 Votes
      1 Posts
      185 Views
      P
      Hi all, I found myself working on my first Smart Mirror this week and I loved how easy it is to download new modules and have them running in no time. I was interested in enabling https by creating the certificates and changing the variable under config.js: useHttps: false -> useHttps: true Nevertheless I only got a black screen afterwards. I tried everything I could think of, but, being that Im not much of a programmer, it basically meant hitting the keyboard with one hand while having another coffee hoping that would do it. Eventually, I managed to find out that I could connect to the https://localhost:port via a browser, which made me realise the keyboard-hitting works… and that it was running… just not with electron. Well, tonight, after many an hour in front of this, I was able to get it to work, so I can narrow it down to the following: Create your certificates correctly Make sure you put the right address where they are located Not enough coffee There is a piece of code in electron.js that seems to be checking the wrong variable: // if (config[“tls”] !== null && config[“tls”]) { if (config.useHttps) { prefix = “https://”; } else { prefix = “http://”; } The line in “//” was commented out by me. I couldnt find much of a reference to tls anywhere. Finally, as the certificate is self signed, these lines had to be added also to electron.js: app.on(‘certificate-error’, (event, webContents, url, error, certificate, callback) => { event.preventDefault(); callback(true); }); I hope it helps someone else! Thanks Regards JP
    • 1 / 1