Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Blockly
    5. Blockly: Überwachung von Geräten

    NEWS

    • Wir empfehlen: Node.js 22.x

    • Neuer Blog: Fotos und Eindrücke aus Solingen

    • ioBroker goes Matter ... Matter Adapter in Stable

    Blockly: Überwachung von Geräten

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

      @paul53 Danke.
      Leider funktioniert es nicht ganz.
      Ich habe es abgewandelt auf Batterie-Stände und habe eine Funktion "Raum" eingebaut, die den betroffenen Raum ausgibt:

      f8b702a3-7aa3-4124-9b4f-2580cae2a290-grafik.png

      Die Funktion sieht so aus:

      let room = getObject(idB, 'rooms').enumNames[0];
      return room;
      

      Der Nachrichtentext enthält aber immer dasselbe Objekt und denselben Raum, egal bei welchem ich den Wert unter die Schwelle setze.
      Ist diese Fassung, erst alle IDS an EINE Variable zu geben und daraus eine Liste zu machen, richtig? Oder müsste das ganze nicht mit einer grünen Schleife über "IDs vom Selektor" beginne, so wie hier:

      https://forum.iobroker.net/topic/48043/iobroker-blockly-ids-from-selector-function-frage

      Wo liegt der Fehler?
      (Dass die Geräte unterschiedlich auf Präsenz geprüft werden müssen, ist ärgerlich. Selbst bei den Comet-Heizkörperthermostaten habe einige das Battery-Objekt, andere irgendwie nicht. Vielleicht unterschiedliche Baureihen)

      1 Reply Last reply Reply Quote 0
      • Codierknecht
        Codierknecht Developer Most Active @wrod last edited by

        @wrod
        Hast Du Dir schon mal den Adapter „Device-Watcher“ angeschaut?
        Der ist genau dafür gemacht, Erreichbarkeit und Batteriestatus der Geräte zu überwachen.

        W 1 Reply Last reply Reply Quote 0
        • W
          wrod @Codierknecht last edited by

          @codierknecht Danke.
          Das ist schon fast was ich brauche. Ich möchte die Benachrichtigungen über einen privaten Synology-Chat organisieren, nicht Whatsapp oder Mail oder so nutzen. Das ist dort leider nicht implementiert. Schön wäre es, wenn man etwa die Nachrichten als Status eines anderen user-definierten Datenpunkt setzen könnte.

          ? 1 Reply Last reply Reply Quote 0
          • ?
            A Former User @wrod last edited by A Former User

            @wrod Die Nachrichten werden beim device-watcher auch in einen extra Datenpunkt erfasst für den Fall, das der gewünschte Nachrichten Dienst nicht vorhanden ist. 🙂

            Screenshot 2022-11-13 at 12.02.41.png

            W 1 Reply Last reply Reply Quote 0
            • W
              wrod @Guest last edited by

              @ciddi89 Danke. Dann funktioniert der bei mir einfach noch nicht, obwohl er grün ist. ALLE Datenpunkte bleiben bei (null). Auch die reinen Listen.

              ? 1 Reply Last reply Reply Quote 0
              • ?
                A Former User @wrod last edited by

                @wrod Hast du auch in der Instanz Einstellung die gewünschten Adapter/Geräte die Überwacht werden sollen, ausgewählt?

                W 1 Reply Last reply Reply Quote 0
                • W
                  wrod @Guest last edited by

                  @ciddi89 Ja, habe ich. BLE, FritzDECT und weitere. Auch mehrfach neu gestartet

                  ? W 2 Replies Last reply Reply Quote 0
                  • ?
                    A Former User @wrod last edited by

                    @wrod Erzählt das Log was interessantes? Evtl. die Instanz auf Debug stellen damit man sehen kann wo es stockt?

                    1 Reply Last reply Reply Quote 0
                    • W
                      wrod @wrod last edited by

                      @wrod Ich habe ihn noch mal neu gestartet. Das ergibt im Log:

                      host.iobrokerpi
                      2022-11-13 12:22:54.831 info stopInstance system.adapter.device-watcher.0 send kill signal
                      host.iobrokerpi
                      2022-11-13 12:22:54.657 info stopInstance system.adapter.device-watcher.0 (force=false, process=true)

                      ? 1 Reply Last reply Reply Quote 0
                      • ?
                        A Former User @wrod last edited by

                        @wrod deinstallieren den Adapter mal komplett und installiere den dann neu. Vielleicht kam da was nicht richtig mit. Und ansonsten die Instanz auf Debug Log stellen damit man sieht wo es stockt.

                        W 1 Reply Last reply Reply Quote 0
                        • W
                          wrod @Guest last edited by

                          @ciddi89 Hilft leider nicht.
                          Log nach Neuinstallation ud Neustart. Was die Verweise auf "redis" mit 127.0.0.1 sollen, erschließt sich mir nicht.

                          
                          	2022-11-13 13:29:41.179	info	Terminated (ADAPTER_REQUESTED_TERMINATION): Without reason
                          device-watcher.0
                          	2022-11-13 13:29:41.178	info	terminating
                          device-watcher.0
                          	2022-11-13 13:29:41.177	info	cleaned everything up...
                          device-watcher.0
                          	2022-11-13 13:29:41.177	debug	clearing refresh timeout
                          device-watcher.0
                          	2022-11-13 13:29:41.175	info	Got terminate signal TERMINATE_YOURSELF
                          host.iobrokerpi
                          	2022-11-13 13:29:41.170	info	stopInstance system.adapter.device-watcher.0 (force=false, process=true)
                          device-watcher.0
                          	2022-11-13 13:29:40.038	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:29:40.038	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:29:40.037	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:39.945	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:29:39.934	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:39.934	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:39.933	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:39.932	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:29:39.931	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:29:29.930	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:29:29.930	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:29:29.929	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:29.884	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:29:29.877	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:29.876	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:29.876	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:29.876	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:29:29.875	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:29:19.875	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:29:19.874	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:29:19.874	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:19.839	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:29:19.832	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:19.831	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:19.831	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:19.830	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:29:19.830	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:29:09.828	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:29:09.828	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:29:09.827	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:09.802	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:29:09.763	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:09.763	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:29:09.762	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:29:09.762	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:29:09.761	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:28:59.759	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:28:59.759	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:28:59.758	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:59.671	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:28:59.661	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:59.660	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:59.659	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:59.658	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:28:59.657	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:28:49.657	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:28:49.656	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:28:49.656	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:49.570	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:28:49.561	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:49.560	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:49.559	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:49.558	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:28:49.557	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:28:39.557	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:28:39.557	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:28:39.556	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:39.469	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:28:39.461	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:39.460	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:39.459	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:39.458	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:28:39.456	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:28:29.455	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:28:29.454	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:28:29.454	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:29.411	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:28:29.402	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:29.402	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:29.401	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:29.400	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:28:29.399	debug	Updating Data
                          device-watcher.0
                          	2022-11-13 13:28:19.398	debug	Function finished: main
                          device-watcher.0
                          	2022-11-13 13:28:19.397	debug	Created and filled data for all adapters
                          device-watcher.0
                          	2022-11-13 13:28:19.396	debug	Function finished: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:19.334	debug	Search can't be optimized because wildcard not at the end, fallback to keys!: function(doc) { if (doc.type === 'state') emit(doc._id, doc) }
                          device-watcher.0
                          	2022-11-13 13:28:19.301	debug	Function finished: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:19.301	debug	Function started: resetVars
                          device-watcher.0
                          	2022-11-13 13:28:19.300	debug	Function started: createDataOfAllAdapter
                          device-watcher.0
                          	2022-11-13 13:28:19.299	debug	Function started: main
                          device-watcher.0
                          	2022-11-13 13:28:19.298	debug	Function finished: createBlacklist
                          device-watcher.0
                          	2022-11-13 13:28:19.298	debug	Function started: createBlacklist
                          device-watcher.0
                          	2022-11-13 13:28:19.296	info	Number of selected adapters: 4. Loading data from: Ble, Fritzdect, Shelly, Sonoff ...
                          device-watcher.0
                          	2022-11-13 13:28:19.291	debug	[{"Selektor":"ble.*.rssi","adapter":"ble","battery":".battery","rssiState":".rssi","reach":"none","isLowBat":"none"},{"Selektor":"fritzdect.*.present","adapter":"fritzDect","battery":".battery","reach":".present","isLowBat":".batterylow"},{"Selektor":"shelly.*.uptime","adapter":"shelly","rssiState":".rssi","battery":".sensor.battery","reach":".online","isLowBat":"none"},{"Selektor":"sonoff.*.alive","adapter":"sonoff","rssiState":".Wifi_RSSI","battery":".battery","reach":".alive","uptime":".Uptime","isLowBat":"none"}]
                          device-watcher.0
                          	2022-11-13 13:28:19.289	debug	Adapter device-watcher was started
                          device-watcher.0
                          	2022-11-13 13:28:19.252	info	starting. Version 2.0.1 in /opt/iobroker/node_modules/iobroker.device-watcher, node: v18.12.1, js-controller: 4.0.23
                          device-watcher.0
                          	2022-11-13 13:28:19.025	debug	Plugin sentry destroyed because not initialized correctly
                          device-watcher.0
                          	2022-11-13 13:28:19.017	debug	Plugin sentry Do not initialize Plugin (enabled=false)
                          device-watcher.0
                          	2022-11-13 13:28:18.901	debug	States connected to redis: 127.0.0.1:9000
                          device-watcher.0
                          	2022-11-13 13:28:18.835	debug	States create User PubSub Client
                          device-watcher.0
                          	2022-11-13 13:28:18.833	debug	States create System PubSub Client
                          device-watcher.0
                          	2022-11-13 13:28:18.820	debug	Redis States: Use Redis connection: 127.0.0.1:9000
                          device-watcher.0
                          	2022-11-13 13:28:18.773	debug	Objects connected to redis: 127.0.0.1:9001
                          device-watcher.0
                          	2022-11-13 13:28:18.766	debug	Objects client initialize lua scripts
                          device-watcher.0
                          	2022-11-13 13:28:18.725	debug	Objects create User PubSub Client
                          device-watcher.0
                          	2022-11-13 13:28:18.723	debug	Objects create System PubSub Client
                          device-watcher.0
                          	2022-11-13 13:28:18.721	debug	Objects client ready ... initialize now
                          device-watcher.0
                          	2022-11-13 13:28:18.675	debug	Redis Objects: Use Redis connection: 127.0.0.1:900
                          
                          W 1 Reply Last reply Reply Quote 0
                          • W
                            wrod @wrod last edited by

                            @wrod Oh, mit der wohl gerade veröffentlichten neuen Version 2.02 geht es. Danke!

                            ? 1 Reply Last reply Reply Quote 0
                            • ?
                              A Former User @wrod last edited by

                              @wrod freut mich das es doch noch funktioniert 😊

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

                              Support us

                              ioBroker
                              Community Adapters
                              Donate

                              851
                              Online

                              32.0k
                              Users

                              80.5k
                              Topics

                              1.3m
                              Posts

                              4
                              15
                              493
                              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