Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Skripten / Logik
    4. Node-Red
    5. KNX Dimmen über Homekit mit Node Red

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    KNX Dimmen über Homekit mit Node Red

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

      Moin!

      Ich möchte gerne meine KNX Installation durch die Steuerung mit Apple Homekit erweitern und habe erste Versuche mit NodeRed gestartet. Licht an/aus funktioniert schon bestens. Leider komme ich beim dimmen nicht weiter.. ich bin am verzweifeln. Im Einsatz ist node-red-contrib-homekit-bridged und node-red-contrib-knx-ultimate

      Kann mir jemand helfen bzw. sagen was ich falsch mache?
      Gibt es vllt. hier im Forum Beispiele für sowas?

      Danke und Gruß!

      Hier mein gescheiterter Versuch.

      [
      {
      "id": "e797789f.53e7c8",
      "type": "tab",
      "label": "Flow 3",
      "disabled": false,
      "info": ""
      },
      {
      "id": "26e0bae5.2d75f6",
      "type": "homekit-service",
      "z": "e797789f.53e7c8",
      "isParent": true,
      "bridge": "6182d5a4.3c886c",
      "parentService": "",
      "name": "EG Wohnzimmer Deckenspots",
      "serviceName": "Lightbulb",
      "topic": "",
      "filter": false,
      "manufacturer": "NRCHKB",
      "model": "1.2.0",
      "serialNo": "Default Serial Number",
      "firmwareRev": "1.2.0",
      "hardwareRev": "1.2.0",
      "softwareRev": "1.2.0",
      "cameraConfigVideoProcessor": "ffmpeg",
      "cameraConfigSource": "",
      "cameraConfigStillImageSource": "",
      "cameraConfigMaxStreams": 2,
      "cameraConfigMaxWidth": 1280,
      "cameraConfigMaxHeight": 720,
      "cameraConfigMaxFPS": 10,
      "cameraConfigMaxBitrate": 300,
      "cameraConfigVideoCodec": "libx264",
      "cameraConfigAudioCodec": "libfdk_aac",
      "cameraConfigAudio": false,
      "cameraConfigPacketSize": 1316,
      "cameraConfigVerticalFlip": false,
      "cameraConfigHorizontalFlip": false,
      "cameraConfigMapVideo": "0:0",
      "cameraConfigMapAudio": "0:1",
      "cameraConfigVideoFilter": "scale=1280:720",
      "cameraConfigAdditionalCommandLine": "-tune zerolatency",
      "cameraConfigDebug": false,
      "cameraConfigSnapshotOutput": "disabled",
      "cameraConfigInterfaceName": "",
      "characteristicProperties": "{\"Brightness\":true}",
      "waitForSetupMsg": false,
      "outputs": 2,
      "x": 650,
      "y": 80,
      "wires": [
      [
      "55e65dd0.f87974"
      ],
      []
      ]
      },
      {
      "id": "48132b36.fbebe4",
      "type": "knxUltimate",
      "z": "e797789f.53e7c8",
      "server": "db15a516.948c58",
      "topic": "1/5/9",
      "outputtopic": "",
      "dpt": "5.001",
      "initialread": false,
      "notifyreadrequest": false,
      "notifyresponse": false,
      "notifywrite": true,
      "notifyreadrequestalsorespondtobus": false,
      "notifyreadrequestalsorespondtobusdefaultvalueifno tinitialized": "0",
      "listenallga": false,
      "name": "Status Wohnzimmer Deckenspots (Dimmen Relativ 0..100%)",
      "outputtype": "write",
      "outputRBE": false,
      "inputRBE": false,
      "formatmultiplyvalue": 1,
      "formatnegativevalue": "leave",
      "formatdecimalsvalue": 999,
      "passthrough": "no",
      "x": 260,
      "y": 80,
      "wires": [
      [
      "26e0bae5.2d75f6"
      ]
      ]
      },
      {
      "id": "55e65dd0.f87974",
      "type": "function",
      "z": "e797789f.53e7c8",
      "name": "Überprüfe ob ON oder Dimmen",
      "func": "// Überprüfe ob ON oder Dimmen\nif (msg.payload.On!==undefined) {\n if (Boolean(msg.payload.On)===true) {\n return [{payload:true},null];\n }\n else if (Boolean(msg.payload.On)===false)\n {\n return [{payload:false},null];\n }\n}else if (msg.payload.Brightness!==undefined)\n{\n return [null,{payload:msg.payload.Brightness}]; \n}\n",
      "outputs": 2,
      "noerr": 0,
      "initialize": "",
      "finalize": "",
      "x": 950,
      "y": 80,
      "wires": [
      [
      "785c4fc4.72225"
      ],
      [
      "cc4f61a3.a7e3f"
      ]
      ],
      "outputLabels": [
      "Switch",
      "Brightness"
      ]
      },
      {
      "id": "cc4f61a3.a7e3f",
      "type": "knxUltimate",
      "z": "e797789f.53e7c8",
      "server": "db15a516.948c58",
      "topic": "1/2/9",
      "outputtopic": "",
      "dpt": "3.007",
      "initialread": false,
      "notifyreadrequest": false,
      "notifyresponse": false,
      "notifywrite": true,
      "notifyreadrequestalsorespondtobus": false,
      "notifyreadrequestalsorespondtobusdefaultvalueifno tinitialized": "0",
      "listenallga": false,
      "name": "Wohnzimmer Deckenspots (Dimmen Relativ 0..100%)",
      "outputtype": "write",
      "outputRBE": false,
      "inputRBE": false,
      "formatmultiplyvalue": 1,
      "formatnegativevalue": "leave",
      "formatdecimalsvalue": 999,
      "passthrough": "no",
      "x": 1320,
      "y": 120,
      "wires": [
      []
      ]
      },
      {
      "id": "785c4fc4.72225",
      "type": "knxUltimate",
      "z": "e797789f.53e7c8",
      "server": "db15a516.948c58",
      "topic": "1/1/4",
      "outputtopic": "",
      "dpt": "1.001",
      "initialread": false,
      "notifyreadrequest": false,
      "notifyresponse": false,
      "notifywrite": true,
      "notifyreadrequestalsorespondtobus": false,
      "notifyreadrequestalsorespondtobusdefaultvalueifno tinitialized": "0",
      "listenallga": false,
      "name": "EG Wohnzimmer Deckenspots AN/AUS",
      "outputtype": "write",
      "outputRBE": false,
      "inputRBE": false,
      "formatmultiplyvalue": 1,
      "formatnegativevalue": "leave",
      "formatdecimalsvalue": 999,
      "passthrough": "no",
      "x": 1280,
      "y": 20,
      "wires": [
      []
      ]
      },
      {
      "id": "6182d5a4.3c886c",
      "type": "homekit-bridge",
      "z": "",
      "bridgeName": "EG Wohnzimmer Deckenspots",
      "pinCode": "111-11-111",
      "port": "",
      "allowInsecureRequest": false,
      "manufacturer": "NRCHKB",
      "model": "1.2.0",
      "serialNo": "Default Serial Number",
      "firmwareRev": "1.2.0",
      "hardwareRev": "1.2.0",
      "softwareRev": "1.2.0",
      "customMdnsConfig": false,
      "mdnsMulticast": true,
      "mdnsInterface": "",
      "mdnsPort": "",
      "mdnsIp": "",
      "mdnsTtl": "",
      "mdnsLoopback": true,
      "mdnsReuseAddr": true,
      "allowMessagePassthrough": true
      },
      {
      "id": "db15a516.948c58",
      "type": "knxUltimate-config",
      "z": "",
      "host": "192.168.178.28",
      "port": "3671",
      "physAddr": "15.15.22",
      "suppressACKRequest": false,
      "csv": "",
      "KNXEthInterface": "Auto",
      "KNXEthInterfaceManuallyInput": "",
      "statusDisplayLastUpdate": true,
      "statusDisplayDeviceNameWhenALL": true,
      "statusDisplayDataPoint": false,
      "stopETSImportIfNoDatapoint": "stop",
      "loglevel": "error",
      "name": "KNX IP Interface Gateway",
      "localEchoInTunneling": true,
      "delaybetweentelegrams": "40",
      "delaybetweentelegramsfurtherdelayREAD": "1"
      }
      ]
      
      mickym 1 Reply Last reply Reply Quote 0
      • mickym
        mickym Most Active @Strobel last edited by mickym

        @Strobel Brightness ist ja der Dimmfaktor und der erwartet einen Zahlenwert zwischen 0 und 100 und nicht "true".

        Das KNX kann ich nicht beurteilen, aber wenn Du mit einer Inject-Node einen Zahlenwert an dem 2. Ausgang in Deine KNX Node schickst, müsstest Du es ja simulieren können.

        Eventuell musst Du auch ein komplettes JSON schicken:

        {
        "On": true,
        "Brightness": 50
        }

        Hab das nicht mehr ganz in Erinnerung - aber ich glaub so war das.

        Hänge mal diese Inject Node vor Deine Homekit Node:

        [
            {
                "id": "254f72d0.378a1e",
                "type": "inject",
                "z": "80abc55e.a68438",
                "name": "Test",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "{\"On\":true,\"Brightness\":50}",
                "payloadType": "json",
                "x": 510,
                "y": 240,
                "wires": [
                    [
                        "825717c0.7f4878"
                    ]
                ]
            }
        ]
        

        Und anstelle der Function Node würde ich den JSON String dann lieber über 2 Change-Nodes aufsplitten - das ist übersichtlicher.

        Damit Du weißt was ich meine - hier ein Beispiel wie Du einen JSON in die 2 gewünschten Parameter aufdröselst.

        [
            {
                "id": "973eab00.325778",
                "type": "change",
                "z": "e797789f.53e7c8",
                "name": "On",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "payload.On",
                        "tot": "msg"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 800,
                "y": 180,
                "wires": [
                    [
                        "9abb962.c7b5068"
                    ]
                ]
            },
            {
                "id": "cf690159.88604",
                "type": "inject",
                "z": "e797789f.53e7c8",
                "name": "Test",
                "props": [
                    {
                        "p": "payload"
                    },
                    {
                        "p": "topic",
                        "vt": "str"
                    }
                ],
                "repeat": "",
                "crontab": "",
                "once": false,
                "onceDelay": 0.1,
                "topic": "",
                "payload": "{\"On\":true,\"Brightness\":50}",
                "payloadType": "json",
                "x": 590,
                "y": 200,
                "wires": [
                    [
                        "973eab00.325778",
                        "dc78d0be.2b9c4"
                    ]
                ]
            },
            {
                "id": "9abb962.c7b5068",
                "type": "debug",
                "z": "e797789f.53e7c8",
                "name": "",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "false",
                "statusVal": "",
                "statusType": "auto",
                "x": 1150,
                "y": 180,
                "wires": []
            },
            {
                "id": "dc78d0be.2b9c4",
                "type": "change",
                "z": "e797789f.53e7c8",
                "name": "Brightness",
                "rules": [
                    {
                        "t": "set",
                        "p": "payload",
                        "pt": "msg",
                        "to": "payload.Brightness",
                        "tot": "msg"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 810,
                "y": 220,
                "wires": [
                    [
                        "ab423b7d.b17498"
                    ]
                ]
            },
            {
                "id": "ab423b7d.b17498",
                "type": "debug",
                "z": "e797789f.53e7c8",
                "name": "",
                "active": true,
                "tosidebar": true,
                "console": false,
                "tostatus": false,
                "complete": "false",
                "statusVal": "",
                "statusType": "auto",
                "x": 1150,
                "y": 220,
                "wires": []
            }
        ]
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        Support us

        ioBroker
        Community Adapters
        Donate

        1.0k
        Online

        31.7k
        Users

        79.7k
        Topics

        1.3m
        Posts

        node-red
        2
        2
        991
        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