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
      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
                                  • Kusselin
                                    Kusselin @mrjeschke last edited by Kusselin

                                    @mrjeschke Hi schau...ich bin ins Verzeichnis MagicMirror dann das hier:

                                    pi@MagicMirror-live:~/MagicMirror$ npm run server
                                    
                                    > magicmirror@2.27.0 server
                                    > node ./serveronly
                                    
                                    node:internal/modules/cjs/loader:1031
                                      throw err;
                                      ^
                                    
                                    Error: Cannot find module 'envsub'
                                    Require stack:
                                    - /home/pi/MagicMirror/js/app.js
                                    - /home/pi/MagicMirror/serveronly/index.js
                                        at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1028:15)
                                        at Function.Module._resolveFilename (/home/pi/MagicMirror/node_modules/module-alias/index.js:49:29)
                                        at Function.Module._load (node:internal/modules/cjs/loader:873:27)
                                        at Module.require (node:internal/modules/cjs/loader:1100:19)
                                        at require (node:internal/modules/cjs/helpers:119:18)
                                        at Object.<anonymous> (/home/pi/MagicMirror/js/app.js:6:16)
                                        at Module._compile (node:internal/modules/cjs/loader:1198:14)
                                        at Object.Module._extensions..js (node:internal/modules/cjs/loader:1252:10)
                                        at Module.load (node:internal/modules/cjs/loader:1076:32)
                                        at Function.Module._load (node:internal/modules/cjs/loader:911:12) {
                                      code: 'MODULE_NOT_FOUND',
                                      requireStack: [
                                        '/home/pi/MagicMirror/js/app.js',
                                        '/home/pi/MagicMirror/serveronly/index.js'
                                      ]
                                    }
                                    
                                    

                                    Kannst du da sagen was da net geht?
                                    Danke

                                    EDIT: Keiner ne Idee was die Meldungen bedeuten? Ich kann nur lesen was mit "Cannot find modul"
                                    Was ist hier zu machen?
                                    Danke

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

                                      @kusselin
                                      Du könntest den Installer noch mal starten.

                                      cd ~/MagicMirror
                                      npm run install-mm
                                      
                                      
                                      Kusselin 2 Replies Last reply Reply Quote 1
                                      • S
                                        smarthome2020 last edited by

                                        Ich hatte den Thread damals schon etwas verfolgt. Soweit ich beim Überfliegen gesehen habe, gibt kein relativ wenig Bilder zu den Spiegeln. Habt ihr ggf. noch einige für mich? Ich wollte sowas auf Dauer auch umsetzen.
                                        Vielen Dank schon mal.

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

                                          @mrjeschke sagte in Magic Mirror zusammen mit IOBroker:

                                          @kusselin
                                          Du könntest den Installer noch mal starten.

                                          cd ~/MagicMirror
                                          npm run install-mm
                                          
                                          

                                          Hi, danke, aber wenn ich den installer starte ist alles weg..config vorher sichern gell

                                          Edit
                                          Denke da stimmt was nicht mit npm?
                                          Könnt ihr euch das nochmal anschauen bitte...

                                          pi@MagicMirror-live:~/MagicMirror$ npm run install-mm
                                          > magicmirror@2.27.0 install-mm
                                          > npm install --no-audit --no-fund --no-update-notifier --only=prod --omit=dev
                                          npm ERR! code EBADENGINE
                                          npm ERR! engine Unsupported engine
                                          npm ERR! engine Not compatible with your version of node/npm: magicmirror@2.27.0
                                          npm ERR! notsup Not compatible with your version of node/npm: magicmirror@2.27.0
                                          npm ERR! notsup Required: {"node":">=18"}
                                          npm ERR! notsup Actual:   {"npm":"8.19.4","node":"v16.20.2"}
                                          npm ERR! A complete log of this run can be found in:
                                          npm ERR!     /home/pi/.npm/_logs/2024-08-09T09_41_27_957Z-debug-0.log
                                          npm notice
                                          npm notice New major version of npm available! 8.19.4 -> 10.8.2
                                          npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.8.2
                                          npm notice Run npm install -g npm@10.8.2 to update!
                                          npm notice
                                          
                                          Thomas Braun 1 Reply Last reply Reply Quote 0
                                          • Thomas Braun
                                            Thomas Braun Most Active @Kusselin last edited by

                                            @kusselin

                                            Dann ist dein nodejs/npm-Setup zu alt. Oder falsch.

                                            node -v
                                            npm -v
                                            sudo apt update
                                            apt policy nodejs
                                            

                                            sagt?

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            541
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            magic mirror
                                            24
                                            224
                                            26321
                                            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