MagicMirror Forum

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

    SOLVED show and hide modules using python ?

    Troubleshooting
    2
    5
    113
    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.
    • S
      sakliadem last edited by

      Hello ,does anyone know how to show and hide modules using python ?

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @sakliadem last edited by

        @sakliadem well you can’t do it IN python, as the modulename.js is in JavaScript.

        you can use a node helper to collect info from python and the send that info to modulename.js and it can lookup the module call it’s module.suspend() method

        my python.print module shows how to collect python print statements and send them to the modulename.js

        https://github.com/sdetweil/MMM-PythonPrint

        Sam

        Create a working config
        How to add modules

        S 1 Reply Last reply Reply Quote 0
        • S
          sakliadem @sdetweil last edited by

          @sdetweil thanks a lot bro , yes I sow your module from the last time when you tell me to check it , and use it to display info from my max30102 sensor , I’ll share all of my codes with this forum members when I end it ,
          still have a problem just on the displaying the outputs of my voice control python code on the mirror , I’m trying hard , if I lose hope can I share it with you and you do it for me please ? (this project is my PFE)
          22fedc11-0c8c-4913-b302-85fb45b0b34a-image.png
          49248e47-63d1-44c0-a59f-7a321d8c1630-278423747_654912562268120_6407876287287223489_n.jpg cbf4bec1-4205-4abe-b04d-d5ca4bc426b7-278719091_509486300643408_5608784593960562733_n.jpg

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @sakliadem last edited by sdetweil

            @sakliadem what is the problem with displaying output?

            node helper starts python script in background
            python script does print
            node helper gets stdout text from running python script

            node helper sends to front end
            front end receives, processes and creates content
            front end tells mm new content is available by calling updateDom()
            mm calls getDom() to get new content to display where module position is

            Sam

            Create a working config
            How to add modules

            S 1 Reply Last reply Reply Quote 1
            • S
              sakliadem @sdetweil last edited by

              @sdetweil thank you , i did it

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