• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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-Widget

Scheduled Pinned Locked Moved System
6 Posts 3 Posters 4.1k Views 3 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
    last edited by Sep 28, 2018, 2:09 PM

    MMM-Widget

    MagicMirror module for external web widgets.
    Widgets could be inserted anywhere multiply.

    Screenshot

    Screenshot

    Details

    [card:eouia/MMM-Widget]

    M J 2 Replies Last reply Sep 29, 2018, 12:11 AM Reply Quote 5
    • M Offline
      Mykle1 Project Sponsor Module Developer @Guest
      last edited by Sep 29, 2018, 12:11 AM

      @sean

      Fantastic idea!

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 0
      • J Offline
        Johans @Guest
        last edited by Nov 5, 2018, 2:18 PM

        @sean
        Thanks, I was looking for something like this.
        I’ve made simple website and works fine.
        Just a question. i’m using a few images which I have stored under a separate directory “images”, but where to put this directory? Same for my css file. For now I included the css data within the html section in the config.js, but I’ll rather work with a separate css file.

        ? 1 Reply Last reply Nov 5, 2018, 2:37 PM Reply Quote 0
        • ? Offline
          A Former User @Johans
          last edited by Nov 5, 2018, 2:37 PM

          @johans
          This widget module is just an iframe trick. If you want to include a full HTML document, you’d better to use other modules(there are many iFrame related modules already)
          But if you want to do anyhow, describe the location of resources(img or css or any web resources) with absolute path.
          Your URL of HTML putted will be https://localhost:8080/widget/SOME_ID but it is webURL not physical directory path. But you can put your resources in physical directory like ~/MagicMirror/mystorage, then you can use those resources in your HTML like this. < img src="/mystorage/SOMETHING.png" > or < img src="https://localhost:8080/mystorage/SOMETHING.png" >.

          1 Reply Last reply Reply Quote 0
          • J Offline
            Johans
            last edited by Nov 5, 2018, 10:19 PM

            @sean
            I’ve tried other Iframe modules, but all of them expects a url starting with http or https…
            I only have a simple html webpage that I can consult localy on my webbrowser.
            Something like this

            file:///home/pi/MyPlayer/index.html
            

            Iframes doesn’t work. That is why I’ll found your Widget module fantastic.
            Dumped my html code in the config and it works fantastic. Only small thing is the css data must also be in there, and I would have wanted it could read it from a directory.
            Have tried your solutions, but thats not working. Can’t acces for example :

            https://localhost:8080//home/pi/MyPlayer/images/Radio2.png    or 
            https://192.168.1.130:8080/home/pi/MyPlayer/images/Radio2.png
            
            

            this is giving me following Error: “This site is not reachable.”

            Another side effect on your module is that it shows a second black box on the screen. See picture.!
            ![0_1541456351536_IMG_20181105_223543-edit.jpg](Uploading 84%)

            ? 1 Reply Last reply Nov 5, 2018, 10:45 PM Reply Quote 0
            • ? Offline
              A Former User @Johans
              last edited by Nov 5, 2018, 10:45 PM

              @johans
              You should locate ‘myPlayer’ directory under ‘/home/pi/MagicMirror’.
              You can access ‘/home/pi/MagicMirror/myPlayer’ with ‘http://localhost:8080/myPlayer’ or just ‘/myPlayer’.

              1 Reply Last reply Reply Quote 0
              • 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