Skip to content
  • 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
Logo
  1. ioBroker Community Home
  2. Deutsch
  3. Skripten / Logik
  4. Node-Red
  5. Node Red: Zeit Badfenster offen

NEWS

  • UPDATE 31.10.: Amazon Alexa - ioBroker Skill läuft aus ?
    apollon77A
    apollon77
    48
    3
    8.0k

  • Monatsrückblick – September 2025
    BluefoxB
    Bluefox
    13
    1
    1.7k

  • Neues Video "KI im Smart Home" - ioBroker plus n8n
    BluefoxB
    Bluefox
    15
    1
    2.0k

Node Red: Zeit Badfenster offen

Node Red: Zeit Badfenster offen

Scheduled Pinned Locked Moved Node-Red
20 Posts 3 Posters 4.9k Views 4 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.
  • R Offline
    R Offline
    rewenode
    wrote on last edited by
    #7

    Was genau ist das, was du da kopiert hast?
    Das komplette msg-Object? Oder das Payload Objekt?
    Und warum sind das 2 verschiedene Objekte?
    Mach mal im Zweifel einen Screenshot von der debug-Ausgabe.

    Homer.J.H 1 Reply Last reply
    0
    • R rewenode

      Was genau ist das, was du da kopiert hast?
      Das komplette msg-Object? Oder das Payload Objekt?
      Und warum sind das 2 verschiedene Objekte?
      Mach mal im Zweifel einen Screenshot von der debug-Ausgabe.

      Homer.J.H Offline
      Homer.J.H Offline
      Homer.J.
      wrote on last edited by Homer.J.
      #8

      @rewenode das eine steht unter Values und das andere unter parameters.
      Screenshot_2019-11-27 Node-RED 192 168 178 33.png

      1 Reply Last reply
      0
      • R Offline
        R Offline
        rewenode
        wrote on last edited by rewenode
        #9

        Ist eine etwas verkorkste Object structure.
        Du kannst aber einfach change-nodes nehmen und das ganze mit einem kleinen JSONata Ausdruck machen.

        2019-11-27_20-52-08.png

        hier der Flow:

        [
            {
                "id": "d62d0d87.9561f8",
                "type": "inject",
                "z": "ce726243.5a5778",
                "name": "",
                "topic": "",
                "payload": "{\"values\":{\"heating_temperature\":0,\"warmwater_temperature\":51,\"heating_operation_mode\":0,\"warmwater_operation_mode\":0,\"heating_operation_mode_string\":\"Automatik\",\"warmwater_operation_mode_string\":\"Automatik\",\"heating_curve_end_point\":46,\"heating_curve_parallel_offset\":20,\"deltaHeatingReduction\":0,\"heatSourcedefrostAirThreshold\":7,\"hotWaterTemperatureHysteresis\":3,\"returnTemperatureHysteresis\":2,\"heatSourcedefrostAirEnd\":6,\"temperature_hot_water_target\":52,\"cooling_operation_mode\":0,\"cooling_release_temperature\":20,\"thresholdTemperatureSetBack\":-20,\"cooling_inlet_temp\":20,\"hotWaterCircPumpDeaerate\":\"off\",\"heatingLimit\":1,\"thresholdHeatingLimit\":14,\"cooling_start_after_hours\":120,\"cooling_stop_after_hours\":120,\"typeSerial\":\"2509/22-83\",\"returnTemperatureTargetMin\":15}}",
                "payloadType": "json",
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "x": 160,
                "y": 100,
                "wires": [
                    [
                        "94a117c0.f92528",
                        "5ae32f5d.bd16d8"
                    ]
                ]
            },
            {
                "id": "918f1b7f.3aa788",
                "type": "debug",
                "z": "ce726243.5a5778",
                "name": "",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "payload",
                "targetType": "msg",
                "x": 790,
                "y": 100,
                "wires": []
            },
            {
                "id": "94a117c0.f92528",
                "type": "change",
                "z": "ce726243.5a5778",
                "name": "heating_temperature",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "{\t   \"heating_temperature\": payload.values.heating_temperature\t}",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 440,
                "y": 100,
                "wires": [
                    [
                        "918f1b7f.3aa788"
                    ]
                ]
            },
            {
                "id": "eb70ea5a.6e6738",
                "type": "comment",
                "z": "ce726243.5a5778",
                "name": "und so weiter",
                "info": "",
                "x": 410,
                "y": 180,
                "wires": []
            },
            {
                "id": "5ae32f5d.bd16d8",
                "type": "change",
                "z": "ce726243.5a5778",
                "name": "warmwater_temperature",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "{\t   \"warmwater_temperature\": payload.values.warmwater_temperature\t}",
                        "tot": "jsonata"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 450,
                "y": 140,
                "wires": [
                    [
                        "d8070b65.88a4b"
                    ]
                ]
            },
            {
                "id": "d8070b65.88a4b",
                "type": "debug",
                "z": "ce726243.5a5778",
                "name": "",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "false",
                "x": 790,
                "y": 140,
                "wires": []
            },
            {
                "id": "124c73d6.4623ac",
                "type": "comment",
                "z": "ce726243.5a5778",
                "name": "payload.values - object",
                "info": "",
                "x": 160,
                "y": 60,
                "wires": []
            }
        ]
        

        Ersetze dann einfach deine function-nodes durch die change-nodes.

        Homer.J.H 1 Reply Last reply
        0
        • R rewenode

          Ist eine etwas verkorkste Object structure.
          Du kannst aber einfach change-nodes nehmen und das ganze mit einem kleinen JSONata Ausdruck machen.

          2019-11-27_20-52-08.png

          hier der Flow:

          [
              {
                  "id": "d62d0d87.9561f8",
                  "type": "inject",
                  "z": "ce726243.5a5778",
                  "name": "",
                  "topic": "",
                  "payload": "{\"values\":{\"heating_temperature\":0,\"warmwater_temperature\":51,\"heating_operation_mode\":0,\"warmwater_operation_mode\":0,\"heating_operation_mode_string\":\"Automatik\",\"warmwater_operation_mode_string\":\"Automatik\",\"heating_curve_end_point\":46,\"heating_curve_parallel_offset\":20,\"deltaHeatingReduction\":0,\"heatSourcedefrostAirThreshold\":7,\"hotWaterTemperatureHysteresis\":3,\"returnTemperatureHysteresis\":2,\"heatSourcedefrostAirEnd\":6,\"temperature_hot_water_target\":52,\"cooling_operation_mode\":0,\"cooling_release_temperature\":20,\"thresholdTemperatureSetBack\":-20,\"cooling_inlet_temp\":20,\"hotWaterCircPumpDeaerate\":\"off\",\"heatingLimit\":1,\"thresholdHeatingLimit\":14,\"cooling_start_after_hours\":120,\"cooling_stop_after_hours\":120,\"typeSerial\":\"2509/22-83\",\"returnTemperatureTargetMin\":15}}",
                  "payloadType": "json",
                  "repeat": "",
                  "crontab": "",
                  "once": false,
                  "onceDelay": 0.1,
                  "x": 160,
                  "y": 100,
                  "wires": [
                      [
                          "94a117c0.f92528",
                          "5ae32f5d.bd16d8"
                      ]
                  ]
              },
              {
                  "id": "918f1b7f.3aa788",
                  "type": "debug",
                  "z": "ce726243.5a5778",
                  "name": "",
                  "active": true,
                  "tosidebar": true,
                  "console": false,
                  "tostatus": false,
                  "complete": "payload",
                  "targetType": "msg",
                  "x": 790,
                  "y": 100,
                  "wires": []
              },
              {
                  "id": "94a117c0.f92528",
                  "type": "change",
                  "z": "ce726243.5a5778",
                  "name": "heating_temperature",
                  "rules": [
                      {
                          "t": "set",
                          "p": "payload",
                          "pt": "msg",
                          "to": "{\t   \"heating_temperature\": payload.values.heating_temperature\t}",
                          "tot": "jsonata"
                      }
                  ],
                  "action": "",
                  "property": "",
                  "from": "",
                  "to": "",
                  "reg": false,
                  "x": 440,
                  "y": 100,
                  "wires": [
                      [
                          "918f1b7f.3aa788"
                      ]
                  ]
              },
              {
                  "id": "eb70ea5a.6e6738",
                  "type": "comment",
                  "z": "ce726243.5a5778",
                  "name": "und so weiter",
                  "info": "",
                  "x": 410,
                  "y": 180,
                  "wires": []
              },
              {
                  "id": "5ae32f5d.bd16d8",
                  "type": "change",
                  "z": "ce726243.5a5778",
                  "name": "warmwater_temperature",
                  "rules": [
                      {
                          "t": "set",
                          "p": "payload",
                          "pt": "msg",
                          "to": "{\t   \"warmwater_temperature\": payload.values.warmwater_temperature\t}",
                          "tot": "jsonata"
                      }
                  ],
                  "action": "",
                  "property": "",
                  "from": "",
                  "to": "",
                  "reg": false,
                  "x": 450,
                  "y": 140,
                  "wires": [
                      [
                          "d8070b65.88a4b"
                      ]
                  ]
              },
              {
                  "id": "d8070b65.88a4b",
                  "type": "debug",
                  "z": "ce726243.5a5778",
                  "name": "",
                  "active": true,
                  "tosidebar": true,
                  "console": false,
                  "tostatus": false,
                  "complete": "false",
                  "x": 790,
                  "y": 140,
                  "wires": []
              },
              {
                  "id": "124c73d6.4623ac",
                  "type": "comment",
                  "z": "ce726243.5a5778",
                  "name": "payload.values - object",
                  "info": "",
                  "x": 160,
                  "y": 60,
                  "wires": []
              }
          ]
          

          Ersetze dann einfach deine function-nodes durch die change-nodes.

          Homer.J.H Offline
          Homer.J.H Offline
          Homer.J.
          wrote on last edited by
          #10

          @rewenode Lässt sich leider nicht importieren.

          R 1 Reply Last reply
          0
          • Homer.J.H Homer.J.

            @rewenode Lässt sich leider nicht importieren.

            R Offline
            R Offline
            rewenode
            wrote on last edited by
            #11

            @Homer-J Sollte jetzt gehen. Der Export muss wohl in Code-Tags stehen.

            Homer.J.H 1 Reply Last reply
            0
            • R rewenode

              @Homer-J Sollte jetzt gehen. Der Export muss wohl in Code-Tags stehen.

              Homer.J.H Offline
              Homer.J.H Offline
              Homer.J.
              wrote on last edited by
              #12

              @rewenode Steht jetzt das im Debug.Screenshot_2019-11-27 Node-RED 192 168 178 33.png

              R 1 Reply Last reply
              0
              • Homer.J.H Homer.J.

                @rewenode Steht jetzt das im Debug.Screenshot_2019-11-27 Node-RED 192 168 178 33.png

                R Offline
                R Offline
                rewenode
                wrote on last edited by
                #13

                Wie genau hast du den change-node konfiguriert?

                Homer.J.H 1 Reply Last reply
                0
                • R rewenode

                  Wie genau hast du den change-node konfiguriert?

                  Homer.J.H Offline
                  Homer.J.H Offline
                  Homer.J.
                  wrote on last edited by Homer.J.
                  #14

                  @rewenode im Debug wir der Wert jetzt eingetragen aber nicht in die variable die ich im Java angelegt habe
                  als was müssen diese angelegt sein als String. ?Screenshot_2019-11-27 Node-RED 192 168 178 33.png

                  R 1 Reply Last reply
                  0
                  • Homer.J.H Homer.J.

                    @rewenode im Debug wir der Wert jetzt eingetragen aber nicht in die variable die ich im Java angelegt habe
                    als was müssen diese angelegt sein als String. ?Screenshot_2019-11-27 Node-RED 192 168 178 33.png

                    R Offline
                    R Offline
                    rewenode
                    wrote on last edited by
                    #15

                    @Homer-J Dazu kann ich nichts sagen. Dazu müsste ich wissen, wie genau dein nachfolgender ioBroker-In node die Daten haben will. Name/Path/Type

                    Homer.J.H 1 Reply Last reply
                    0
                    • R rewenode

                      @Homer-J Dazu kann ich nichts sagen. Dazu müsste ich wissen, wie genau dein nachfolgender ioBroker-In node die Daten haben will. Name/Path/Type

                      Homer.J.H Offline
                      Homer.J.H Offline
                      Homer.J.
                      wrote on last edited by
                      #16

                      @rewenode hab mal einen anderen Knoten vom iobroker genommen jetzt geht es danke dir.

                      R 2 Replies Last reply
                      0
                      • Homer.J.H Homer.J.

                        @rewenode hab mal einen anderen Knoten vom iobroker genommen jetzt geht es danke dir.

                        R Offline
                        R Offline
                        rewenode
                        wrote on last edited by
                        #17

                        @Homer-J Alles klar 👍
                        Feierabend 😉

                        1 Reply Last reply
                        0
                        • Homer.J.H Homer.J.

                          @rewenode hab mal einen anderen Knoten vom iobroker genommen jetzt geht es danke dir.

                          R Offline
                          R Offline
                          rewenode
                          wrote on last edited by
                          #18

                          @Homer-J Der Vollständigkeit halber. So gehts auch mit deinen function-nodes:

                          return {"payload": {"heating_temperature": msg.payload.values.heating_temperature}};
                          
                          1 Reply Last reply
                          0
                          • H Offline
                            H Offline
                            HomeSweetHome
                            wrote on last edited by HomeSweetHome
                            #19

                            Hallo,

                            danke für die Antwort. Zurück nochmal zum Badfenster.

                            Wo bekomme ich die Zeit her, bzw. die steckt doch nicht in msg.payload.lc oder?

                            Habe ich noch nicht ganz verstanden.

                            Beim Schließen wird die Funktion immer hier beendet "if (typeof flow.get("FensterAufStart") === "undefined") return false;" und Debug Node noch dahinter wird nicht "stimuliert"

                            Wo ist mein Denkfehler?

                            Gruß HomeSweetHome

                            R 1 Reply Last reply
                            0
                            • H HomeSweetHome

                              Hallo,

                              danke für die Antwort. Zurück nochmal zum Badfenster.

                              Wo bekomme ich die Zeit her, bzw. die steckt doch nicht in msg.payload.lc oder?

                              Habe ich noch nicht ganz verstanden.

                              Beim Schließen wird die Funktion immer hier beendet "if (typeof flow.get("FensterAufStart") === "undefined") return false;" und Debug Node noch dahinter wird nicht "stimuliert"

                              Wo ist mein Denkfehler?

                              Gruß HomeSweetHome

                              R Offline
                              R Offline
                              rewenode
                              wrote on last edited by rewenode
                              #20

                              @HomeSweetHome sagte in Node Red: Zeit Badfenster offen:

                              Wo bekomme ich die Zeit her, bzw. die steckt doch nicht in msg.payload.lc oder?

                              genau. Ist die Unix-Zeit. Die Umrechnung in Sekunden geschieht dann hier:

                              // (gespeicherte UNIX Zeit in ms - aktuelle Zeit in ms) / 1000 = Differenz in Sekunden
                              ... Math.floor((msg.payload.lc - flow.get("FensterAufStart"))/1000)
                              

                              Beim Schließen wird die Funktion immer hier beendet "if (typeof flow.get("FensterAufStart") === "undefined") return false;" und Debug Node noch dahinter wird nicht "stimuliert"

                              Dass passiert, wenn die Flow-Variable "FensterAufStart" noch nicht angelegt ist, was wiederum dann der Fall ist, wenn beim ersten feuern des ioBroker-in-nodes das Fender schließt. Weil die Variable ja beim Öffnen angelegt wird.
                              Kann es sein, dass dein ioBroker-In-Node nicht auf Object steht?2019-12-01_16-43-22.png

                              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

                              224

                              Online

                              32.4k

                              Users

                              81.3k

                              Topics

                              1.3m

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

                              • Don't have an account? Register

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