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.

    Displaying JSON results onto my MagicMirror

    Scheduled Pinned Locked Moved Development
    4 Posts 2 Posters 2.8k Views 2 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.
    • Z Offline
      zichao92
      last edited by

      Hi there,

      Im recently introduced to the applications of Raspberry Pi .I was amazed by Magic Mirror’s modules and applications, however, im very new to coding so please pardon me for my lack of understanding.

      Currently im trying to create a new module for my Magic Mirror, I have obtained a python script that generates a JSON file as an output. My current issue is that Im not too sure how i can display these results onto my MagicMirror as part of my module. I studied some of the default magic mirror and most of them uses XML to process the API calls. I tried researching online about using Js to run a local python script but it seems to be fruitless =/ .

      Hence, im seeking a little help from the community of MagicMirror

      strawberry 3.141S 1 Reply Last reply Reply Quote 0
      • strawberry 3.141S Offline
        strawberry 3.141 Project Sponsor Module Developer @zichao92
        last edited by

        @zichao92 json has the structure of an js object so it’s way easier access the properties and display them, than an xml file

        to run a python script you need to create a node_helper e.g. this module uses python shell to run a python script

        for more details see the readme https://github.com/MichMich/MagicMirror/tree/master/modules

        Please create a github issue if you need help, so I can keep track

        1 Reply Last reply Reply Quote 0
        • Z Offline
          zichao92
          last edited by

          @strawberry-3-141 , thanks for the reply. Will check out the pages that you mentioned!

          strawberry 3.141S 1 Reply Last reply Reply Quote 0
          • strawberry 3.141S Offline
            strawberry 3.141 Project Sponsor Module Developer @zichao92
            last edited by

            @zichao92 feel free to ask again if you stuck on something

            Please create a github issue if you need help, so I can keep track

            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