Node-RED Companion Integration

repository·main·Indexed 20 days ago

https://github.com/zachowj/hass-node-red

A bridge component that allows Home Assistant to interact with Node-RED. It enables the creation and management of Home Assistant entities (such as sensors, switches, and buttons) from Node-RED, allows controlling Node-RED flows via the Home Assistant UI, and supports Home Assistant webhooks and device automation. Requires Home Assistant 2024.5+ and node-red-contrib-home-assistant-websocket v0.57+.

Tokens
892
Snippets
0
Records
7
Agent score
19%

What's inside hass-node-red

  1. Overview of Node-RED Companion Integration features

    main

    The Node-RED Companion Integration acts as a bridge between Node-RED and Home Assistant. It allows Node-RED to manage Home Assistant entities and automations dynamically.

    Key Capabilities:

    • Entity Management: Create and update various Home Assistant entities from Node-RED, including:
      • Binary Sensors
      • Buttons
      • Numbers
      • Selects
      • Sensors
      • Switches
      • Text fields
    • Flow Control: Enable or disable Node-RED flows directly from the Home Assistant UI.
    • Webhooks: Create and manage Home Assistant webhooks that are handled in Node-RED.
    • Device Automation: Use device triggers and actions within Node-RED for advanced automation.
  2. Key features of the Node-RED Companion Integration

    main

    The integration enables several capabilities between Node-RED and Home Assistant:

    • Entity Management: Create and update binary_sensor, sensor, and switch entities in Home Assistant directly from Node-RED.
    • Flow Control: Expose Node-RED Event nodes to Home Assistant as switches. This allows you to enable or disable specific Node-RED flows via the Home Assistant UI or through service calls.
    • Webhook Handling: Create Home Assistant webhooks that are handled within Node-RED.
    • Device Interaction: Use Device triggers and actions from Node-RED.
  3. Install the Node-RED Companion Integration manually

    main

    To install the integration without HACS, perform the following steps:

    1. Prepare directory: Navigate to your Home Assistant configuration.yaml directory. If a custom_components directory does not exist, create it.
    2. Create component folder: Inside custom_components, create a folder named nodered.
    3. Download files: Download all files from the custom_components/nodered/ directory of the repository and place them into your local nodered folder.
    4. Restart: Restart Home Assistant and refresh your browser.
    5. Add Integration:
      • Go to Settings > Devices & Services.
      • Click + Add Integration.
      • Search for Node-RED Companion and follow the setup prompts.
  4. Install the Node-RED Companion Integration

    main

    To integrate Node-RED with Home Assistant, follow these steps:

    1. Prerequisite: Ensure you have node-red-contrib-home-assistant-websocket installed in Node-RED (minimum version 0.20).
    2. Click Install in the Home Assistant HACS or Integrations interface.
    3. Restart Home Assistant.
    4. Refresh your browser window (this is required to ensure the integration appears in the list).
    5. In the Home Assistant UI, navigate to Configuration -> Integrations.
    6. Click the + button and search for Node-RED to add the integration.
  5. Install the Node-RED Companion Integration via HACS

    main

    If you use the Home Assistant Community Store (HACS), follow these steps to install the integration:

    1. Search for the integration: Open HACS in Home Assistant and search for hass-node-red.
    2. Download: Click the blue Download button. In the version selection popup, select the latest version to download.
    3. Restart: Restart Home Assistant. You may see a clickable repair item in Settings to complete the process.
    4. Add Integration:
      • Go to Settings > Devices & Services.
      • Click + Add Integration.
      • Search for Node-RED Companion and follow the on-screen prompts.
  6. Configure the Node-RED Companion Integration

    main
    The Node-RED Companion Integration uses a split configuration model. Initial setup (installation and adding the integration) is performed within the Home Assistant UI. However, all subsequent configuration is managed directly within Node-RED.