Skip to content
  • Home
  • Recent
  • Tags
  • 0 Unread 0
  • Categories
  • Unreplied
  • Popular
  • GitHub
  • Docu
  • Hilfe
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
ioBroker Logo

Community Forum

donate donate
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. [Vorlage] Betriebsstundenzähler & Verbrauchsrechner

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    16
    1
    278

  • Jahresrückblick 2025 – unser neuer Blogbeitrag ist online! ✨
    BluefoxB
    Bluefox
    17
    1
    4.6k

  • Neuer Blogbeitrag: Monatsrückblick - Dezember 2025 🎄
    BluefoxB
    Bluefox
    13
    1
    1.3k

[Vorlage] Betriebsstundenzähler & Verbrauchsrechner

Scheduled Pinned Locked Moved Skripten / Logik
javascript
333 Posts 51 Posters 96.5k Views 26 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mac
    wrote on last edited by
    #243

    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
    0
    • M Offline
      M Offline
      Mac
      wrote on last edited by
      #244

      4489_bildschirmfoto_2018-04-13_um_14.57.54.png

      1 Reply Last reply
      0
      • T Offline
        T Offline
        thomasSC
        wrote on last edited by
        #245

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

        1 Reply Last reply
        0
        • L Offline
          L Offline
          looxer01
          wrote on last edited by
          #246

          @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
          0
          • B Offline
            B Offline
            Beowolf
            wrote on last edited by
            #247

            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

            Die Natur braucht nicht unseren Schutz, sie braucht unsere Abwesenheit.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              Morpheus
              wrote on last edited by
              #248

              @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
              0
              • B Offline
                B Offline
                Beowolf
                wrote on last edited by
                #249

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

                Die Natur braucht nicht unseren Schutz, sie braucht unsere Abwesenheit.

                1 Reply Last reply
                0
                • L Offline
                  L Offline
                  looxer01
                  wrote on last edited by
                  #250

                  @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
                  0
                  • S Offline
                    S Offline
                    schittl
                    wrote on last edited by
                    #251

                    @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

                    HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                    SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                    1 Reply Last reply
                    0
                    • L Offline
                      L Offline
                      looxer01
                      wrote on last edited by
                      #252

                      @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
                      0
                      • B Offline
                        B Offline
                        Beowolf
                        wrote on last edited by
                        #253

                        Ist geschehen. :oops:

                        Die Natur braucht nicht unseren Schutz, sie braucht unsere Abwesenheit.

                        1 Reply Last reply
                        0
                        • S Offline
                          S Offline
                          schittl
                          wrote on last edited by
                          #254

                          @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

                          HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                          SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            schittl
                            wrote on last edited by
                            #255

                            @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

                            HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                            SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              schittl
                              wrote on last edited by
                              #256

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

                              HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                              SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                              1 Reply Last reply
                              0
                              • L Offline
                                L Offline
                                looxer01
                                wrote on last edited by
                                #257

                                @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
                                0
                                • S Offline
                                  S Offline
                                  schittl
                                  wrote on last edited by
                                  #258

                                  @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

                                  HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                                  SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                                  1 Reply Last reply
                                  0
                                  • L Offline
                                    L Offline
                                    looxer01
                                    wrote on last edited by
                                    #259

                                    @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
                                    0
                                    • L Offline
                                      L Offline
                                      looxer01
                                      wrote on last edited by
                                      #260

                                      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
                                      0
                                      • S Offline
                                        S Offline
                                        schittl
                                        wrote on last edited by
                                        #261

                                        @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

                                        HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                                        SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          schittl
                                          wrote on last edited by
                                          #262

                                          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

                                          HW: Lenovo M920q (Proxmox, ioBroker, RaspMatic & Z2M), QNAP (Docker, Influx), Arduino Mega 2560 R3 (I2C DS18B20 + LED)

                                          SW: CT IoBroker, VM RaspMatic(v3.79.6.20241122)

                                          1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          Support us

                                          ioBroker
                                          Community Adapters
                                          Donate

                                          248

                                          Online

                                          32.7k

                                          Users

                                          82.5k

                                          Topics

                                          1.3m

                                          Posts
                                          Community
                                          Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen | Einwilligungseinstellungen
                                          ioBroker Community 2014-2025
                                          logo
                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Home
                                          • Recent
                                          • Tags
                                          • Unread 0
                                          • Categories
                                          • Unreplied
                                          • Popular
                                          • GitHub
                                          • Docu
                                          • Hilfe