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. Node-Red
  5. TV schalten mit Homekit über Node Red

NEWS

  • Monatsrückblick Januar/Februar 2026 ist online!
    BluefoxB
    Bluefox
    18
    1
    719

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

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

TV schalten mit Homekit über Node Red

Scheduled Pinned Locked Moved Node-Red
3 Posts 2 Posters 478 Views 2 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.
  • S Offline
    S Offline
    Strobel
    wrote on last edited by
    #1

    Moin!

    Ich versuche gerade meinen TV über Homekit zu steuern. Erstmal nur AN/AUS und den Status ob AN oder AUS. Der TV ist über IoBroker schon verbunden (Sony Bravia Adapter).
    Homekit mit TV ist auch eingebunden. Die Ausgabe aus Homekit ist { Active: 1 } bzw. { Active: 0 }. Aber wie kann ich jetzt mit der Ausgabe den Datenpunkt von der Sony Bravia Butten in ioBroker schalten bzw. ansteuern?

    Unbenannt.PNG

    Aktuell sieht es bei mir in Node Red wie folgt aus:
    TV.PNG

    Der Code dazu:

    [
        {
            "id": "d2c15bdb.ff75b8",
            "type": "tab",
            "label": "Flow 1",
            "disabled": false,
            "info": ""
        },
        {
            "id": "e5763b8f.c089a8",
            "type": "homekit-service",
            "z": "d2c15bdb.ff75b8",
            "isParent": true,
            "bridge": "6182d5a4.3c886c",
            "parentService": "",
            "name": "TV Wohnzimmer",
            "serviceName": "Television",
            "topic": "",
            "filter": false,
            "manufacturer": "Sony",
            "model": "KD65XE9005",
            "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": "",
            "waitForSetupMsg": false,
            "outputs": 2,
            "x": 810,
            "y": 160,
            "wires": [
                [
                    "e4e761a1.6e7d3"
                ],
                []
            ]
        },
        {
            "id": "bb737519.cca9d8",
            "type": "ioBroker in",
            "z": "d2c15bdb.ff75b8",
            "name": "If TV power status is acive",
            "topic": "sony-bravia.0.info.powerStatusActive",
            "payloadType": "value",
            "onlyack": false,
            "func": "all",
            "gap": "",
            "fireOnStart": "false",
            "x": 150,
            "y": 160,
            "wires": [
                [
                    "3606d0d0.d15c"
                ]
            ]
        },
        {
            "id": "3606d0d0.d15c",
            "type": "change",
            "z": "d2c15bdb.ff75b8",
            "name": "False/True = 0/1",
            "rules": [
                {
                    "t": "change",
                    "p": "payload",
                    "pt": "msg",
                    "from": "false",
                    "fromt": "str",
                    "to": "{\"Active\":0}",
                    "tot": "json"
                },
                {
                    "t": "change",
                    "p": "payload",
                    "pt": "msg",
                    "from": "true",
                    "fromt": "str",
                    "to": "{\"Active\":1}",
                    "tot": "json"
                }
            ],
            "action": "",
            "property": "",
            "from": "",
            "to": "",
            "reg": false,
            "x": 380,
            "y": 160,
            "wires": [
                [
                    "e9ea347f.986098"
                ]
            ]
        },
        {
            "id": "248191f.79aca6e",
            "type": "ioBroker out",
            "z": "d2c15bdb.ff75b8",
            "name": "Power on",
            "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAuAw==",
            "ack": "true",
            "autoCreate": "false",
            "stateName": "",
            "role": "button",
            "payloadType": "boolean",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1160,
            "y": 120,
            "wires": []
        },
        {
            "id": "e4e761a1.6e7d3",
            "type": "switch",
            "z": "d2c15bdb.ff75b8",
            "name": "",
            "property": "payload",
            "propertyType": "msg",
            "rules": [
                {
                    "t": "cont",
                    "v": "{\"Active\":1}",
                    "vt": "str"
                },
                {
                    "t": "cont",
                    "v": "{\"Active\":0}",
                    "vt": "str"
                }
            ],
            "checkall": "true",
            "repair": false,
            "outputs": 2,
            "x": 990,
            "y": 160,
            "wires": [
                [
                    "248191f.79aca6e"
                ],
                [
                    "32cc1ba9.9354d4"
                ]
            ]
        },
        {
            "id": "32cc1ba9.9354d4",
            "type": "ioBroker out",
            "z": "d2c15bdb.ff75b8",
            "name": "PowerOff",
            "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAvAw==",
            "ack": "true",
            "autoCreate": "false",
            "stateName": "",
            "role": "",
            "payloadType": "",
            "readonly": "",
            "stateUnit": "",
            "stateMin": "",
            "stateMax": "",
            "x": 1160,
            "y": 200,
            "wires": []
        },
        {
            "id": "e9ea347f.986098",
            "type": "delay",
            "z": "d2c15bdb.ff75b8",
            "name": "",
            "pauseType": "delay",
            "timeout": "10",
            "timeoutUnits": "seconds",
            "rate": "1",
            "nbRateUnits": "1",
            "rateUnits": "second",
            "randomFirst": "1",
            "randomLast": "5",
            "randomUnits": "seconds",
            "drop": false,
            "x": 590,
            "y": 160,
            "wires": [
                [
                    "e5763b8f.c089a8"
                ]
            ]
        },
        {
            "id": "6182d5a4.3c886c",
            "type": "homekit-bridge",
            "bridgeName": "KNX",
            "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
        }
    ]
    

    Den korrekten Status ob an oder aus bekomme ich schon auf Homekit. Aber das Problem ist noch zwischen Homekit und ON / OFF vom TV. Also bei dem "Switch".

    Einer eine Idee für mich? :/

    S mickymM 2 Replies Last reply
    0
    • S Strobel

      Moin!

      Ich versuche gerade meinen TV über Homekit zu steuern. Erstmal nur AN/AUS und den Status ob AN oder AUS. Der TV ist über IoBroker schon verbunden (Sony Bravia Adapter).
      Homekit mit TV ist auch eingebunden. Die Ausgabe aus Homekit ist { Active: 1 } bzw. { Active: 0 }. Aber wie kann ich jetzt mit der Ausgabe den Datenpunkt von der Sony Bravia Butten in ioBroker schalten bzw. ansteuern?

      Unbenannt.PNG

      Aktuell sieht es bei mir in Node Red wie folgt aus:
      TV.PNG

      Der Code dazu:

      [
          {
              "id": "d2c15bdb.ff75b8",
              "type": "tab",
              "label": "Flow 1",
              "disabled": false,
              "info": ""
          },
          {
              "id": "e5763b8f.c089a8",
              "type": "homekit-service",
              "z": "d2c15bdb.ff75b8",
              "isParent": true,
              "bridge": "6182d5a4.3c886c",
              "parentService": "",
              "name": "TV Wohnzimmer",
              "serviceName": "Television",
              "topic": "",
              "filter": false,
              "manufacturer": "Sony",
              "model": "KD65XE9005",
              "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": "",
              "waitForSetupMsg": false,
              "outputs": 2,
              "x": 810,
              "y": 160,
              "wires": [
                  [
                      "e4e761a1.6e7d3"
                  ],
                  []
              ]
          },
          {
              "id": "bb737519.cca9d8",
              "type": "ioBroker in",
              "z": "d2c15bdb.ff75b8",
              "name": "If TV power status is acive",
              "topic": "sony-bravia.0.info.powerStatusActive",
              "payloadType": "value",
              "onlyack": false,
              "func": "all",
              "gap": "",
              "fireOnStart": "false",
              "x": 150,
              "y": 160,
              "wires": [
                  [
                      "3606d0d0.d15c"
                  ]
              ]
          },
          {
              "id": "3606d0d0.d15c",
              "type": "change",
              "z": "d2c15bdb.ff75b8",
              "name": "False/True = 0/1",
              "rules": [
                  {
                      "t": "change",
                      "p": "payload",
                      "pt": "msg",
                      "from": "false",
                      "fromt": "str",
                      "to": "{\"Active\":0}",
                      "tot": "json"
                  },
                  {
                      "t": "change",
                      "p": "payload",
                      "pt": "msg",
                      "from": "true",
                      "fromt": "str",
                      "to": "{\"Active\":1}",
                      "tot": "json"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 380,
              "y": 160,
              "wires": [
                  [
                      "e9ea347f.986098"
                  ]
              ]
          },
          {
              "id": "248191f.79aca6e",
              "type": "ioBroker out",
              "z": "d2c15bdb.ff75b8",
              "name": "Power on",
              "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAuAw==",
              "ack": "true",
              "autoCreate": "false",
              "stateName": "",
              "role": "button",
              "payloadType": "boolean",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1160,
              "y": 120,
              "wires": []
          },
          {
              "id": "e4e761a1.6e7d3",
              "type": "switch",
              "z": "d2c15bdb.ff75b8",
              "name": "",
              "property": "payload",
              "propertyType": "msg",
              "rules": [
                  {
                      "t": "cont",
                      "v": "{\"Active\":1}",
                      "vt": "str"
                  },
                  {
                      "t": "cont",
                      "v": "{\"Active\":0}",
                      "vt": "str"
                  }
              ],
              "checkall": "true",
              "repair": false,
              "outputs": 2,
              "x": 990,
              "y": 160,
              "wires": [
                  [
                      "248191f.79aca6e"
                  ],
                  [
                      "32cc1ba9.9354d4"
                  ]
              ]
          },
          {
              "id": "32cc1ba9.9354d4",
              "type": "ioBroker out",
              "z": "d2c15bdb.ff75b8",
              "name": "PowerOff",
              "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAvAw==",
              "ack": "true",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1160,
              "y": 200,
              "wires": []
          },
          {
              "id": "e9ea347f.986098",
              "type": "delay",
              "z": "d2c15bdb.ff75b8",
              "name": "",
              "pauseType": "delay",
              "timeout": "10",
              "timeoutUnits": "seconds",
              "rate": "1",
              "nbRateUnits": "1",
              "rateUnits": "second",
              "randomFirst": "1",
              "randomLast": "5",
              "randomUnits": "seconds",
              "drop": false,
              "x": 590,
              "y": 160,
              "wires": [
                  [
                      "e5763b8f.c089a8"
                  ]
              ]
          },
          {
              "id": "6182d5a4.3c886c",
              "type": "homekit-bridge",
              "bridgeName": "KNX",
              "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
          }
      ]
      

      Den korrekten Status ob an oder aus bekomme ich schon auf Homekit. Aber das Problem ist noch zwischen Homekit und ON / OFF vom TV. Also bei dem "Switch".

      Einer eine Idee für mich? :/

      S Offline
      S Offline
      Strobel
      wrote on last edited by
      #2

      Ich bin ein kleines Stück weiter. Es läuft - bloß´habe ich jetzt eine Endlosschleife drin. Sobald ich mit der Fernbedienung dazwischen funke funktioniert es nicht mehr. Woran liegt das?

      Hier der aktuelle Code:

      [
          {
              "id": "baa7c27d.efdce",
              "type": "tab",
              "label": "TV",
              "disabled": false,
              "info": ""
          },
          {
              "id": "f69059c8.cbeac8",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": true,
              "bridge": "6182d5a4.3c886c",
              "parentService": "",
              "name": "TV Wohnzimmer",
              "serviceName": "Television",
              "topic": "",
              "filter": false,
              "manufacturer": "Sony",
              "model": "KD65XE9005",
              "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": "",
              "waitForSetupMsg": false,
              "outputs": 2,
              "x": 650,
              "y": 100,
              "wires": [
                  [
                      "2f01817.c45a27e"
                  ],
                  []
              ]
          },
          {
              "id": "47e13c6a.b86cf4",
              "type": "ioBroker in",
              "z": "baa7c27d.efdce",
              "name": "If TV power status is acive",
              "topic": "sony-bravia.0.info.powerStatusActive",
              "payloadType": "value",
              "onlyack": false,
              "func": "rbe",
              "gap": "",
              "fireOnStart": "false",
              "x": 150,
              "y": 100,
              "wires": [
                  [
                      "5fac799a.6ef848"
                  ]
              ]
          },
          {
              "id": "5fac799a.6ef848",
              "type": "change",
              "z": "baa7c27d.efdce",
              "name": "False/True = 0/1",
              "rules": [
                  {
                      "t": "change",
                      "p": "payload",
                      "pt": "msg",
                      "from": "false",
                      "fromt": "bool",
                      "to": "{\"Active\":0}",
                      "tot": "json"
                  },
                  {
                      "t": "change",
                      "p": "payload",
                      "pt": "msg",
                      "from": "true",
                      "fromt": "bool",
                      "to": "{\"Active\":1}",
                      "tot": "json"
                  }
              ],
              "action": "",
              "property": "",
              "from": "",
              "to": "",
              "reg": false,
              "x": 400,
              "y": 100,
              "wires": [
                  [
                      "f69059c8.cbeac8"
                  ]
              ]
          },
          {
              "id": "a9e569de.eb508",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "TV on",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"Active\":1}",
              "payloadType": "json",
              "x": 470,
              "y": 1380,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "250f61e5.cdbe8e",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "TV off",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"Active\":0}",
              "payloadType": "json",
              "x": 470,
              "y": 1420,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "26b7c791.d278",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "TV Setup",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": true,
              "onceDelay": "5",
              "topic": "",
              "payload": "",
              "payloadType": "date",
              "x": 480,
              "y": 1320,
              "wires": [
                  [
                      "404e9088.92a208"
                  ]
              ]
          },
          {
              "id": "2028cd20.56072a",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "Source Setup",
              "props": [
                  {
                      "p": "payload"
                  },
                  {
                      "p": "topic",
                      "vt": "str"
                  }
              ],
              "repeat": "",
              "crontab": "",
              "once": true,
              "onceDelay": "6",
              "topic": "",
              "payload": "",
              "payloadType": "date",
              "x": 480,
              "y": 1780,
              "wires": [
                  [
                      "ab0cd2f6.17b038"
                  ]
              ]
          },
          {
              "id": "404e9088.92a208",
              "type": "function",
              "z": "baa7c27d.efdce",
              "name": "Setup TV",
              "func": "var name = \"Television\";\n\nmsg.payload = {\n \"ConfiguredName\": name,\n \"ActiveIdentifier\" : 0,\n \"SleepDiscoveryMode\" : 0,\n \"Active\" : 0\n};\nreturn msg;",
              "outputs": 1,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "x": 660,
              "y": 1320,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "8e8be1d8.38174",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "Input 1",
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"ActiveIdentifier\":1}",
              "payloadType": "json",
              "x": 470,
              "y": 1540,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "27b2cba.39cb534",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "Input 0",
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"ActiveIdentifier\":0}",
              "payloadType": "json",
              "x": 470,
              "y": 1500,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "212a935c.2d79f4",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "Input 2",
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"ActiveIdentifier\":2}",
              "payloadType": "json",
              "x": 470,
              "y": 1580,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "fd8b49ca.2333b",
              "type": "inject",
              "z": "baa7c27d.efdce",
              "name": "Input 3",
              "repeat": "",
              "crontab": "",
              "once": false,
              "onceDelay": 0.1,
              "topic": "",
              "payload": "{\"ActiveIdentifier\":3}",
              "payloadType": "json",
              "x": 470,
              "y": 1620,
              "wires": [
                  [
                      "93bc492d.3d6848"
                  ]
              ]
          },
          {
              "id": "ab0cd2f6.17b038",
              "type": "function",
              "z": "baa7c27d.efdce",
              "name": "Set up inputs",
              "func": "// This function will initialize and name inputs\n// it is set to work with 4 inputs\n\n// INPUT SOURCE NAMES\nvar input0 = \"HDMI 1\";\nvar input1 = \"HDMI 2\";\nvar input2 = \"Apple TV\";\nvar input3 = \"Wii U\";\n\n// INPUT SOURCE TYPES\nvar OTHER = 0;\nvar HOME_SCREEN = 1;\nvar TUNER = 2;\nvar HDMI = 3;\nvar COMPOSITE_VIDEO = 4;\nvar S_VIDEO = 5;\nvar COMPONENT_VIDEO = 6;\nvar DVI = 7;\nvar AIRPLAY = 8;\nvar USB = 9;\nvar APPLICATION = 10;\n\n// Configure your input types based on options above\nvar input0type = HDMI;\nvar input1type = HDMI;\nvar input2type = HDMI;\nvar input3type = COMPOSITE_VIDEO;\n\n\n// Duplicate or remove sets if you have more or fewer inputs\nvar msg0={};\nvar msg1={};\nvar msg2={};\nvar msg3={};\n\nmsg0.payload = {\n    \"Identifier\": 0,\n    \"IsConfigured\" : 1,\n    \"ConfiguredName\": input0,\n    \"InputSourceType\": input0type\n};\nmsg1.payload = {\n    \"Identifier\": 1,\n    \"IsConfigured\" : 1,\n    \"ConfiguredName\": input1,\n    \"InputSourceType\": input1type\n};\nmsg2.payload = {\n    \"Identifier\": 2,\n    \"IsConfigured\" : 1,\n    \"ConfiguredName\": input2,\n    \"InputSourceType\": input2type\n};\nmsg3.payload = {\n    \"Identifier\": 3,\n    \"IsConfigured\" : 1,\n    \"ConfiguredName\" : input3,\n    \"InputSourceType\" : input3type\n};\nreturn [msg0,msg1,msg2,msg3];",
              "outputs": 4,
              "noerr": 0,
              "initialize": "",
              "finalize": "",
              "x": 690,
              "y": 1780,
              "wires": [
                  [
                      "8ff895bc.7b935"
                  ],
                  [
                      "f74be9ff.fa82a8"
                  ],
                  [
                      "497e4a93.2cfab4"
                  ],
                  [
                      "5213369b.218d48"
                  ]
              ]
          },
          {
              "id": "93bc492d.3d6848",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": true,
              "bridge": "f6a4260d.7e51e",
              "parentService": "",
              "name": "Television Example",
              "serviceName": "Television",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "firmwareRev": "",
              "hardwareRev": "",
              "softwareRev": "",
              "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": "{\"RemoteKey\":null}",
              "waitForSetupMsg": false,
              "outputs": 2,
              "x": 890,
              "y": 1380,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "983c3244.9dfbe8",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": false,
              "bridge": "f6a4260d.7e51e",
              "parentService": "86669c0b.9dfec8",
              "name": "Television Speaker",
              "serviceName": "TelevisionSpeaker",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "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": "{\n    \"VolumeControlType\":1,\n    \"VolumeSelector\":true\n}",
              "outputs": 2,
              "x": 890,
              "y": 1700,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "8ff895bc.7b935",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": false,
              "bridge": "",
              "parentService": "",
              "name": "Input 0",
              "serviceName": "InputSource",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "firmwareRev": "",
              "hardwareRev": "",
              "softwareRev": "",
              "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": "{}",
              "waitForSetupMsg": false,
              "outputs": 2,
              "x": 920,
              "y": 1760,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "f74be9ff.fa82a8",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": false,
              "bridge": "",
              "parentService": "",
              "name": "Input 1",
              "serviceName": "InputSource",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "firmwareRev": "",
              "hardwareRev": "",
              "softwareRev": "",
              "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": "{}",
              "waitForSetupMsg": false,
              "outputs": 2,
              "x": 920,
              "y": 1820,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "497e4a93.2cfab4",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": false,
              "bridge": "",
              "parentService": "86669c0b.9dfec8",
              "name": "Input 2",
              "serviceName": "InputSource",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "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": "{}",
              "outputs": 2,
              "x": 920,
              "y": 1880,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "5213369b.218d48",
              "type": "homekit-service",
              "z": "baa7c27d.efdce",
              "isParent": false,
              "bridge": "",
              "parentService": "86669c0b.9dfec8",
              "name": "Input 3",
              "serviceName": "InputSource",
              "topic": "",
              "filter": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "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": "{}",
              "outputs": 2,
              "x": 920,
              "y": 1940,
              "wires": [
                  [],
                  []
              ]
          },
          {
              "id": "2f01817.c45a27e",
              "type": "json",
              "z": "baa7c27d.efdce",
              "name": "",
              "property": "payload",
              "action": "",
              "pretty": false,
              "x": 870,
              "y": 100,
              "wires": [
                  [
                      "7e24c376.f6493c"
                  ]
              ]
          },
          {
              "id": "7e24c376.f6493c",
              "type": "ioBroker out",
              "z": "baa7c27d.efdce",
              "name": "TvPower",
              "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAVAw==",
              "ack": "false",
              "autoCreate": "false",
              "stateName": "",
              "role": "",
              "payloadType": "",
              "readonly": "",
              "stateUnit": "",
              "stateMin": "",
              "stateMax": "",
              "x": 1060,
              "y": 100,
              "wires": []
          },
          {
              "id": "6182d5a4.3c886c",
              "type": "homekit-bridge",
              "bridgeName": "KNX",
              "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": "f6a4260d.7e51e",
              "type": "homekit-bridge",
              "bridgeName": "Television Wiki",
              "pinCode": "111-11-111",
              "port": "",
              "allowInsecureRequest": false,
              "manufacturer": "Default Manufacturer",
              "model": "Default Model",
              "serialNo": "Default Serial Number",
              "customMdnsConfig": false,
              "mdnsMulticast": true,
              "mdnsInterface": "",
              "mdnsPort": "",
              "mdnsIp": "",
              "mdnsTtl": "",
              "mdnsLoopback": true,
              "mdnsReuseAddr": true,
              "allowMessagePassthrough": false
          }
      ]
      
      1 Reply Last reply
      0
      • S Strobel

        Moin!

        Ich versuche gerade meinen TV über Homekit zu steuern. Erstmal nur AN/AUS und den Status ob AN oder AUS. Der TV ist über IoBroker schon verbunden (Sony Bravia Adapter).
        Homekit mit TV ist auch eingebunden. Die Ausgabe aus Homekit ist { Active: 1 } bzw. { Active: 0 }. Aber wie kann ich jetzt mit der Ausgabe den Datenpunkt von der Sony Bravia Butten in ioBroker schalten bzw. ansteuern?

        Unbenannt.PNG

        Aktuell sieht es bei mir in Node Red wie folgt aus:
        TV.PNG

        Der Code dazu:

        [
            {
                "id": "d2c15bdb.ff75b8",
                "type": "tab",
                "label": "Flow 1",
                "disabled": false,
                "info": ""
            },
            {
                "id": "e5763b8f.c089a8",
                "type": "homekit-service",
                "z": "d2c15bdb.ff75b8",
                "isParent": true,
                "bridge": "6182d5a4.3c886c",
                "parentService": "",
                "name": "TV Wohnzimmer",
                "serviceName": "Television",
                "topic": "",
                "filter": false,
                "manufacturer": "Sony",
                "model": "KD65XE9005",
                "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": "",
                "waitForSetupMsg": false,
                "outputs": 2,
                "x": 810,
                "y": 160,
                "wires": [
                    [
                        "e4e761a1.6e7d3"
                    ],
                    []
                ]
            },
            {
                "id": "bb737519.cca9d8",
                "type": "ioBroker in",
                "z": "d2c15bdb.ff75b8",
                "name": "If TV power status is acive",
                "topic": "sony-bravia.0.info.powerStatusActive",
                "payloadType": "value",
                "onlyack": false,
                "func": "all",
                "gap": "",
                "fireOnStart": "false",
                "x": 150,
                "y": 160,
                "wires": [
                    [
                        "3606d0d0.d15c"
                    ]
                ]
            },
            {
                "id": "3606d0d0.d15c",
                "type": "change",
                "z": "d2c15bdb.ff75b8",
                "name": "False/True = 0/1",
                "rules": [
                    {
                        "t": "change",
                        "p": "payload",
                        "pt": "msg",
                        "from": "false",
                        "fromt": "str",
                        "to": "{\"Active\":0}",
                        "tot": "json"
                    },
                    {
                        "t": "change",
                        "p": "payload",
                        "pt": "msg",
                        "from": "true",
                        "fromt": "str",
                        "to": "{\"Active\":1}",
                        "tot": "json"
                    }
                ],
                "action": "",
                "property": "",
                "from": "",
                "to": "",
                "reg": false,
                "x": 380,
                "y": 160,
                "wires": [
                    [
                        "e9ea347f.986098"
                    ]
                ]
            },
            {
                "id": "248191f.79aca6e",
                "type": "ioBroker out",
                "z": "d2c15bdb.ff75b8",
                "name": "Power on",
                "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAuAw==",
                "ack": "true",
                "autoCreate": "false",
                "stateName": "",
                "role": "button",
                "payloadType": "boolean",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1160,
                "y": 120,
                "wires": []
            },
            {
                "id": "e4e761a1.6e7d3",
                "type": "switch",
                "z": "d2c15bdb.ff75b8",
                "name": "",
                "property": "payload",
                "propertyType": "msg",
                "rules": [
                    {
                        "t": "cont",
                        "v": "{\"Active\":1}",
                        "vt": "str"
                    },
                    {
                        "t": "cont",
                        "v": "{\"Active\":0}",
                        "vt": "str"
                    }
                ],
                "checkall": "true",
                "repair": false,
                "outputs": 2,
                "x": 990,
                "y": 160,
                "wires": [
                    [
                        "248191f.79aca6e"
                    ],
                    [
                        "32cc1ba9.9354d4"
                    ]
                ]
            },
            {
                "id": "32cc1ba9.9354d4",
                "type": "ioBroker out",
                "z": "d2c15bdb.ff75b8",
                "name": "PowerOff",
                "topic": "sony-bravia.0.function.AAAAAQAAAAEAAAAvAw==",
                "ack": "true",
                "autoCreate": "false",
                "stateName": "",
                "role": "",
                "payloadType": "",
                "readonly": "",
                "stateUnit": "",
                "stateMin": "",
                "stateMax": "",
                "x": 1160,
                "y": 200,
                "wires": []
            },
            {
                "id": "e9ea347f.986098",
                "type": "delay",
                "z": "d2c15bdb.ff75b8",
                "name": "",
                "pauseType": "delay",
                "timeout": "10",
                "timeoutUnits": "seconds",
                "rate": "1",
                "nbRateUnits": "1",
                "rateUnits": "second",
                "randomFirst": "1",
                "randomLast": "5",
                "randomUnits": "seconds",
                "drop": false,
                "x": 590,
                "y": 160,
                "wires": [
                    [
                        "e5763b8f.c089a8"
                    ]
                ]
            },
            {
                "id": "6182d5a4.3c886c",
                "type": "homekit-bridge",
                "bridgeName": "KNX",
                "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
            }
        ]
        

        Den korrekten Status ob an oder aus bekomme ich schon auf Homekit. Aber das Problem ist noch zwischen Homekit und ON / OFF vom TV. Also bei dem "Switch".

        Einer eine Idee für mich? :/

        mickymM Offline
        mickymM Offline
        mickym
        Most Active
        wrote on last edited by
        #3

        @strobel Der 2. Flow kommt mir undurchsichtig vor. Beim 1. Flow müsstest Du wahrscheinlich nur eine Change Node mit payload = boolean = true an die Tasten senden. Zumindest funktionieren bei mir diese Tasten in iobroker bei mir so.

        Jeder Flow bzw. jedes Script, das ich hier poste implementiert jeder auf eigene Gefahr. Flows und Scripts können Fehler aufweisen und weder der Seitenbetreiber noch ich persönlich können hierfür haftbar gemacht werden. Das gleiche gilt für Empfehlungen aller Art.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        Support us

        ioBroker
        Community Adapters
        Donate

        261

        Online

        32.7k

        Users

        82.6k

        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