• 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.

show and hide modules using python ?

Scheduled Pinned Locked Moved Solved Troubleshooting
5 Posts 2 Posters 549 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.
  • S Offline
    sakliadem
    last edited by Apr 18, 2022, 3:43 PM

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

    S 1 Reply Last reply Apr 18, 2022, 4:01 PM Reply Quote 0
    • S Away
      sdetweil @sakliadem
      last edited by Apr 18, 2022, 4:01 PM

      @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

      How to add modules

      learning how to use browser developers window for css changes

      S 1 Reply Last reply Apr 18, 2022, 4:26 PM Reply Quote 0
      • S Offline
        sakliadem @sdetweil
        last edited by Apr 18, 2022, 4:26 PM

        @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 Apr 18, 2022, 4:32 PM Reply Quote 0
        • S Away
          sdetweil @sakliadem
          last edited by sdetweil Apr 19, 2022, 11:42 AM Apr 18, 2022, 4:32 PM

          @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

          How to add modules

          learning how to use browser developers window for css changes

          S 1 Reply Last reply Apr 19, 2022, 5:34 AM Reply Quote 1
          • S Offline
            sakliadem @sdetweil
            last edited by Apr 19, 2022, 5:34 AM

            @sdetweil thank you , i did it

            1 Reply Last reply Reply Quote 1
            • 1 / 1
            1 / 1
            • First post
              1/5
              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