Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord
    MagicMirror² v2.15.0 is available! For more information about this release, check out this topic.

    Displaying JSON results onto my MagicMirror

    Development
    2
    4
    2295
    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
      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.141 1 Reply Last reply Reply Quote 0
      • strawberry 3.141
        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

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

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

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

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

            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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy