Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Tester
    4. jarvis v3.1.x - just another remarkable vis

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    jarvis v3.1.x - just another remarkable vis

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

      @myhome-0 Kannst du bitte den Hintergrund erklären.

      M 1 Reply Last reply Reply Quote 0
      • M
        MyHome 0 @MCU last edited by

        @mcu
        ich würde gern aus jarvis heraus die Weboberflächen diverser Geräte aufrufen.
        Ein direkter zugriff über iframe wird von den meisten Geräten (zbsp. Fronius WR) geblockt.
        zzt. binde ich die Geräte per widget ein und lass mir dann über die popup funktion alle Datenpunkte vom Gerät anzeigen...und an der Stelle hätte ich gern den Link...

        1 Reply Last reply Reply Quote 0
        • M
          MCU last edited by

          @myhome-0 Also im Popup vom Gerät soll der Link von der Weboberfläche von dem Gerät angezeigt werden.
          Dazu müsste man eigene DPs anlegen und dort den Link der Weboberfläche als HTML eintragen.
          Oder hab ich noch was falsch verstanden?

          M 1 Reply Last reply Reply Quote 1
          • M
            MyHome 0 @MCU last edited by

            @mcu
            hab gerade mal rumprobiert...
            das mit dem HTML einbinden wusste ich nicht...vielen Dank

            Es ist immer wieder erstaunlich, was alles möglich ist.👍

            Beste Grüße

            1 Reply Last reply Reply Quote 0
            • F
              Flowski last edited by

              Hallo, gibt es die Möglichkeit im Jarvis rein Reboot-Button für den Raspberry zu platzieren? Mein Homematic hat sich heute aufgehängt, da hätte ich von unterwegs gerne ein Neustart des Raspberry vorgenommen.

              Danke 🙂

              M 1 Reply Last reply Reply Quote 0
              • M
                MCU @Flowski last edited by

                @flowski
                https://mcuiobroker.gitbook.io/jarvis-infos/jarvis-v3/system-effektprog./rebootsystem

                F 1 Reply Last reply Reply Quote 0
                • F
                  Flowski @MCU last edited by

                  @mcu thx. kann acuh dieser Befehl "Normaler Reboot -> iob stop -> sudo reboot" eingefügt werden oder nur der Notfall-Reboot?

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    MCU @Flowski last edited by MCU

                    @flowski Der normale funktioniert nicht mit exec.

                    exec('iob stop && sudo reboot')
                    

                    Da stoppt er nur iobroker, aber der reboot wird nicht mehr ausgeführt.

                    @Thomas-Braun Könnte man die 2 Befehle in ein bash-Script packen und dieses dann von iobroker mit exec ausführen lassen?
                    Wo müsste man es speichern?

                    #!/bin/bash
                    iobroker stop
                    sudo reboot
                    

                    Ausführbar machen

                    chmod +x restart.sh
                    
                    Thomas Braun 1 Reply Last reply Reply Quote 0
                    • Thomas Braun
                      Thomas Braun Most Active @MCU last edited by Thomas Braun

                      @mcu

                      Naja,
                      iobroker stop
                      ist nicht mal erforderlich, da ein
                      sudo reboot
                      ohnehin die systemd services (wie auch den iobroker.service dann) in umgekehrter Start-Reihenfolge stoppt.

                      Feiner ist es natürlich, wenn man dem iobroker definitiv ausreichend Zeit zum stop gibt.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        MCU @Thomas Braun last edited by MCU

                        @thomas-braun Ich dachte immer man müsste vorher iob stop nutzen, um ioBroker nicht zu zerstören?
                        Wenn sudo reboot reicht, kann man es ja so lassen., ok Danke.

                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @MCU last edited by

                          @mcu
                          Feiner und 'sicherer' ist es natürlich, wenn du erst den 'iob stop' machst und wartest, bis du wieder einen Prompt im Terminal hast und dann erst rebootest.
                          Aber funktionieren tut es auch über systemd.

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            MCU @Thomas Braun last edited by

                            @thomas-braun Könnte man das mit einem bash script erreichen?

                            Thomas Braun 1 Reply Last reply Reply Quote 0
                            • Thomas Braun
                              Thomas Braun Most Active @MCU last edited by Thomas Braun

                              @mcu

                              Kommando zurück. Hab gerade nochmal nachgelesen:

                              Die Kommandos poweroff, reboot und suspend können mit normalen Benutzerechten ausgeführt werden und eignen sich dadurch z.B. auch zum Einsatz in Skripten und Startern, welche ohne Root-Rechte laufen. Sie werden ohne weitere Rückfrage ausgeführt. Bei poweroff und reboot können bei offenen Dateien Datenverluste auftreten; Benutzer sollten vor diesen Befehlen ihre Dateien explizit selber schließen.

                              Quelle: https://wiki.ubuntuusers.de/systemd/systemctl/

                              Also doch besser zuvor den ioBroker stoppen.

                              Muss ich mal was überlegen, vielleicht in das Kommando screen einbetten. Das läuft weiter, auch wenn das aufrufende Skript oder der user ausgeloggt ist.

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                MCU @Thomas Braun last edited by MCU

                                @thomas-braun Du hast doch schon bash Skripte geschrieben. Wartet er bei der Ausführung der nächsten Befehle, bis der davor ausgeführt wurde oder gibt es da ein WAIT?

                                Thomas Braun 1 Reply Last reply Reply Quote 0
                                • Thomas Braun
                                  Thomas Braun Most Active @MCU last edited by Thomas Braun

                                  @mcu sagte in jarvis v3.1.x - just another remarkable vis:

                                  Du hast doch schon bash Skripte geschrieben.

                                  Genau die müsste ich mir im einzelnen nochmal anschauen.
                                  Betrifft aber auch nur das 'nodejs-update'-Skript, weil in den anderen kein Reboot gemacht wird.

                                  Aber da die nicht per EXEC aus dem javascript aufgerufen werden sondern ex-iobroker laufen ist das kein Problem, dass man den Ast, auf dem man sitzt absägt.

                                  M 1 Reply Last reply Reply Quote 1
                                  • M
                                    MCU @Thomas Braun last edited by

                                    @thomas-braun Ich hab es mal probiert mit restart.sh in
                                    6cb264df-5ed2-45cc-be00-9906275996d2-image.png
                                    Aber auch hier wird nur iobroker runter gefahren, sudo reboot wird nicht mehr ausgeführt.
                                    e407e3c4-b7fd-42e7-98c3-6bccdb2a5706-image.png

                                    Thomas Braun 1 Reply Last reply Reply Quote 0
                                    • Thomas Braun
                                      Thomas Braun Most Active @MCU last edited by

                                      @mcu sagte in jarvis v3.1.x - just another remarkable vis:

                                      Aber auch hier wird nur iobroker runter gefahren, sudo reboot wird nicht mehr ausgeführt.

                                      Bei einem Aufruf via EXEC aus dem javascript-Adapter? Ja, ist klar, das geht so nicht.

                                      1 Reply Last reply Reply Quote 0
                                      • M
                                        MCU last edited by

                                        @thomas-braun Wäre das ein sauberer Neustart?
                                        4 Sekunden bis zum Neustart

                                        .... jede Menge weiterer Log-Einträge zum Neustart
                                        
                                        2024-04-17 20:11:03.023 - info: host.iobrokerPROD instance system.adapter.info.0 terminated with code 0 (NO_ERROR)
                                        2024-04-17 20:11:03.023 - warn: host.iobrokerPROD instance system.adapter.telegram.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.023 - info: host.iobrokerPROD instance system.adapter.telegram.0 terminated with code null ()
                                        2024-04-17 20:11:03.023 - warn: host.iobrokerPROD instance system.adapter.pushover.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.023 - info: host.iobrokerPROD instance system.adapter.pushover.0 terminated with code null ()
                                        2024-04-17 20:11:03.023 - warn: host.iobrokerPROD instance system.adapter.telegram.1 terminated due to SIGTERM
                                        2024-04-17 20:11:03.023 - info: host.iobrokerPROD instance system.adapter.telegram.1 terminated with code null ()
                                        2024-04-17 20:11:03.024 - warn: host.iobrokerPROD instance system.adapter.zigbee.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.024 - info: host.iobrokerPROD instance system.adapter.zigbee.0 terminated with code null ()
                                        2024-04-17 20:11:03.026 - info: host.iobrokerPROD instance system.adapter.javascript.0 terminated with code 0 (NO_ERROR)
                                        2024-04-17 20:11:03.026 - info: host.iobrokerPROD instance system.adapter.history.0 terminated with code 0 (NO_ERROR)
                                        2024-04-17 20:11:03.027 - info: host.iobrokerPROD instance system.adapter.jarvis.0 terminated with code 0 (NO_ERROR)
                                        2024-04-17 20:11:03.027 - warn: host.iobrokerPROD instance system.adapter.sonoff.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.027 - info: host.iobrokerPROD instance system.adapter.sonoff.0 terminated with code null ()
                                        2024-04-17 20:11:03.027 - warn: host.iobrokerPROD instance system.adapter.ping.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.027 - info: host.iobrokerPROD instance system.adapter.ping.0 terminated with code null ()
                                        2024-04-17 20:11:03.027 - warn: host.iobrokerPROD instance system.adapter.web.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.027 - info: host.iobrokerPROD instance system.adapter.web.0 terminated with code null ()
                                        2024-04-17 20:11:03.027 - warn: host.iobrokerPROD instance system.adapter.echarts.0 terminated due to SIGTERM
                                        2024-04-17 20:11:03.027 - info: host.iobrokerPROD instance system.adapter.echarts.0 terminated with code null ()
                                        2024-04-17 20:11:05.405 - info: meross.0 (361) Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
                                        2024-04-17 20:11:05.963 - info: host.iobrokerPROD instance system.adapter.meross.0 terminated with code 11 (ADAPTER_REQUESTED_TERMINATION)
                                        2024-04-17 20:11:05.963 - info: host.iobrokerPROD All instances are stopped.
                                        2024-04-17 20:11:06.043 - info: host.iobrokerPROD terminated
                                        
                                        
                                        ... NEUSTART 
                                        
                                        2024-04-17 20:11:10.156 - info: host.iobrokerPROD iobroker.js-controller version 5.0.19 js-controller starting
                                        2024-04-17 20:11:10.158 - info: host.iobrokerPROD Copyright (c) 2014-2023 bluefox, 2014 hobbyquaker
                                        2024-04-17 20:11:10.158 - info: host.iobrokerPROD hostname: iobrokerPROD, node: v18.20.2
                                        2024-04-17 20:11:10.158 - info: host.iobrokerPROD ip addresses: 192.168.178.150 fe80::10:40ff:fe11:7741
                                        2024-04-17 20:11:11.108 - info: host.iobrokerPROD connected to Objects and States
                                        2024-04-17 20:11:11.123 - info: host.iobrokerPROD added notifications configuration of host
                                        2024-04-17 20:11:11.461 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.nodeCurrent"
                                        2024-04-17 20:11:11.461 - info: host.iobrokerPROD 57 instances found
                                        2024-04-17 20:11:11.476 - info: host.iobrokerPROD starting 47 instances
                                        2024-04-17 20:11:11.513 - info: host.iobrokerPROD instance system.adapter.admin.0 started with pid 176
                                        2024-04-17 20:11:11.555 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.nodeNewest"
                                        2024-04-17 20:11:11.556 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.nodeNewestNext"
                                        2024-04-17 20:11:11.557 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.npmCurrent"
                                        2024-04-17 20:11:11.557 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.npmNewest"
                                        2024-04-17 20:11:11.558 - info: host.iobrokerPROD Delete state "system.host.iobrokerPROD.versions.npmNewestNext"
                                        2024-04-17 20:11:11.559 - info: host.iobrokerPROD Some obsolete host states deleted.
                                        2024-04-17 20:11:12.212 - info: admin.0 (176) starting. Version 6.17.3 in /opt/iobroker/node_modules/iobroker.admin, node: v18.20.2, js-controller: 5.0.19
                                        

                                        Ich habe es über einen Dateieintrag gemacht.
                                        Es läuft ein bash-Script welches alle 30 Sekunden den Inhalt prüft.
                                        Passt der Inhalt wird zuerst iobroker gestoppt und dann neu gestartet.
                                        Problem man muss in der bash-Datei das Passwort vom User angeben. Da man sonst immer nach dem Passwort gefragt wird. Sicher?

                                        Thomas Braun 1 Reply Last reply Reply Quote 0
                                        • Thomas Braun
                                          Thomas Braun Most Active @MCU last edited by

                                          @mcu sagte in jarvis v3.1.x - just another remarkable vis:

                                          Problem man muss in der bash-Datei das Passwort vom User angeben. Da man sonst immer nach dem Passwort gefragt wird. Sicher?

                                          Wie sieht das Skript denn konkret aus?
                                          Sicherheit ist halt relativ. Du könntest ja z. B. die Rechte an der Datei einschränken. Hab ich z. B. mit der Datei, die die Passwörter für eine smb-Freigabe beinhaltet so eingestellt:

                                          -rw-r----- 1 iobroker iobroker 38 Oct 19 20:16 /home/iobroker/.smbcredentials
                                          
                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            MCU @Thomas Braun last edited by MCU

                                            @thomas-braun bash script

                                            #!/bin/bash
                                            
                                            # Pfad zur Datei, deren Inhalt   berpr  ft werden soll
                                            datei="/opt/iobroker/iobroker-data/files/0_userdata.0/restart.txt"
                                            
                                            #  ^|berpr  fe den Inhalt der Datei
                                            if [ -f "$datei" ]; then
                                                inhalt=$(cat "$datei")
                                                
                                                #  ^|berpr  fe den Inhalt der Datei
                                                if [ "$inhalt" = "trigger_reboot" ]; then
                                                    echo "Reboot wird durchgefuehrt..."
                                                    neuer_inhalt="kein Reboot"
                                                    sed -i "1s/.*/$neuer_inhalt/" "$datei"
                                                    iobroker stop
                                                    echo "DEIN PASSWORT" | sudo -S reboot
                                                else
                                                    echo "Neustart nicht erforderlich. Inhalt der Datei: $inhalt"
                                                fi
                                            else
                                                echo "Datei nicht gefunden: $datei"
                                            fi
                                            

                                            crontab

                                            * * * * * bash /opt/iobroker/iobroker-data/files/0_userdata.0/checkFile.sh >> /opt/iobroker/iobroker-data/files/0_userdata.0/checkFile.log 2>&1
                                            * * * * * sleep 30; bash /opt/iobroker/iobroker-data/files/0_userdata.0/checkFile.sh >> /opt/iobroker/iobroker-data/files/0_userdata.0/checkFile.log 2>&1
                                            
                                            Thomas Braun 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            480
                                            Online

                                            31.7k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            jarvis material material ui materialdesign vis visualisierung visualization
                                            92
                                            1801
                                            619172
                                            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