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.

    My Mirror

    Scheduled Pinned Locked Moved Show your Mirror
    10 Posts 3 Posters 2.0k Views 4 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
      sdetweil @radiv
      last edited by

      @radiv nice!

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      R 1 Reply Last reply Reply Quote 0
      • R Offline
        radiv @sdetweil
        last edited by

        @sdetweil thanks

        1 Reply Last reply Reply Quote 0
        • R Offline
          radiv
          last edited by

          Tomorrow I tell you something about my problems with the modules.
          Radar and mpv are out of MM. There are Python and Bash- Script’s to solve the problems with mmm-thirdparty-modules.

          1 Reply Last reply Reply Quote 0
          • R Offline
            radiv
            last edited by

            So, ich mache mal auf deutsch weiter.
            Im Probeaufbau hatte ich den üblichen PIR-Sensor verbaut. Dazu das Modul: MMM-PIR-Sensor.
            Weitere Module: MMM-Notification-Trigger und MMM-MplayerRadio.
            Hat auch funktioniert, nur daß bei jedem Bewegungsimpuls eine Unterbrechung des Radios auftrat.
            Also ein BashScript mit ‘mpv https://sender-url &’ erstellt, in MMM-NotificationTrigger eingetragen und in monitor_off.sh ‘killall mpv’ geschrieben und probiert.
            Resultat war, dass bei jedem Auslösen des Pir-Sensors mpv erneut gestartet wurde und es zu einem amüsanten Echo kam.
            Gleiche Resultate mit dem Rada_Sensor, der, wie der Pir-Sensor, ebenso gut mit MMM-PIR-Sensor funktioniert.
            Zum Modul MMM-PIR-Sensor ist noch zu sagen, dass trotz hoher Delay-Zeit (20min) das Display nach ca.8-10min ausschaltete. Damit auch das Radio.
            Also habe ich nach einem externen Python-Script gesucht, auch gefunden, monitor_on/_off.sh modifiziert, die drei obenstehenden Module deinstalliert und es funktioniert.

            #!/usr/bin/env python
            
            import sys
            import time
            import RPi.GPIO as io 
            import subprocess
            
            io.setmode(io.BCM)
            SHUTOFF_DELAY = 900 # seconds
            PIR_PIN=22
            
            def main():
                io.setup(PIR_PIN, io.IN)
                turned_off = False
                last_motion_time = time.time()
                while True:
                    if io.input(PIR_PIN):
                        last_motion_time = time.time()
                        sys.stdout.flush()
                        if turned_off:
                            turned_off = False
                            turn_on()
                    else:
                        if not turned_off and time.time() > (last_motion_time + SHUTOFF_DELAY):
                            turned_off = True
                            turn_off()
                        if not turned_off and time.time() > (last_motion_time + 1):
                            time.sleep(.1)
            def turn_on():
                subprocess.call("sh /home/pi/monitor_on.sh", shell=True)
            
            def turn_off():
                subprocess.call("sh /home/pi/monitor_off.sh", shell=True)
            
            if __name__ == '__main__':
                try:
                    main()
                except KeyboardInterrupt:
                    io.cleanup()
            
            #!/bin/bash
            mpv https://www.radioeins.de/live.m3u &
            vcgencmd display_power 1
            
            #!/bin/bash
            vcgencmd display_power 0
            killall mpv
            
            1 Reply Last reply Reply Quote 0
            • kusselinK Offline
              kusselin
              last edited by

              Hi, wie dunkelst Du das Display am Rand ab wenn der Rand des Displays silber ist?

              Gruss

              R 1 Reply Last reply Reply Quote 0
              • R Offline
                radiv @kusselin
                last edited by

                @kusselin , habe auf die beschichtete Seite des Spiegels schwarze Folie geklebt ( nicht unbedingt blasenfrei, was aber nicht stört ) und vorher passgenau die Innenmaße zwischen der Metallfassung des Displays ausgeschnitten. Die Metallfassung wird also von der schwarzen Folie verdeckt.

                1 Reply Last reply Reply Quote 0
                • kusselinK Offline
                  kusselin
                  last edited by

                  ahh o.k danke für die Info…welche Folie kann ich da nehmen ? Hast du einen Link eventuell?

                  Danke und Gruss

                  R 1 Reply Last reply Reply Quote 0
                  • R Offline
                    radiv @kusselin
                    last edited by

                    @kusselin Hab´s in einem Baumarkt gekauft.AFE4594A-F691-4C8A-8549-E41FF40B1D15.jpeg

                    1 Reply Last reply Reply Quote 0
                    • kusselinK Offline
                      kusselin
                      last edited by kusselin

                      o.k. danke dir…

                      und das ist SCHWARZFOLIE keine Spiegelfolie???

                      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