A simple Siri-Switch (Node-RED + Dashboard + HomeKit)

This flow demonstrates basic interaction between Node-RED and HomeKit.

The contained Flow consists of two nodes: a HomeKit Service node and a UI Switch node. They are wired as a closed loop, so they provide each other with feedback.

In this example the HomeKit node is paired with the displayed iPhone. So when the user changes the switch in the iOS Home App the new state is being propagated to the UI node in Node-RED. This even supports Siri voice control with no further setup involved :)

Flow in action

        "id": "9f2fd2c1.5ad08",
        "type": "tab",
        "label": "HomeKit Demo"
        "id": "287b69aa.05ea66",
        "type": "homekit-service",
        "z": "9f2fd2c1.5ad08",
        "accessory": "d1e30622.0d3aa8",
        "name": "Switch",
        "serviceName": "Switch",
        "x": 270,
        "y": 200,
        "wires": [
        "id": "37233ce8.cc8c34",
        "type": "ui_switch",
        "z": "9f2fd2c1.5ad08",
        "name": "",
        "label": "Switch",
        "group": "bb0e754e.70b108",
        "order": 0,
        "width": 0,
        "height": 0,
        "passthru": false,
        "topic": "",
        "style": "",
        "onvalue": "{\"On\":true}",
        "onvalueType": "json",
        "onicon": "",
        "oncolor": "",
        "offvalue": "{\"On\":false}",
        "offvalueType": "json",
        "officon": "",
        "offcolor": "",
        "x": 280,
        "y": 100,
        "wires": [
        "id": "d1e30622.0d3aa8",
        "type": "homekit-accessory",
        "z": "",
        "accessoryName": "Connector",
        "pinCode": "111-11-111",
        "port": "",
        "manufacturer": "Default Manufacturer",
        "model": "Default Model",
        "serialNo": "Default Serial Number"
        "id": "bb0e754e.70b108",
        "type": "ui_group",
        "z": "",
        "name": "Default",
        "tab": "77efcdfa.edd224",
        "disp": false,
        "width": "6"
        "id": "77efcdfa.edd224",
        "type": "ui_tab",
        "z": "",
        "name": "HomeKit",
        "icon": "dashboard"

Flow Info

created 1 year, 8 months ago

Node Types

  • homekit-accessory (x1)
  • homekit-service (x1)
  • tab (x1)
  • ui_group (x1)
  • ui_switch (x1)
  • ui_tab (x1)


  • HomeKit
  • Siri
  • Switch
  • Voice
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option