Ankündigung

Einklappen

(KI-) Softwarelösungen

Um die Flut an (primär KI-erzeugter) Software zu kanalisieren, sind solche Lösungen ab sofort im Unterforum "Codeschnipsel" einzustellen. Bereits gepostete Themen werden sukzessive dorthin verschoben.
Mehr anzeigen
Weniger anzeigen

Node Red und MDT LED Controller mit RGBW

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

    #16
    Habe jetzt noch einmal etwas gebastelt und einen neuen Weg probiert.
    Ich habe jetzt vom Colour-Picker folgenden Output: { h: 76, s: 71, v: 2}.
    Dann habe ich die 3 Werte einzeln herausgezogen, mit dem Range-Node umgerechnet und den Payload wieder mit einem Feldnamen versehen.
    Habe dann 3 einzelne Werte für h, s, und v, die wie folgt aussehen { h: 76 }.
    Diese will ich nun wieder zusammenfügen zu einem Objekt mit 3 Werten, wie es ursprünglich aussah.
    Aber mit der Join-Node klappt das irgendwie nicht.
    Habt ihr dazu eine Idee???

    HSV-Steuerung.jpg

    Code:
    [
        {
            "id": "14103c3f3cab2219",
            "type": "ui_iro-color-picker",
            "z": "c859ff3c2282573a",
            "group": "687615dcb85ab09b",
            "order": 1,
            "width": "3",
            "height": "3",
            "name": "",
            "label": "WoZi",
            "placement": "left",
            "hAlign": "flex-start",
            "vAlign": "flex-start",
            "stateField": "payload",
            "enableField": "enable",
            "layoutDirection": "vertical",
            "widgetIndent": "0",
            "buttonWidth": "2",
            "pickerType": "popupCW",
            "popupWidth": "4",
            "popupHeight": 0,
            "pickerSize": "100",
            "backgroundDim": "50",
            "backgroundColor": "#000000",
            "backgroundVariable": false,
            "components": [
                {
                    "options": {
                        "borderColor": "#000000",
                        "borderWidth": 0,
                        "wheelLightness": false,
                        "wheelAngle": 0,
                        "wheelDirection": "anticlockwise"
                    },
                    "componentId": "picker"
                },
                {
                    "options": {
                        "borderColor": "#000000",
                        "borderWidth": 0,
                        "sliderType": "saturation"
                    },
                    "componentId": "slider"
                },
                {
                    "options": {
                        "borderColor": "#000000",
                        "borderWidth": 0,
                        "sliderType": "value"
                    },
                    "componentId": "slider"
                }
            ],
            "format": "hex",
            "outFormat": "hsv",
            "dynOutput": "input:move",
            "outputConfirmed": false,
            "outputLimit": "10",
            "passthru": false,
            "topic": "topic",
            "topicType": "msg",
            "iroColorValue": "#1e00ff",
            "x": 650,
            "y": 1260,
            "wires": [
                [
                    "2195327611e53754",
                    "c23cbe2533469e39",
                    "b5d4e9bd55e960ac"
                ]
            ]
        },
        {
            "id": "2195327611e53754",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "H herausfiltern",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.h",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 840,
            "y": 1220,
            "wires": [
                [
                    "fe5f931b81d84af5"
                ]
            ]
        },
        {
            "id": "14595577f859326d",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "Rename",
            "rules": [
                {
                    "t": "move",
                    "p": "payload.h",
                    "pt": "msg",
                    "to": "payload.red",
                    "tot": "msg"
                },
                {
                    "t": "move",
                    "p": "payload.s",
                    "pt": "msg",
                    "to": "payload.green",
                    "tot": "msg"
                },
                {
                    "t": "move",
                    "p": "payload.v",
                    "pt": "msg",
                    "to": "payload.blue",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1500,
            "y": 1260,
            "wires": [
                [
                    "a04785f6f85bac3f"
                ]
            ]
        },
        {
            "id": "fe5f931b81d84af5",
            "type": "range",
            "z": "c859ff3c2282573a",
            "minin": "0",
            "maxin": "360",
            "minout": "0",
            "maxout": "255",
            "action": "scale",
            "round": true,
            "property": "payload",
            "name": "",
            "x": 1020,
            "y": 1220,
            "wires": [
                [
                    "95505441d5fc85e9"
                ]
            ]
        },
        {
            "id": "95505441d5fc85e9",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "H setzen",
            "rules": [
                {
                    "t": "move",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.h",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1180,
            "y": 1220,
            "wires": [
                [
                    "c765c2b527f23d9a"
                ]
            ]
        },
        {
            "id": "c23cbe2533469e39",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "S herausfiltern",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.s",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 840,
            "y": 1260,
            "wires": [
                [
                    "e9a2bd998703eef2"
                ]
            ]
        },
        {
            "id": "e9a2bd998703eef2",
            "type": "range",
            "z": "c859ff3c2282573a",
            "minin": "0",
            "maxin": "100",
            "minout": "0",
            "maxout": "255",
            "action": "scale",
            "round": true,
            "property": "payload",
            "name": "",
            "x": 1020,
            "y": 1260,
            "wires": [
                [
                    "e3e52d2ea7f07f5f"
                ]
            ]
        },
        {
            "id": "e3e52d2ea7f07f5f",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "S setzen",
            "rules": [
                {
                    "t": "move",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.s",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1180,
            "y": 1260,
            "wires": [
                [
                    "c765c2b527f23d9a"
                ]
            ]
        },
        {
            "id": "b5d4e9bd55e960ac",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "V herausfiltern",
            "rules": [
                {
                    "t": "set",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.v",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 840,
            "y": 1300,
            "wires": [
                [
                    "a37da11eb1707738"
                ]
            ]
        },
        {
            "id": "a37da11eb1707738",
            "type": "range",
            "z": "c859ff3c2282573a",
            "minin": "0",
            "maxin": "100",
            "minout": "0",
            "maxout": "255",
            "action": "scale",
            "round": true,
            "property": "payload",
            "name": "",
            "x": 1020,
            "y": 1300,
            "wires": [
                [
                    "32b1443d0df6ac34"
                ]
            ]
        },
        {
            "id": "32b1443d0df6ac34",
            "type": "change",
            "z": "c859ff3c2282573a",
            "name": "V setzen",
            "rules": [
                {
                    "t": "move",
                    "p": "payload",
                    "pt": "msg",
                    "to": "payload.v",
                    "tot": "msg"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 1180,
            "y": 1300,
            "wires": [
                [
                    "c765c2b527f23d9a"
                ]
            ]
        },
        {
            "id": "c765c2b527f23d9a",
            "type": "join",
            "z": "c859ff3c2282573a",
            "name": "",
            "mode": "custom",
            "build": "object",
            "property": "payload",
            "propertyType": "msg",
            "key": "topic",
            "joiner": "\\n",
            "joinerType": "str",
            "accumulate": true,
            "timeout": "",
            "count": "3",
            "reduceRight": false,
            "reduceExp": "",
            "reduceInit": "",
            "reduceInitType": "num",
            "reduceFixup": "",
            "x": 1350,
            "y": 1260,
            "wires": [
                [
                    "14595577f859326d"
                ]
            ]
        },
        {
            "id": "687615dcb85ab09b",
            "type": "ui_group",
            "name": "ColorPicker",
            "tab": "8c42034931d493e6",
            "order": 4,
            "disp": true,
            "width": "6",
            "collapse": false,
            "className": ""
        },
        {
            "id": "8c42034931d493e6",
            "type": "ui_tab",
            "name": "Test",
            "icon": "dashboard",
            "order": 4,
            "disabled": false,
            "hidden": false
        }
    ]

    Kommentar


      #17
      Sodale ich löse mal auf.
      Ich habe auch danach gesucht und wurde hier leider nicht fündig.
      Aber es hat mir geholfen die Lösung schneller zu erarbeiten
      Daher für die Nachwelt meine Lösung:

      Ich habe erstmal die Anleitung von MDT befolgt wie man die RGBW-Steuerung auf den Glastaster bringt.

      Dann habe ich neue Gruppenadressen für die Absolutwerte angelegt.
      Die Anleitung für den Glastaster wird mit dem relativ Dimmen verbunden.
      Aber Node-Red übeträgt Absolut Werte, daher benötigt Ihr zusätzliche Gruppenadressen.

      Anschließend sieht mein Flow wie folgt aus:

      RGBW-Flow.png

      Ja ich lese nicht den Status der RGBW Farbe um den Wert im Node-Red nachzuziehen.
      Im Moment brauche ich das nicht.



      PHP-Code:
      [
          {
              "id": "f3a3f5c4941d1b74",
              "type": "tab",
              "label": "Flow 1",
              "disabled": false,
              "info": "",
              "env": []
          },
          {
              "id": "50dfc1b18aecad11",
              "type": "group",
              "z": "f3a3f5c4941d1b74",
              "name": "Küche MItte Decke",
              "style": {
                  "fill": "#ffffbf",
                  "label": true
              },
              "nodes": [
                  "edf64518ea22a3a3",
                  "03b413852b3a497c",
                  "9cc12f33c80c76e2",
                  "8acf04264cf66e70",
                  "deb7c9fa4c9e7f96",
                  "4487310dfe8d80f4",
                  "0e911b8f825da2dd",
                  "aac7bdb5d0b131ca",
                  "ea406e9e5c6edb20",
                  "9f314d2073d3a68d",
                  "50f6d44ff19bb58c",
                  "b5d4da5385841f13",
                  "0ce2507b0a8f905b"
              ],
              "x": 14,
              "y": 99,
              "w": 952,
              "h": 342
          },
          {
              "id": "edf64518ea22a3a3",
              "type": "ui_iro-color-picker",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "group": "8949b892674f509a",
              "order": 4,
              "width": 0,
              "height": 0,
              "name": "",
              "label": "Küche",
              "placement": "left",
              "hAlign": "flex-start",
              "vAlign": "flex-start",
              "stateField": "payload",
              "enableField": "enable",
              "layoutDirection": "vertical",
              "widgetIndent": "3",
              "buttonWidth": "2",
              "pickerType": "popupCW",
              "popupWidth": 0,
              "popupHeight": 0,
              "pickerSize": "100",
              "backgroundDim": "50",
              "backgroundColor": "#000000",
              "backgroundVariable": false,
              "components": [
                  {
                      "options": {
                          "borderColor": "#000000",
                          "borderWidth": 4,
                          "wheelLightness": true,
                          "wheelAngle": 0,
                          "wheelDirection": "anticlockwise"
                      },
                      "componentId": "picker"
                  },
                  {
                      "options": {
                          "borderColor": "#000000",
                          "borderWidth": 0,
                          "sliderType": "value"
                      },
                      "componentId": "slider"
                  }
              ],
              "format": "hex",
              "outFormat": "hsv",
              "dynOutput": "input:end",
              "outputConfirmed": false,
              "outputLimit": "10",
              "passthru": false,
              "topic": "topic",
              "topicType": "msg",
              "iroColorValue": "#ff0000",
              "x": 230,
              "y": 200,
              "wires": [
                  [
                      "9cc12f33c80c76e2",
                      "8acf04264cf66e70",
                      "deb7c9fa4c9e7f96"
                  ]
              ]
          },
          {
              "id": "03b413852b3a497c",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/0/6",
              "outputtopic": "",
              "dpt": "5.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Helligkeit",
              "outputtype": "write",
              "outputRBE": true,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 780,
              "y": 260,
              "wires": [
                  []
              ]
          },
          {
              "id": "9cc12f33c80c76e2",
              "type": "change",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "name": "H herausfiltern",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "payload.h",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 440,
              "y": 140,
              "wires": [
                  [
                      "0e911b8f825da2dd"
                  ]
              ]
          },
          {
              "id": "8acf04264cf66e70",
              "type": "change",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "name": "S herausfiltern",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "payload.s",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 440,
              "y": 200,
              "wires": [
                  [
                      "4487310dfe8d80f4"
                  ]
              ]
          },
          {
              "id": "deb7c9fa4c9e7f96",
              "type": "change",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "name": "V herausfiltern",
              "rules": [
                  {
                      "t": "set",
                      "p": "payload",
                      "pt": "msg",
                      "to": "payload.v",
                      "tot": "msg"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 440,
              "y": 260,
              "wires": [
                  [
                      "03b413852b3a497c"
                  ]
              ]
          },
          {
              "id": "4487310dfe8d80f4",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/0/5",
              "outputtopic": "",
              "dpt": "5.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Sättigung",
              "outputtype": "write",
              "outputRBE": true,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 780,
              "y": 200,
              "wires": [
                  []
              ]
          },
          {
              "id": "0e911b8f825da2dd",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/0/3",
              "outputtopic": "",
              "dpt": "5.003",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Farbton",
              "outputtype": "write",
              "outputRBE": true,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 770,
              "y": 140,
              "wires": [
                  []
              ]
          },
          {
              "id": "aac7bdb5d0b131ca",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/1/2",
              "outputtopic": "",
              "dpt": "5.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Status Weiß",
              "outputtype": "read",
              "outputRBE": false,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 160,
              "y": 340,
              "wires": [
                  [
                      "ea406e9e5c6edb20"
                  ]
              ]
          },
          {
              "id": "ea406e9e5c6edb20",
              "type": "ui_slider",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "name": "",
              "label": "Küche Mitte Weiß",
              "tooltip": "",
              "group": "8949b892674f509a",
              "order": 1,
              "width": 0,
              "height": 0,
              "passthru": false,
              "outs": "all",
              "topic": "topic",
              "topicType": "msg",
              "min": 0,
              "max": "100",
              "step": 1,
              "className": "",
              "x": 470,
              "y": 340,
              "wires": [
                  [
                      "9f314d2073d3a68d"
                  ]
              ]
          },
          {
              "id": "9f314d2073d3a68d",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/0/7",
              "outputtopic": "",
              "dpt": "5.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Weiß Absolut",
              "outputtype": "write",
              "outputRBE": true,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 790,
              "y": 340,
              "wires": [
                  []
              ]
          },
          {
              "id": "50f6d44ff19bb58c",
              "type": "ui_switch",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "name": "",
              "label": "Küche Mitte",
              "tooltip": "",
              "group": "8949b892674f509a",
              "order": 6,
              "width": 0,
              "height": 0,
              "passthru": true,
              "decouple": "false",
              "topic": "topic",
              "topicType": "msg",
              "style": "",
              "onvalue": "true",
              "onvalueType": "bool",
              "onicon": "",
              "oncolor": "",
              "offvalue": "false",
              "offvalueType": "bool",
              "officon": "",
              "offcolor": "",
              "animate": false,
              "className": "",
              "x": 470,
              "y": 400,
              "wires": [
                  [
                      "0ce2507b0a8f905b"
                  ]
              ]
          },
          {
              "id": "b5d4da5385841f13",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/1/2",
              "outputtopic": "",
              "dpt": "1.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte Status Ein/Aus",
              "outputtype": "read",
              "outputRBE": false,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 160,
              "y": 400,
              "wires": [
                  [
                      "50f6d44ff19bb58c"
                  ]
              ]
          },
          {
              "id": "0ce2507b0a8f905b",
              "type": "knxUltimate",
              "z": "f3a3f5c4941d1b74",
              "g": "50dfc1b18aecad11",
              "server": "10a4ac3f62972ac0",
              "topic": "2/0/1",
              "outputtopic": "",
              "dpt": "1.001",
              "initialread": 0,
              "notifyreadrequest": false,
              "notifyresponse": false,
              "notifywrite": true,
              "notifyreadrequestalsorespondtobus": false,
              "notifyreadrequestalsorespondtobusdefaultvalueifnotinitialized": "0",
              "listenallga": false,
              "name": "Küche Mitte EinAus Steuerung",
              "outputtype": "write",
              "outputRBE": true,
              "inputRBE": false,
              "formatmultiplyvalue": 1,
              "formatnegativevalue": "leave",
              "formatdecimalsvalue": 999,
              "passthrough": "no",
              "x": 800,
              "y": 400,
              "wires": [
                  []
              ]
          },
          {
              "id": "8949b892674f509a",
              "type": "ui_group",
              "name": "Lichter",
              "tab": "728af2c5b2390c52",
              "order": 1,
              "disp": true,
              "width": "6",
              "collapse": false,
              "className": ""
          },
          {
              "id": "10a4ac3f62972ac0",
              "type": "knxUltimate-config",
              "host": "192.168.178.28",
              "port": "3671",
              "physAddr": "1.1.253",
              "hostProtocol": "TunnelUDP",
              "suppressACKRequest": false,
              "csv": "",
              "KNXEthInterface": "Auto",
              "KNXEthInterfaceManuallyInput": "",
              "stopETSImportIfNoDatapoint": "stop",
              "loglevel": "error",
              "name": "KNX Interface",
              "localEchoInTunneling": true,
              "delaybetweentelegrams": "50",
              "delaybetweentelegramsfurtherdelayREAD": "1",
              "ignoreTelegramsWithRepeatedFlag": false,
              "autoReconnect": "yes"
          },
          {
              "id": "728af2c5b2390c52",
              "type": "ui_tab",
              "name": "Home",
              "icon": "dashboard",
              "order": 1,
              "disabled": false,
              "hidden": false
          }
      ]​ 
      

      Kommentar

      Lädt...
      X