Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. [gelöst] das leidige Thema "Stromausfall"

    NEWS

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    [gelöst] das leidige Thema "Stromausfall"

    This topic has been deleted. Only users with topic management privileges can see it.
    • paul53
      paul53 @Homoran last edited by

      @homoran sagte: Vielleicht liegt es aber auch an der Größe der objects.json

      Je größer die Datei, desto seltener sollte sie geschrieben werden.

      OliverIO 1 Reply Last reply Reply Quote 0
      • OliverIO
        OliverIO @paul53 last edited by

        @paul53
        wenn sie zu groß wird, sollte man auf redis wechseln

        paul53 1 Reply Last reply Reply Quote 0
        • paul53
          paul53 @OliverIO last edited by

          @oliverio sagte: sollte man auf redis wechseln

          Redis schreibt in der Standardeinstellung auch alle 5 Minuten.

          OliverIO 1 Reply Last reply Reply Quote 0
          • OliverIO
            OliverIO @paul53 last edited by OliverIO

            @paul53
            ja aber iobroker schreibt ja plumb einfach eine komplette datei was bei größerer Datei dann immer länger dauert.

            redis kann über direkte datei-operationen nur bestimmte Anteile einer datei anpassen (verwendet die datei sozusagen als eigenes dateisystem) oder es hängt einfach immer nur an und reorganisiert in regelmäßigen abständen dann die daten, wie es datenbanken oft machen. die genaue strategie kenn ich nicht.

            1 Reply Last reply Reply Quote 0
            • Christian Wöhrle
              Christian Wöhrle last edited by

              Hier das gleiche Problem: heute morgen gefühlt 10 Sekunden Stromausfall und der Broker quittiert den Dienst.

              pi@raspberrypi:~ $ ls -la /opt/iobroker/iobroker-data/
              total 148
              drwxrwxr-x+   7 iobroker iobroker  4096 Jan  5 16:15 .
              drwxrwxr-x+   6 iobroker iobroker  4096 Jan  5 15:01 ..
              drwxrwxr-x+   2 iobroker iobroker 49152 Jan  5 16:13 backup-objects
              drwxrwxr-x+  49 iobroker iobroker  4096 Jan  3 06:54 files
              drwxrwxr-x+ 260 iobroker iobroker 12288 Jan  5 00:08 history
              -rw-rwxr--+   1 iobroker iobroker  4345 Apr 23  2021 iobroker.json
              drwxrwxr-x+   3 iobroker iobroker  4096 Apr 23  2021 jarvis
              -rw-rwxr--+   1 iobroker iobroker     3 Jan  5 14:11 notifications.json
              -rw-rwxr--+   1 iobroker iobroker 27105 Jan  5 14:12 objects.json
              -rw-rwxr--+   1 iobroker iobroker 18682 Jan  5 14:11 objects.json.bak
              -rw-rw-r--+   1 iobroker iobroker  3070 Jan  5 16:15 states.json
              -rw-rw-r--+   1 iobroker iobroker  3070 Jan  5 16:14 states.json.bak
              -rw-rwxr--+   1 iobroker iobroker     0 Jan  5 08:00 states.json.broken
              drwxrwxr-x+   3 iobroker iobroker  4096 Apr 23  2021 tmp
              pi@raspberrypi:~ $
              

              Iobroker fix bringt nichts
              Auch das fix-Skript bringt nichts.
              Wie kann ich eine komplette Neuinstallation umgehen? Und wenn das nicht geht, wie deinstalliere ich vorher sauber?

              paul53 Thomas Braun Homoran 3 Replies Last reply Reply Quote 0
              • paul53
                paul53 @Christian Wöhrle last edited by

                @christian-wöhrle sagte: Wie kann ich eine komplette Neuinstallation umgehen?

                Im Ordner backup-objects befinden sich Backups von objects.json und states.json von vor dem Stromausfall. Vor dem Rückspielen ioBroker stoppen!

                1 Reply Last reply Reply Quote 0
                • Thomas Braun
                  Thomas Braun Most Active @Christian Wöhrle last edited by

                  @christian-wöhrle

                  Schau hier rein:

                  https://forum.iobroker.net/topic/43325/mini-howto-cannot-find-view-system-for-search-host?_=1641396350304

                  Christian Wöhrle 1 Reply Last reply Reply Quote 1
                  • Homoran
                    Homoran Global Moderator Administrators @Christian Wöhrle last edited by Homoran

                    @christian-wöhrle sagte in das leidige Thema "Stromausfall":

                    Iobroker fix bringt nichts
                    Auch das fix-Skript bringt nichts.

                    wie sollte das auch?
                    diese beiden korrigieren die kaputtgespielten Rechte

                    aber keine defekten Dateien.
                    Und wenn du schon schreibst

                    @christian-wöhrle sagte in das leidige Thema "Stromausfall":

                    das gleiche Problem:

                    dann solltest du dir auch die bisher besprochene gleiche Lösung aus dem ersten Post ansehen!

                    @heimweh sagte in das leidige Thema "Stromausfall":

                    Cannot find view "system" for search "host" heißt es dann und ich habe das System immer mit dieser Vorgehensweise (siehe link) wieder zum laufen gekriegt.
                    Link Text

                    Christian Wöhrle 1 Reply Last reply Reply Quote 0
                    • BananaJoe
                      BananaJoe Most Active last edited by

                      Öhm, ich habe mir auch gerade mal in der

                      /opt/iobroker/iobroker-data/iobroker.json
                      

                      den "writeFileInterval" angesehen. Und der steht bei mir auf 5000 - was dann alle 5 Sekunden bedeutet?
                      Mein ioBroker liegt auf einer NVMe, sollte an sich kein Problem sein ... Ich kann mich nicht entsinnen jemals in der Datei etwas eingestellt zu haben.

                      Also höher setzen?

                      paul53 1 Reply Last reply Reply Quote 0
                      • paul53
                        paul53 @BananaJoe last edited by

                        @bananajoe sagte: "writeFileInterval" angesehen. Und der steht bei mir auf 5000 - was dann alle 5 Sekunden bedeutet?

                        Das ist wohl der Standardwert für die objects.json.

                        Homoran 1 Reply Last reply Reply Quote 0
                        • Homoran
                          Homoran Global Moderator Administrators @paul53 last edited by

                          @paul53 sagte:

                          Das ist wohl der Standardwert für die objects.json.

                          Ich habe gerade nach dem Post von @BananaJoe in allen meinen Installationen nachgesehen.
                          Entweder sehe ich da falsch nach, oder da steht nichts drin.

                          Selbst eine Suche nach write brachte keine Ergebnisse

                          paul53 1 Reply Last reply Reply Quote 0
                          • paul53
                            paul53 @Homoran last edited by paul53

                            @homoran sagte: Entweder sehe ich da falsch nach, oder da steht nichts drin.

                            Das hängt wohl mit dem Zeitpunkt der Installation zusammen. Deine ist sicherlich älter. Die Datei wird bei einem Update nicht überschrieben, was bei einer Konfiguration auch kontraproduktiv wäre. Bei mir waren die Einträge auch nicht vorhanden.

                            Homoran 1 Reply Last reply Reply Quote 0
                            • Christian Wöhrle
                              Christian Wöhrle @Thomas Braun last edited by

                              @thomas-braun Danke, das hat funktioniert! Muss ich mir wohl gleich anpinnen 😉

                              1 Reply Last reply Reply Quote 0
                              • Homoran
                                Homoran Global Moderator Administrators @paul53 last edited by Homoran

                                @paul53 sagte:

                                Das hängt wohl mit dem Zeitpunkt der Installation zusammen

                                Das denke ich auch, aber...

                                @paul53 sagte:

                                Deine ist sicherlich älter

                                Leider nein.
                                am 30.12. komplett neu aufgesetzt! - nach Jahren 😞

                                allerdings aus einem Backup wiederhergestellt.
                                Ob da die iobroker.json auch drin ist weiß ich allerdings nicht

                                und die eine Installation ist etwa 2 jahre alt

                                paul53 1 Reply Last reply Reply Quote 0
                                • Christian Wöhrle
                                  Christian Wöhrle @Homoran last edited by

                                  @homoran said in das leidige Thema "Stromausfall":

                                  @christian-wöhrle sagte in das leidige Thema "Stromausfall":

                                  Iobroker fix bringt nichts
                                  Auch das fix-Skript bringt nichts.

                                  wie sollte das auch?
                                  diese beiden korrigieren die kaputtgespielten Rechte

                                  aber keine defekten Dateien.
                                  Und wenn du schon schreibst

                                  @christian-wöhrle sagte in das leidige Thema "Stromausfall":

                                  das gleiche Problem:

                                  dann solltest du dir auch die bisher besprochene gleiche Lösung aus dem ersten Post ansehen!

                                  @heimweh sagte in das leidige Thema "Stromausfall":

                                  Cannot find view "system" for search "host" heißt es dann und ich habe das System immer mit dieser Vorgehensweise (siehe link) wieder zum laufen gekriegt.
                                  Link Text

                                  "Das gleiche Problem" bezog sich auf einen Stromausfall mit anschließendem Ausfall des Brokers 😉
                                  Danke, den Link bin ich durchgegangen, hat funktioniert.

                                  Homoran 1 Reply Last reply Reply Quote 1
                                  • Homoran
                                    Homoran Global Moderator Administrators @Christian Wöhrle last edited by

                                    @christian-wöhrle sagte in das leidige Thema "Stromausfall":

                                    den Link bin ich durchgegangen, hat funktioniert.

                                    Na, geht doch 🙂

                                    1 Reply Last reply Reply Quote 0
                                    • paul53
                                      paul53 @Homoran last edited by

                                      @homoran sagte: aus einem Backup wiederhergestellt. Ob da die iobroker.json auch drin ist weiß ich allerdings nicht

                                      In einem Backup sollte alles unter iobroker-data enthalten sein.

                                      Homoran 1 Reply Last reply Reply Quote 1
                                      • Homoran
                                        Homoran Global Moderator Administrators @paul53 last edited by

                                        @paul53 sagte:

                                        In einem Backup sollte alles unter iobroker-data enthalten sein.

                                        Danke!
                                        Dann passt es ja mit der "alten" Installation

                                        1 Reply Last reply Reply Quote 0
                                        • BananaJoe
                                          BananaJoe Most Active @AlCalzone last edited by

                                          @alcalzone Klingt so als könnte da gerade für die vielen Raspberry Pi Benutzer etwas getan werden könnte mit der JSONL-Variante. Bei denen lese ich - gefühlt - ja öfter "System läuft nicht nach Stromausfall/Neustart/usw."

                                          Theoretisch könnte man das ja auch auf REDIS umstellen ... macht man aber nicht?

                                          1 Reply Last reply Reply Quote 0
                                          • R
                                            Rushmed Most Active last edited by

                                            Ich hab noch ne Frage zu writeFileInterval. Wo genau packe ich das in der iobroker.json hin wenn es noch nicht da ist? Einfach bei Objects und States als neue Zeile mit rein also bspw. Zeile 27 und 53?

                                            {
                                              "system": {
                                                "memoryLimitMB": 0,
                                                "hostname": "",
                                                "statisticsInterval": 15000,
                                                "statisticsIntervalComment": "Interval how often the counters for input/output in adapters and controller will be updated",
                                                "checkDiskInterval": 300000,
                                                "checkDiskIntervalComment": "Interval how often the disk size will be checked",
                                                "noChmod": false,
                                                "instanceStartInterval": 2000,
                                                "noChmodComment": "Flag to test new feature with no chmod call. Must be deleted later and noChmod must be mainline (2018.06.04)",
                                                "compact": false,
                                                "compactComment": "Controller will try to start the instances as a part of the same process. No spawn will be done. Only by adapters that support it and have flag compact flag in io-package.json",
                                                "allowShellCommands": false,
                                                "allowShellCommandsComment": "Allow execution of \"shell\" sendToHost commands"
                                              },
                                              "multihostService": {
                                                "enabled": false,
                                                "secure": true
                                              },
                                              "network": {
                                                "IPv4": true,
                                                "IPv6": true,
                                                "bindAddress": null
                                              },
                                              "objects": {
                                                "type": "file",
                                                "typeComment": "Possible values: 'file' - [port 9001], redis - [port 6379], couch - [port 5984].",
                                                "host": "127.0.0.1",
                                                "port": 9001,
                                                "user": "",
                                                "pass": "",
                                                "noFileCache": false,
                                                "connectTimeout": 2000,
                                                "options": {
                                                  "auth_pass": null,
                                                  "retry_max_delay": 5000
                                                },
                                                "backup": {
                                                  "disabled": false,
                                                  "files": 24,
                                                  "filesComment": "Minimal number of backup files, after the deletion will be executed according to backupTime settings",
                                                  "hours": 48,
                                                  "hoursComment": "All backups older than 48 hours will be deleted. But only if the number of files is greater than of backupNumber",
                                                  "period": 120,
                                                  "periodComment": "by default backup every 2 hours. Time is in minutes. To disable backup set the value to 0",
                                                  "path": "",
                                                  "pathComment": "Absolute path to backup directory or empty to backup in data directory"
                                                },
                                                "dataDir": "../../iobroker-data/"
                                              },
                                              "states": {
                                                "type": "file",
                                                "typeComment": "Possible values: 'file' - [port 9000], 'redis' - [port 6379].",
                                                "host": "127.0.0.1",
                                                "port": 9000,
                                                "maxQueue": 1000,
                                                "user": "",
                                                "pass": "",
                                                "connectTimeout": 2000,
                                                "options": {
                                                  "auth_pass": null,
                                                  "retry_max_delay": 5000
                                                },
                                                "backup": {
                                                  "disabled": false,
                                                  "files": 24,
                                                  "filesComment": "Minimal number of backup files, after the deletion will be executed according to backupTime settings",
                                                  "hours": 48,
                                                  "hoursComment": "All backups older than 48 hours will be deleted. But only if the number of files is greater than of backupNumber",
                                                  "period": 120,
                                                  "periodComment": "by default backup every 2 hours. Time is in minutes. To disable backup set the value to 0",
                                                  "path": "",
                                                  "pathComment": "Absolute path to backup directory or empty to backup in data directory"
                                                },
                                                "dataDir": "../../iobroker-data/"
                                              },
                                              "log": {
                                                "level": "info",
                                                "maxDays": 7,
                                                "noStdout": true,
                                                "transport": {
                                                  "file1": {
                                                    "type": "file",
                                                    "enabled": true,
                                                    "filename": "log/iobroker",
                                                    "fileext": ".log",
                                                    "maxSize": null,
                                                    "maxFiles": null
                                                  },
                                                  "syslog1": {
                                                    "type": "syslog",
                                                    "enabled": false,
                                                    "host": "localhost",
                                                    "hostComment": "The host running syslogd, defaults to localhost.",
                                                    "portComment": "The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).",
                                                    "protocol": "udp4",
                                                    "protocolComment": "The network protocol to log over (e.g. tcp4, udp4, unix, unix-connect, etc).",
                                                    "pathComment": "The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).",
                                                    "facilityComment": "Syslog facility to use (Default: local0).",
                                                    "localhost": "iobroker",
                                                    "localhostComment": "Host to indicate that log messages are coming from (Default: localhost).",
                                                    "sysLogTypeComment": "The type of the syslog protocol to use (Default: BSD).",
                                                    "app_nameComment": "The name of the application (Default: process.title).",
                                                    "eolComment": "The end of line character to be added to the end of the message (Default: Message without modifications)."
                                                  }
                                                }
                                              },
                                              "dataDirComment": "Always relative to iobroker.js-controller/",
                                              "dataDir": "../../iobroker-data/"
                                            }
                                            

                                            Ich nehme an, dass die noch nicht geschriebenen Werte einfach im Ram bleiben. Welche Intervallzeit ist denn hier empfohlen oder was sollte maximal eingestellt werden.
                                            Schreibt der ioBroker die Files bei "iobroker stop" unabhängig vom Intervall?

                                            paul53 R 2 Replies Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            1.0k
                                            Online

                                            31.7k
                                            Users

                                            79.7k
                                            Topics

                                            1.3m
                                            Posts

                                            12
                                            63
                                            3870
                                            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