Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. Magic Mirror zusammen mit IOBroker

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Magic Mirror zusammen mit IOBroker

    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      mrjeschke @Kusselin last edited by

      @kusselin
      Auf keinen Fall Windows Notepad. Da kommt nur Unfug raus.
      Die Befehle sind im Terminal / ssh einzugeben.
      Mit cd ~
      geht es ins home-Verzeichnis
      Dann startest du dort mit
      nano mm.sh
      den Editor und gibst die beiden Zeilen
      cd ~/MagicMirror
      npm run server
      ein. Mit Steuerung s speichern, Mit Steuerung x beenden.
      Dann gibst du ein
      crontab -e
      Es öffnet sich so etwas wie ein Editor, dort kommt nur eine Zeile rein (am Ende)
      @reboot /home/pi/mm.sh
      Wieder mit Steueruns s speichern, mit Steuerung x beenden.
      sudo reboot
      Fertig

      Kusselin 1 Reply Last reply Reply Quote 0
      • M
        mrjeschke last edited by

        So sieht die mm.sh dann aus

        cd MagicMirror
        npm run server
        

        Und crontab

        # Edit this file to introduce tasks to be run by cron.
        #
        # Each task to run has to be defined through a single line
        # indicating with different fields when the task will be run
        # and what command to run for the task
        #
        # To define the time you can provide concrete values for
        # minute (m), hour (h), day of month (dom), month (mon),
        # and day of week (dow) or use '*' in these fields (for 'any').
        #
        # Notice that tasks will be started based on the cron's system
        # daemon's notion of time and timezones.
        #
        # Output of the crontab jobs (including errors) is sent through
        # email to the user the crontab file belongs to (unless redirected).
        #
        # For example, you can run a backup of all your user accounts
        # at 5 a.m every week with:
        # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
        #
        # For more information see the manual pages of crontab(5) and cron(8)
        #
        # m h  dom mon dow   command
        @reboot /home/pi/mm.sh
        
        
        Kusselin 1 Reply Last reply Reply Quote 0
        • Kusselin
          Kusselin @mrjeschke last edited by Kusselin

          @mrjeschke ok danke Dir.. ja Nano der interne Editor bei Linux.. ich probier’s mal danke Dir 🙂

          Ähhm das kommt wenn ich crontab -e eingebe! Was wähle ichda?

          pi@MagicMirror-live:~$ crontab -e
          no crontab for pi - using an empty one
          
          Select an editor.  To change later, run 'select-editor'.
            1. /bin/nano        <---- easiest
            2. /usr/bin/vim.tiny
            3. /bin/ed
          
          Choose 1-3 [1]:
          
          
          M 1 Reply Last reply Reply Quote 0
          • M
            mrjeschke @Kusselin last edited by

            @kusselin
            Da will er wissen mit welchem Editor du es bearbeiten möchtest.
            Nimm 1 für nano.

            Kusselin 1 Reply Last reply Reply Quote 1
            • Kusselin
              Kusselin @mrjeschke last edited by Kusselin

              @mrjeschke klappt net 😞
              wenn ich 192.168.200.74:8080 eingebe keine Verbindung...

               minute (m), hour (h), day of month (dom), month (mon),
              # and day of week (dow) or use '*' in these fields (for 'any').
              #
              # Notice that tasks will be started based on the cron's system
              # daemon's notion of time and timezones.
              #
              # Output of the crontab jobs (including errors) is sent through
              # email to the user the crontab file belongs to (unless redirected).
              #
              # For example, you can run a backup of all your user accounts
              # at 5 a.m every week with:
              # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
              #
              # For more information see the manual pages of crontab(5) and cron(8)
              #
              # m h  dom mon dow   command
              
              @reboot /home/pi/mm.sh
              
              

              da liegt mein MagicMirror

              /home/pi/MagicMirror

              Wasn das jetzt noch nachdem ich crontab beendet habe??

              pi@MagicMirror-live:~$ crontab -e
              No modification made
              
              
              M 1 Reply Last reply Reply Quote 0
              • M
                mrjeschke @Kusselin last edited by

                @kusselin
                Was sagt

                crontab -l
                
                Kusselin 1 Reply Last reply Reply Quote 0
                • Kusselin
                  Kusselin @mrjeschke last edited by

                  @mrjeschke sagte in Magic Mirror zusammen mit IOBroker:

                  crontab -l

                  pi@MagicMirror-live:~$ crontab -l
                  # Edit this file to introduce tasks to be run by cron.
                  #
                  # Each task to run has to be defined through a single line
                  # indicating with different fields when the task will be run
                  # and what command to run for the task
                  #
                  # To define the time you can provide concrete values for
                  # minute (m), hour (h), day of month (dom), month (mon),
                  # and day of week (dow) or use '*' in these fields (for 'any').
                  #
                  # Notice that tasks will be started based on the cron's system
                  # daemon's notion of time and timezones.
                  #
                  # Output of the crontab jobs (including errors) is sent through
                  # email to the user the crontab file belongs to (unless redirected).
                  #
                  # For example, you can run a backup of all your user accounts
                  # at 5 a.m every week with:
                  # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
                  #
                  # For more information see the manual pages of crontab(5) and cron(8)
                  #
                  # m h  dom mon dow   command
                  
                  @reboot /home/pi/mm.sh
                  pi@MagicMirror-live:~$
                  
                  
                  Homoran M 2 Replies Last reply Reply Quote 0
                  • Homoran
                    Homoran Global Moderator Administrators @Kusselin last edited by

                    @kusselin sagte in Magic Mirror zusammen mit IOBroker:

                    @reboot /home/pi/mm.sh

                    und auch rebooted?

                    Kusselin 1 Reply Last reply Reply Quote 0
                    • M
                      mrjeschke @Kusselin last edited by

                      @kusselin
                      Seltsam
                      Zur Sicherheit mal

                      ls -la ~/mm.sh
                      

                      und

                      cat ~/mm.sh
                      
                      Kusselin 1 Reply Last reply Reply Quote 0
                      • Kusselin
                        Kusselin @Homoran last edited by

                        @homoran hab den ganzen container rebootet ...ist das nicht o.k.?

                        1 Reply Last reply Reply Quote 0
                        • Kusselin
                          Kusselin @mrjeschke last edited by Kusselin

                          @mrjeschke sagte in Magic Mirror zusammen mit IOBroker:

                          cat ~/mm.sh

                          pi@MagicMirror-live:~$ ls -la ~/mm.sh
                          -rw-rw-r-- 1 pi pi 32 Oct 18 19:26 /home/pi/mm.sh
                          pi@MagicMirror-live:~$ cat ~/mm.sh
                          cd ~/MagicMirror
                          npm run server
                          pi@MagicMirror-live:~$
                          
                          

                          ich muss dazusagen das ich beid der Eingabe vorhin wo du sagtest ich solle 1 auswählen ein [c] davor hatte und keine Zahl mehr eintragen konnte..kam wahrscheinlich vom Strg+C immer machen....hab dann putty zugemacht udn neu aufgemacht....dann crontab -e eingegeben udn dann dachte ich das ich wieder zu der Auswahl kommen würde - war aber nicht so...dann hat sich gleich der Editor geöffnet..

                          weiss net ob es daran liegt?

                          kann man das nochmal rückgängig machen?

                          Anscheimed ist da was verlorengegangen...so kann ichs mir nur vorstellen....sorry

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            mrjeschke @Kusselin last edited by

                            @kusselin
                            Du hast die Datei nicht ausführbar gemacht

                            chmod +r ~/mm.sh
                            
                            Kusselin 1 Reply Last reply Reply Quote 1
                            • Kusselin
                              Kusselin @mrjeschke last edited by

                              @mrjeschke scheisse...auf was man bei Linux alles achten muss...voll krass...
                              jetzt läufts... 🙂
                              und jetzt macht der crontab bzw die datei merkt jetzt...achtuung ein reboot war jetzt weider starten...also ist jetzt wenn ich einen reboot mache immer MM verfügbar..richtig?

                              Frage noch....was hat das ausführen jetzt gebracht.....chmod +r ?

                              was bedeutet das +r?

                              vorher das verstehe ich so konnte man nicht auf die mm.sh zugreifen richtig?

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                mrjeschke @Kusselin last edited by mrjeschke

                                @kusselin
                                Das +r bedeutet das man die Datei ausführen darf, also das es ein Programm ist das man starten darf. Wie eine exe unter WIndows (ok nur in etwa)
                                Für crontab kannst du mal eingeben

                                rm ~/.selected_editor
                                

                                Dann sollte beim nächten mal die Abfrage wieder kommen.
                                Edit: Ja richtig, bei jedem booten wird jetzt der MM gestartet.

                                Kusselin 1 Reply Last reply Reply Quote 0
                                • Kusselin
                                  Kusselin @mrjeschke last edited by

                                  @mrjeschke perfekt.. danke 🙏 Dir

                                  1 Reply Last reply Reply Quote 0
                                  • Kusselin
                                    Kusselin @mrjeschke last edited by

                                    @mrjeschke sagte in Magic Mirror zusammen mit IOBroker:

                                    @kusselin
                                    Auf keinen Fall Windows Notepad. Da kommt nur Unfug raus.
                                    Die Befehle sind im Terminal / ssh einzugeben.
                                    Mit cd ~
                                    geht es ins home-Verzeichnis
                                    Dann startest du dort mit
                                    nano mm.sh
                                    den Editor und gibst die beiden Zeilen
                                    cd ~/MagicMirror
                                    npm run server
                                    ein. Mit Steuerung s speichern, Mit Steuerung x beenden.
                                    Dann gibst du ein
                                    crontab -e
                                    Es öffnet sich so etwas wie ein Editor, dort kommt nur eine Zeile rein (am Ende)
                                    @reboot /home/pi/mm.sh
                                    Wieder mit Steueruns s speichern, mit Steuerung x beenden.
                                    sudo reboot
                                    Fertig

                                    Hi, ich musste ein Update/Upgrade meines LXC Containers machen udn habe jetzt das Problem das ich keine Verbindung mehr aufbauen kann zu meinem MM wenn ich IP:8080 in den Browser eingebe.
                                    ich hatte durch deine Hilfe damals mit Cron den MM so ausführbar machen können damit dieser auch bei einem Neustart wieder startet. -> Nun startet er nicht mehr...die cron ist noch vorhanden udn auch die mm.sh unter /home..

                                    Weisst du eventuell was ich mir zerschossen habe beim Update/upgrade?

                                    Über ne Info herzlichen Dank

                                    M 1 Reply Last reply Reply Quote 0
                                    • M
                                      mrjeschke @Kusselin last edited by

                                      @kusselin
                                      Ist die Datei mm.sh ausführbar?
                                      In einem meiner Posts ist mir ein dummer Tippfehler passiert.
                                      Es muss heißen

                                      chmod +x ~/mm.sh
                                      
                                      Thomas Braun Kusselin 2 Replies Last reply Reply Quote 0
                                      • Thomas Braun
                                        Thomas Braun Most Active @mrjeschke last edited by

                                        Ich hab es jetzt nur überflogen, aber genau sowas steuert man über systemd und entsprechende units.

                                        1 Reply Last reply Reply Quote 0
                                        • Kusselin
                                          Kusselin @mrjeschke last edited by

                                          @mrjeschke hi, ich habe zumindest gestern unter benutzer "pi" in der Console den Befehl "chmod +x ~/mm.sh" abgesetzt...dann den LXC Container neu gestartet udn die IP:8080 im Browser eingegeben... Seite ging aber nicht auf 😞

                                          Frage: Was kann man sich bei einem Update zerschiessen bzw. was kann da überschrieben werden? Der cron und die mm.sh ist ja noch vorhanden udn der Inhalt auch (geprüft mit nano)

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            mrjeschke @Kusselin last edited by

                                            @kusselin
                                            Keine Ahnung was da passiert sein könnte.
                                            Ich würde aber mal testen ob die MM-Software läuft oder Fehler bringt.
                                            Dazu mal die mm.sh umbenennen.

                                            mv mm.sh mm2.sh
                                            

                                            Nach einem Neustart des LXC-Containers

                                            cd ~/MagicMirror
                                            npm run server
                                            

                                            und schauen ob irgendwelche Fehler kommen.

                                            Kusselin 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            906
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            magic mirror
                                            24
                                            224
                                            26430
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo