Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. [Vorlage] Betriebsstundenzähler & Verbrauchsrechner

    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

    [Vorlage] Betriebsstundenzähler & Verbrauchsrechner

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

      Hallo,

      ich möchte die Betriebszeiten von Pumpen protokollieren. Es wird auch die Summe protokolliert, aber das Zurücksetzen bei Tages- Wochenweseln funktioniert irgendwie nicht, was mache ich falsch:

      4489_bildschirmfoto_2018-04-13_um_14.58.18.png

      filename="Bildschirmfoto 2018-04-13 um 14.57.54.png" index="0">~~

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

        4489_bildschirmfoto_2018-04-13_um_14.57.54.png

        1 Reply Last reply Reply Quote 0
        • T
          thomasSC last edited by

          Hat keiner eine Idee für die Umwandlung in reine Stunden?

          1 Reply Last reply Reply Quote 0
          • L
            looxer01 last edited by

            @thomasSC:

            Hat keiner eine Idee für die Umwandlung in reine Stunden? `
            Hi,

            Wenn du die Methode "TIME" verwendest, dann wird normalerweise ein Format erzeugt, dass so aussieht "DDD:HH:MM:SS"

            Wenn du eine Umrechnung vornimmst, dann wird das Format nicht mehr so dargestellt. Das Programm rechnet immer mit Millisekunden.

            Wenn du also in Tabelle "Special" im Divisor 3600000 eingibst, dann wird die Zahl in Stunden dartgestellt. Allerdings dezimal. Dass heisst das 3:30 = 3.5

            vG Looxer

            1 Reply Last reply Reply Quote 0
            • B
              Beowolf last edited by

              Hallo zusammen,

              habe da ein Problem. Ich habe das Skript für meine Heizung eingebaut. Von meiner Heizung kommt die Meldung Brenner feuert als "true" und "false" Meldung.

              Der Datenpunkt sieht so aus "javascript.0.STUNDEN.BRENNER.STATE". Unter Objekte kann ich auch schön sehen wie sich der Zustand ändert. Unter VIS habe ich auch eine entsprechende Grafik die sich dann auch ändert. Es funktioniert also.

              Wenn ich diesen Datenpunkt jetzt in den BSZ einsetze passiert nicht. Der Zähler zählt nicht.

              Ersetze ich den Datenpunkt durch einen einfachenHM-Schaltaktor, also das ich per Funkschalter schalten kann, wird schön die "gezählte" Zeit im BSZ angezeigt.

              Wo mache ich den Fehler? Was wird benötigt?

              Grüße

              Manfred

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

                @Beowolf:

                Hallo zusammen,

                habe da ein Problem. Ich habe das Skript für meine Heizung eingebaut. Von meiner Heizung kommt die Meldung Brenner feuert als "true" und "false" Meldung.

                Der Datenpunkt sieht so aus "javascript.0.STUNDEN.BRENNER.STATE". Unter Objekte kann ich auch schön sehen wie sich der Zustand ändert. Unter VIS habe ich auch eine entsprechende Grafik die sich dann auch ändert. Es funktioniert also.

                Wenn ich diesen Datenpunkt jetzt in den BSZ einsetze passiert nicht. Der Zähler zählt nicht.

                Ersetze ich den Datenpunkt durch einen einfachenHM-Schaltaktor, also das ich per Funkschalter schalten kann, wird schön die "gezählte" Zeit im BSZ angezeigt.

                Wo mache ich den Fehler? Was wird benötigt?

                Grüße

                Manfred `

                Hab genau das gleiche Problem. Gibt es schon eine Lösung?

                cya

                Thomas

                1 Reply Last reply Reply Quote 0
                • B
                  Beowolf last edited by

                  Ja, das wäre wirklich sehr schön, wenn es dafür eine Lösung geben würde.

                  1 Reply Last reply Reply Quote 0
                  • L
                    looxer01 last edited by

                    @Beowolf:

                    Wenn ich diesen Datenpunkt jetzt in den BSZ einsetze passiert nicht. Der Zähler zählt nicht.

                    Ersetze ich den Datenpunkt durch einen einfachenHM-Schaltaktor, also das ich per Funkschalter schalten kann, wird schön die "gezählte" Zeit im BSZ angezeigt.

                    Wo mache ich den Fehler? Was wird benötigt? `

                    also, ich bin überzeugt, dass es ein Konfigurationsproblem ist.

                    Bitte Leerzeichen vermeiden. und die genaue Schreibweise der Datenpunkte beachten. Gross und Kleinschreibung muessen dabei exakt identisch siein.

                    Schaut Ihr mal und meldet zurück ?

                    vG Looxer

                    1 Reply Last reply Reply Quote 0
                    • S
                      schittl last edited by

                      @looxer01:

                      also, ich bin überzeugt, dass es ein Konfigurationsproblem ist.

                      Bitte Leerzeichen vermeiden. und die genaue Schreibweise der Datenpunkte beachten. Gross und Kleinschreibung muessen dabei exakt identisch siein.

                      Schaut Ihr mal und meldet zurück ?

                      vG Looxer `
                      Groß und Kleinschreibung kann ich schon mal ausschließen…

                      Gruppen[13]  = ['javascript.0.Weihnachtsbeleuchtung'                    ,'Licht'            ,false  ,true   ,true   ,true   ,true   ,true     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,false ,false]; // Weihnachtsbeleuchtung
                      .....
                      Gruppen[19]  = ['g-homa.0.XXXXXX.power'                                 ,'Strom'            ,false  ,true   ,true   ,true   ,true   ,false    ,'10'   ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,false ,false]; // XXXXXX
                      Gruppen[20]  = ['javascript.0.Systeminfos.STATE_WINDOWS_OPEN_KITCHEN'   ,'Luft'             ,false  ,true   ,true   ,true   ,true   ,true     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,''     ,false ,false]; // Kueche-Fenster
                      
                      

                      Diese beiden bringen keine Werte, andere aber schon und zuverlässig. Auffallend ist es das es nur Objekte betrifft, welche im Adapter "javascript" gespeichert sind. g-Homa, hue, hm-rega und hm-rpc funktionieren.

                      vg

                      Falk

                      1 Reply Last reply Reply Quote 0
                      • L
                        looxer01 last edited by

                        @schittl:

                        oß und Kleinschreibung kann ich schon mal ausschließen… `
                        ok, nächster punkt wäre mal zu schauen was in den RAW daten der Objekte steht.

                        Was ist das für ein Datentyp etc.

                        Kannst du die RAW Werte mal posten ?

                        vG Looxer

                        1 Reply Last reply Reply Quote 0
                        • B
                          Beowolf last edited by

                          Ist geschehen. :oops:

                          1 Reply Last reply Reply Quote 0
                          • S
                            schittl last edited by

                            @Beowolf:

                            Der Stromzähler wird schön erfasst, der Wasserzähler erscheint nicht. Warum? Wo habe ich dort einen Fehler?

                            Grüße

                            Manfred `

                            Vermutlich falsches Thema. Poste das bitte hier:

                            viewtopic.php?f=21&t=12272

                            1 Reply Last reply Reply Quote 0
                            • S
                              schittl last edited by

                              @looxer01:

                              ok, nächster punkt wäre mal zu schauen was in den RAW daten der Objekte steht.

                              Was ist das für ein Datentyp etc.

                              Kannst du die RAW Werte mal posten ?

                              vG Looxer `
                              Natürlich hier bitte:

                              ! { "from": "system.adapter.javascript.0", "ts": 1514491542223, "common": { "name": "Weihnachtsbeleuchtung", "desc": "Soll Weihnachtsbeleuchtung eingeschaltet werden?", "type": "boolean", "role": "javascript", "read": true, "write": true }, "native": { "name": "Weihnachtsbeleuchtung", "desc": "Soll Weihnachtsbeleuchtung eingeschaltet werden?", "type": "boolean", "role": "javascript", "read": true, "write": true }, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator", "state": 1636 }, "_id": "javascript.0.Weihnachtsbeleuchtung", "type": "state" } !

                              bzw.

                              ! { "common": { "name": "Status der geöffneten Fenster/Türen in der Küche", "read": true, "write": true, "type": "boolean", "desc": "Status der geoeffneten Fenster/Türen in der Kueche", "def": false, "role": "state" }, "native": { "name": "Status der geoeffneten Fenster/Türen in der Kueche", "read": true, "write": true, "type": "boolean", "desc": "Status der geoeffneten Fenster/Türen in der Kueche", "def": false, "role": "state" }, "type": "state", "from": "system.adapter.javascript.0", "ts": 1528288136458, "_id": "javascript.0.Systeminfos.STATE_WINDOWS_OPEN_KITCHEN", "acl": { "object": 1636, "state": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator" } } !
                              vg

                              Falk

                              1 Reply Last reply Reply Quote 0
                              • S
                                schittl last edited by

                                @looxer01: Gibt es neue Erkenntnisse? Benötigst Du weitere Unterstützung?

                                1 Reply Last reply Reply Quote 0
                                • L
                                  looxer01 last edited by

                                  @schittl:

                                  @looxer01: Gibt es neue Erkenntnisse? Benötigst Du weitere Unterstützung? `
                                  Hi,

                                  Ich komme erst am WE dazu, weil ich zur analyse etwas mehr Zeit brauche.

                                  ggf brauche ich deine Hilfe. Am Besten ist aber immer mal selber ins System zu schauen. Jedenfalls für den BSZ.

                                  Ich melde mich.

                                  vG Looxer

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    schittl last edited by

                                    @looxer01:

                                    Hi,

                                    Ich komme erst am WE dazu, weil ich zur analyse etwas mehr Zeit brauche.

                                    ggf brauche ich deine Hilfe. Am Besten ist aber immer mal selber ins System zu schauen. Jedenfalls für den BSZ. `

                                    Danke kein Stress, wollte nur mal wieder reinhören, nicht das es unter geht. Ich hatte schon versucht den Fehler selber zu lokalisieren, was mir aber nicht gelang. Daher meine Rückfrage.

                                    vg

                                    Falk

                                    1 Reply Last reply Reply Quote 0
                                    • L
                                      looxer01 last edited by

                                      @schittl:

                                      Danke kein Stress, wollte nur mal wieder reinhören, `
                                      Danke für die Geduld.

                                      Ich konnte das Problem nachvollziehen.

                                      Es gibt da wohl im IoBroker eine Verhaltensänderung bei subscriptions.

                                      Das heisst in diesem Fall, dass bei allen Datenpunkten ohne Verbuchungsbestätigung die subscription nicht ausgeführt wird.

                                      Das ist z.B der Fall bei Javascript objekten.

                                      Ich kann euch einen quick fix anbieten direkt im coding bis ich das gelöst habe.

                                      Dazu müsstet ihr bei den Javascript Objekten folgende Code Aenderungen durchführen (nur bei bei den javascript objekten bitte

                                      und zwar alle Zeilen betreffend javascript :

                                      on({id:  OnIdTAB[0 ], valNe: 1000 }, function(obj)    { if(special[0][7] === true) {  if (obj.state.ack)  {   if(special[0][10]  === "0 5 31 2 *") { GeraetUpdate( 0); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 0 ); } } });    // ende on id
                                      on({id:  OnIdTAB[1 ], valNe: 1000 }, function(obj)    { if(special[1][7] === true) {  if (obj.state.ack)  {   if(special[1][10]  === "0 5 31 2 *") { GeraetUpdate( 1); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 1 ); } } });    // ende on id
                                      on({id:  OnIdTAB[2 ], valNe: 1000 }, function(obj)    { if(special[2][7] === true) {  if (obj.state.ack)  {   if(special[2][10]  === "0 5 31 2 *") { GeraetUpdate( 2); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 2 ); } } });    // ende on id
                                      on({id:  OnIdTAB[3 ], valNe: 1000 }, function(obj)    { if(special[3][7] === true) {  if (obj.state.ack)  {   if(special[3][10]  === "0 5 31 2 *") { GeraetUpdate( 3); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 3 ); } } });    // ende on id
                                      on({id:  OnIdTAB[4 ], valNe: 1000 }, function(obj)    { if(special[4][7] === true) {  if (obj.state.ack)  {   if(special[4][10]  === "0 5 31 2 *") { GeraetUpdate( 4); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 4 ); } } });    // ende on id
                                      on({id:  OnIdTAB[5 ], valNe: 1000 }, function(obj)    { if(special[5][7] === true) {  if (obj.state.ack)  {   if(special[5][10]  === "0 5 31 2 *") { GeraetUpdate( 5); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 5 ); } } });    // ende on id
                                      on({id:  OnIdTAB[6 ], valNe: 1000 }, function(obj)    { if(special[6][7] === true) {  if (obj.state.ack)  {   if(special[6][10]  === "0 5 31 2 *") { GeraetUpdate( 6); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 6 ); } } });    // ende on id
                                      on({id:  OnIdTAB[7 ], valNe: 1000 }, function(obj)    { if(special[7][7] === true) {  if (obj.state.ack)  {   if(special[7][10]  === "0 5 31 2 *") { GeraetUpdate( 7); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 7 ); } } });    // ende on id
                                      on({id:  OnIdTAB[8 ], valNe: 1000 }, function(obj)    { if(special[8][7] === true) {  if (obj.state.ack)  {   if(special[8][10]  === "0 5 31 2 *") { GeraetUpdate( 8); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 8 ); } } });    // ende on id
                                      on({id:  OnIdTAB[9 ], valNe: 1000 }, function(obj)    { if(special[9][7] === true) {  if (obj.state.ack)  {   if(special[9][10]  === "0 5 31 2 *") { GeraetUpdate( 9); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 9 ); } } });    // ende on id
                                      on({id:  OnIdTAB[10], valNe: 1000 }, function(obj)    { if(special[10][7] === true) {  if (obj.state.ack)  {  if(special[10][10] === "0 5 31 2 *") { GeraetUpdate(10); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(10); } } });    // ende on id
                                      on({id:  OnIdTAB[11], valNe: 1000 }, function(obj)    { if(special[11][7] === true) {  if (obj.state.ack)  {  if(special[11][10] === "0 5 31 2 *") { GeraetUpdate(11); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(11); } } });    // ende on id
                                      on({id:  OnIdTAB[12], valNe: 1000 }, function(obj)    { if(special[12][7] === true) {  if (obj.state.ack)  {  if(special[12][10] === "0 5 31 2 *") { GeraetUpdate(12); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(12); } } });    // ende on id
                                      on({id:  OnIdTAB[13], valNe: 1000 }, function(obj)    { if(special[13][7] === true) {  if (obj.state.ack)  {  if(special[13][10] === "0 5 31 2 *") { GeraetUpdate(13); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(13); } } });    // ende on id
                                      on({id:  OnIdTAB[14], valNe: 1000 }, function(obj)    { if(special[14][7] === true) {  if (obj.state.ack)  {  if(special[14][10] === "0 5 31 2 *") { GeraetUpdate(14); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(14); } } });    // ende on id
                                      on({id:  OnIdTAB[15], valNe: 1000 }, function(obj)    { if(special[15][7] === true) {  if (obj.state.ack)  {  if(special[15][10] === "0 5 31 2 *") { GeraetUpdate(15); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(15); } } });    // ende on id
                                      on({id:  OnIdTAB[16], valNe: 1000 }, function(obj)    { if(special[16][7] === true) {  if (obj.state.ack)  {  if(special[16][10] === "0 5 31 2 *") { GeraetUpdate(16); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(16); } } });    // ende on id
                                      on({id:  OnIdTAB[17], valNe: 1000 }, function(obj)    { if(special[17][7] === true) {  if (obj.state.ack)  {  if(special[17][10] === "0 5 31 2 *") { GeraetUpdate(17); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(17); } } });    // ende on id
                                      on({id:  OnIdTAB[18], valNe: 1000 }, function(obj)    { if(special[18][7] === true) {  if (obj.state.ack)  {  if(special[18][10] === "0 5 31 2 *") { GeraetUpdate(18); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(18); } } });    // ende on id
                                      on({id:  OnIdTAB[19], valNe: 1000 }, function(obj)    { if(special[19][7] === true) {  if (obj.state.ack)  {  if(special[19][10] === "0 5 31 2 *") { GeraetUpdate(19); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(19); } } });    // ende on id
                                      on({id:  OnIdTAB[20], valNe: 1000 }, function(obj)    { if(special[20][7] === true) {  if (obj.state.ack)  {  if(special[20][10] === "0 5 31 2 *") { GeraetUpdate(20); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(20); } } });    // ende on id
                                      on({id:  OnIdTAB[21], valNe: 1000 }, function(obj)    { if(special[21][7] === true) {  if (obj.state.ack)  {  if(special[21][10] === "0 5 31 2 *") { GeraetUpdate(21); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(21); } } });    // ende on id
                                      on({id:  OnIdTAB[22], valNe: 1000 }, function(obj)    { if(special[22][7] === true) {  if (obj.state.ack)  {  if(special[22][10] === "0 5 31 2 *") { GeraetUpdate(22); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(22); } } });    // ende on id
                                      on({id:  OnIdTAB[23], valNe: 1000 }, function(obj)    { if(special[23][7] === true) {  if (obj.state.ack)  {  if(special[23][10] === "0 5 31 2 *") { GeraetUpdate(23); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(23); } } });    // ende on id
                                      on({id:  OnIdTAB[24], valNe: 1000 }, function(obj)    { if(special[24][7] === true) {  if (obj.state.ack)  {  if(special[24][10] === "0 5 31 2 *") { GeraetUpdate(24); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(24); } } });    // ende on id on({id:  OnIdTAB[25], valNe: 1000 }, function(obj)    { if(special[25][7] === true) {  if (obj.state.ack)  {  if(special[25][10] === "0 5 31 2 *") { GeraetUpdate(25); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(25); } } });    // ende on id
                                      
                                      

                                      austauschen mit beispielhaft für eine Zeile:

                                      on({id:  OnIdTAB[25], valNe: 1000 }, function(obj)    {    GeraetUpdate(25);  });    // ende on id
                                      
                                      

                                      vG Looxer

                                      1 Reply Last reply Reply Quote 0
                                      • L
                                        looxer01 last edited by

                                        Hi,

                                        so, habe noch ein wenig mehr gebastelt. Damit fällt der Fix einfacher und zugleich variabler aus.

                                        Wie zuvor bitte diese Codingzeilen austauschen: In dieser Variante aber alle Zeilen austauschen.

                                        on({id:  OnIdTAB[0 ], valNe: 1000 }, function(obj)    { if(special[0][7] === true) {  if (obj.state.ack)  {   if(special[0][10]  === "0 5 31 2 *") { GeraetUpdate( 0); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 0 ); } } });    // ende on id
                                        on({id:  OnIdTAB[1 ], valNe: 1000 }, function(obj)    { if(special[1][7] === true) {  if (obj.state.ack)  {   if(special[1][10]  === "0 5 31 2 *") { GeraetUpdate( 1); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 1 ); } } });    // ende on id
                                        on({id:  OnIdTAB[2 ], valNe: 1000 }, function(obj)    { if(special[2][7] === true) {  if (obj.state.ack)  {   if(special[2][10]  === "0 5 31 2 *") { GeraetUpdate( 2); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 2 ); } } });    // ende on id
                                        on({id:  OnIdTAB[3 ], valNe: 1000 }, function(obj)    { if(special[3][7] === true) {  if (obj.state.ack)  {   if(special[3][10]  === "0 5 31 2 *") { GeraetUpdate( 3); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 3 ); } } });    // ende on id
                                        on({id:  OnIdTAB[4 ], valNe: 1000 }, function(obj)    { if(special[4][7] === true) {  if (obj.state.ack)  {   if(special[4][10]  === "0 5 31 2 *") { GeraetUpdate( 4); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 4 ); } } });    // ende on id
                                        on({id:  OnIdTAB[5 ], valNe: 1000 }, function(obj)    { if(special[5][7] === true) {  if (obj.state.ack)  {   if(special[5][10]  === "0 5 31 2 *") { GeraetUpdate( 5); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 5 ); } } });    // ende on id
                                        on({id:  OnIdTAB[6 ], valNe: 1000 }, function(obj)    { if(special[6][7] === true) {  if (obj.state.ack)  {   if(special[6][10]  === "0 5 31 2 *") { GeraetUpdate( 6); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 6 ); } } });    // ende on id
                                        on({id:  OnIdTAB[7 ], valNe: 1000 }, function(obj)    { if(special[7][7] === true) {  if (obj.state.ack)  {   if(special[7][10]  === "0 5 31 2 *") { GeraetUpdate( 7); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 7 ); } } });    // ende on id
                                        on({id:  OnIdTAB[8 ], valNe: 1000 }, function(obj)    { if(special[8][7] === true) {  if (obj.state.ack)  {   if(special[8][10]  === "0 5 31 2 *") { GeraetUpdate( 8); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 8 ); } } });    // ende on id
                                        on({id:  OnIdTAB[9 ], valNe: 1000 }, function(obj)    { if(special[9][7] === true) {  if (obj.state.ack)  {   if(special[9][10]  === "0 5 31 2 *") { GeraetUpdate( 9); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate( 9 ); } } });    // ende on id
                                        on({id:  OnIdTAB[10], valNe: 1000 }, function(obj)    { if(special[10][7] === true) {  if (obj.state.ack)  {  if(special[10][10] === "0 5 31 2 *") { GeraetUpdate(10); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(10); } } });    // ende on id
                                        on({id:  OnIdTAB[11], valNe: 1000 }, function(obj)    { if(special[11][7] === true) {  if (obj.state.ack)  {  if(special[11][10] === "0 5 31 2 *") { GeraetUpdate(11); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(11); } } });    // ende on id
                                        on({id:  OnIdTAB[12], valNe: 1000 }, function(obj)    { if(special[12][7] === true) {  if (obj.state.ack)  {  if(special[12][10] === "0 5 31 2 *") { GeraetUpdate(12); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(12); } } });    // ende on id
                                        on({id:  OnIdTAB[13], valNe: 1000 }, function(obj)    { if(special[13][7] === true) {  if (obj.state.ack)  {  if(special[13][10] === "0 5 31 2 *") { GeraetUpdate(13); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(13); } } });    // ende on id
                                        on({id:  OnIdTAB[14], valNe: 1000 }, function(obj)    { if(special[14][7] === true) {  if (obj.state.ack)  {  if(special[14][10] === "0 5 31 2 *") { GeraetUpdate(14); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(14); } } });    // ende on id
                                        on({id:  OnIdTAB[15], valNe: 1000 }, function(obj)    { if(special[15][7] === true) {  if (obj.state.ack)  {  if(special[15][10] === "0 5 31 2 *") { GeraetUpdate(15); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(15); } } });    // ende on id
                                        on({id:  OnIdTAB[16], valNe: 1000 }, function(obj)    { if(special[16][7] === true) {  if (obj.state.ack)  {  if(special[16][10] === "0 5 31 2 *") { GeraetUpdate(16); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(16); } } });    // ende on id
                                        on({id:  OnIdTAB[17], valNe: 1000 }, function(obj)    { if(special[17][7] === true) {  if (obj.state.ack)  {  if(special[17][10] === "0 5 31 2 *") { GeraetUpdate(17); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(17); } } });    // ende on id
                                        on({id:  OnIdTAB[18], valNe: 1000 }, function(obj)    { if(special[18][7] === true) {  if (obj.state.ack)  {  if(special[18][10] === "0 5 31 2 *") { GeraetUpdate(18); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(18); } } });    // ende on id
                                        on({id:  OnIdTAB[19], valNe: 1000 }, function(obj)    { if(special[19][7] === true) {  if (obj.state.ack)  {  if(special[19][10] === "0 5 31 2 *") { GeraetUpdate(19); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(19); } } });    // ende on id
                                        on({id:  OnIdTAB[20], valNe: 1000 }, function(obj)    { if(special[20][7] === true) {  if (obj.state.ack)  {  if(special[20][10] === "0 5 31 2 *") { GeraetUpdate(20); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(20); } } });    // ende on id
                                        on({id:  OnIdTAB[21], valNe: 1000 }, function(obj)    { if(special[21][7] === true) {  if (obj.state.ack)  {  if(special[21][10] === "0 5 31 2 *") { GeraetUpdate(21); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(21); } } });    // ende on id
                                        on({id:  OnIdTAB[22], valNe: 1000 }, function(obj)    { if(special[22][7] === true) {  if (obj.state.ack)  {  if(special[22][10] === "0 5 31 2 *") { GeraetUpdate(22); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(22); } } });    // ende on id
                                        on({id:  OnIdTAB[23], valNe: 1000 }, function(obj)    { if(special[23][7] === true) {  if (obj.state.ack)  {  if(special[23][10] === "0 5 31 2 *") { GeraetUpdate(23); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(23); } } });    // ende on id
                                        on({id:  OnIdTAB[24], valNe: 1000 }, function(obj)    { if(special[24][7] === true) {  if (obj.state.ack)  {  if(special[24][10] === "0 5 31 2 *") { GeraetUpdate(24); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(24); } } });    // ende on id on({id:  OnIdTAB[25], valNe: 1000 }, function(obj)    { if(special[25][7] === true) {  if (obj.state.ack)  {  if(special[25][10] === "0 5 31 2 *") { GeraetUpdate(25); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(25); } } });    // ende on id
                                        
                                        

                                        mit diesen Codingzeilen:

                                        for (var x in Gruppen ) {
                                            on({id:  OnIdTAB[x], change: 'any' }, function(obj)    { if (obj.state.val !== obj.oldState.val) {  GeraetUpdate(x); }  });    // ende on id
                                        }
                                        
                                        

                                        Bitte Testen ob noch alles wie gewünscht läuft. Feedback wäre super.

                                        vG looxer

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          schittl last edited by

                                          @looxer01:

                                          Bitte Testen ob noch alles wie gewünscht läuft. Feedback wäre super. `
                                          Danke für die Korrektur. Habe es gerade mal umgestellt und beobachte das. Melde mich wieder ob es funktioniert.

                                          vg Falk

                                          1 Reply Last reply Reply Quote 0
                                          • S
                                            schittl last edited by

                                            Erste Erkenntnisse. Per VIS mit

                                            for (var x in Gruppen ) {
                                                on({id:  OnIdTAB[x], change: 'any' }, function(obj)    { if (obj.state.val !== obj.oldState.val) {  GeraetUpdate(x); }  });    // ende on id
                                            }
                                            

                                            funktioniert gar nix mehr. Sowohl für javascript bzw. auch z.B. hm-rpc Datenpunkte. Daher habe testweise ich nur die einzelne "Javascript" Gruppe geändert von:

                                            on({id:  OnIdTAB[13], valNe: 1000 }, function(obj)    { if(special[13][7] === true) {  if (obj.state.ack)  {  if(special[13][10] === "0 5 31 2 *") { GeraetUpdate(13); }  } } else {  if(obj.state.ack === false)  { GeraetUpdate(13); } } });    // ende on id
                                            
                                            

                                            nach:

                                            on({id:  OnIdTAB[13], change: 'any' }, function(obj)    {    GeraetUpdate(13);  });    // ende on id
                                            

                                            geändert und da funktioniert es per VIS.

                                            vg

                                            Falk

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            898
                                            Online

                                            31.8k
                                            Users

                                            79.9k
                                            Topics

                                            1.3m
                                            Posts

                                            javascript
                                            51
                                            333
                                            78561
                                            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