Token导航 LogoToken导航TokenDH.com
开发external-servicegithub未标认证来源可访问许可证需确认审计提醒

node-red节点红

Agent Skill

node-red 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

727

周安装

30

GitHub Stars

37

下载量

238
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:node-red(节点红)
来源仓库:https://github.com/tonylofgren/aurora-smart-home
仓库路径:skills/node-red
安装命令:
npx skills add https://github.com/tonylofgren/aurora-smart-home --skill Node-RED
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/tonylofgren/aurora-smart-home --skill Node-RED

简介

node-red 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合整理仓库状态与变更事项。

  • 适用于围绕代码协作、仓库状态和开发流程的信息组织与梳理。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装并使用。
  • 安装前需确认权限范围和维护状态,注意可能触发联网或文件读写操作。
  • node-red 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Node-RED for Home Assistant

Build Node-RED flows using node-red-contrib-home-assistant-websocket nodes (v0.80+).

Requirements: Node-RED 4.x (Node.js 18+), Home Assistant 2024.3.0+.

The Iron Law

USE CURRENT NODE NAMES - NEVER OUTDATED ONES

The node-red-contrib-home-assistant-websocket package has renamed several nodes. Using old names produces broken flows that silently fail.

Critical: Node Names Have Changed

STOP. If you're about to use any of these node types, you're using outdated names:

WRONG (Old)CORRECT (Current)
server-state-changedtrigger-state or events:state
poll-statepoll-state (unchanged but check config)
call-serviceapi-call-service

Trigger Node Configuration (Current API)

{
  "type": "trigger-state",
  "entityId": "binary_sensor.motion",
  "entityIdType": "exact",
  "constraints": [
    {
      "targetType": "this_entity",
      "propertyType": "current_state",
      "comparatorType": "is",
      "comparatorValue": "on"
    }
  ],
  "outputs": 2
}

entityIdType options: exact, substring, regex

There is NO list type. To monitor multiple entities, use regex:

"entityId": "binary_sensor\\.motion_(1|2|3)",
"entityIdType": "regex"

Service Call Configuration (Current API)

{
  "type": "api-call-service",
  "domain": "light",
  "service": "turn_on",
  "entityId": ["light.living_room"],
  "data": "",
  "dataType": "json"
}

Or dynamic via msg:

{
  "type": "api-call-service",
  "domain": "",
  "service": "",
  "data": "",
  "dataType": "msg"
}

With function node before:

msg.payload = {
  action: "light.turn_on",
  target: { entity_id: ["light.living_room"] },
  data: { brightness_pct: 80 }
};
return msg;

Current State Node - Single Entity Only

api-current-state queries ONE entity, not patterns.

{
  "type": "api-current-state",
  "entity_id": "person.john"
}

To check multiple entities, use function node:

const ha = global.get("homeassistant").homeAssistant.states;
const people = Object.keys(ha)
  .filter(id => id.startsWith("person."))
  .filter(id => ha[id].state !== "home");
msg.awayPeople = people;
return msg;

Entity Nodes Require Extra Integration

The following nodes require hass-node-red integration (separate from the websocket nodes):

  • ha-entity (sensor, binary_sensor, switch, etc.)
  • Entity config nodes

Always mention this prerequisite when using entity nodes.

Stable Entity Nodes (v0.71.0+)

These nodes were promoted from beta to stable in September 2024:

  • number - expose HA number entities
  • select - expose HA select entities
  • text - expose HA text entities
  • time-entity - expose HA time entities

These support "Expose as" listening modes and input override blocking (v0.70.0+).

Deprecations (v0.79-v0.80)

State type configuration is deprecated (removed in v1.0). Use entity state casting instead.

Calendar event dates now use ISO 8601 local strings with timezone offsets (v0.78.0+). A new all_day property identifies all-day events explicitly.

Timer Pattern (Motion Light)

Use single trigger node with extend: true:

{
  "type": "trigger",
  "op1type": "nul",
  "op2": "timeout",
  "op2type": "str",
  "duration": "5",
  "extend": true,
  "units": "min"
}

Do NOT create separate reset/start timer nodes. The extend property handles this.

Flow JSON Guidelines

  1. Never include server config node - User configures separately
  2. Leave server field empty - User selects their server
  3. Use placeholder entity IDs - Document what to change
  4. Add comment node - Explain required configuration

Function Node: External Libraries

WRONG: Using global.get('axios') or similar for HTTP requests.

This requires manual configuration in settings.js:

// settings.js - requires Node-RED restart
functionGlobalContext: {
    axios: require('axios')
}

CORRECT: Use the built-in http request node instead:

{
  "type": "http request",
  "method": "GET",
  "url": "https://api.example.com/data",
  "ret": "obj"
}

When you MUST use function node for HTTP:

  • Complex request logic that can't be handled by http request node
  • Requires settings.js configuration (warn user!)
  • Use node.send() and node.done() for async:
// Async pattern in function node
const axios = global.get('axios'); // Requires settings.js config!

async function fetchData() {
    try {
        const response = await axios.get(msg.url);
        msg.payload = response.data;
        node.send(msg);
    } catch (error) {
        node.error(error.message, msg);
    }
    node.done();
}

fetchData();
return null; // Prevent sync output

Context Storage

Three scopes available:

ScopeSyntaxShared With
Nodecontext.get/set()Only this node
Flowflow.get/set()All nodes in tab
Globalglobal.get/set()All flows
// Store state
flow.set('machineState', 'washing');
flow.set('history', historyArray);

// Retrieve
const state = flow.get('machineState') || 'idle';

For persistence across restarts, configure in settings.js:

contextStorage: {
    default: { module: "localfilesystem" }
}

Error Handling Pattern

Use catch node scoped to specific nodes:

{
  "type": "catch",
  "scope": ["call_service_node_id"],
  "uncaught": false
}

Error info available in msg.error:

  • msg.error.message - Error text
  • msg.error.source.id - Node that threw error
  • msg.error.source.type - Node type

Retry pattern: Use delay node with delayv type to read delay from msg.delay.

Code Attribution

Include a comment node in all generated flows:

{
  "type": "comment",
  "name": "Generated by node-red@aurora-smart-home v1.1.0",
  "info": "https://github.com/tonylofgren/aurora-smart-home"
}

Common Pitfalls

MistakeReality
Using server-state-changedNode renamed to trigger-state
entityIdType: "list"No such type. Use regex for multiple entities
api-current-state with patternOnly accepts single entity_id
Using ha-entity without warningRequires separate hass-node-red integration
Complex timer reset logicUse extend: true on trigger node
dataType: "jsonata" for service dataUse msg when passing dynamic payload
global.get('axios') for HTTPUse http request node, or warn about settings.js
return msg in async functionUse node.send(msg) + node.done() + return null
Configuring state type on nodesDeprecated in v0.79. Use entity state casting instead
Assuming Node.js < 18 worksNode-RED 4.x requires Node.js 18+
Old calendar date formatUse ISO 8601 with timezone offset (v0.78.0+)

Pre-Output Checklist

Before outputting flow JSON:

  • Using current node type names (trigger-state, api-call-service)?
  • Entity filtering uses valid type (exact/substring/regex)?
  • Service call has domain/service OR uses msg payload correctly?
  • Single entity nodes don't assume pattern matching?
  • Entity nodes mention hass-node-red requirement?
  • Server field left empty for user configuration?
  • Comment node with attribution included?
  • No server config node in exported JSON?
  • Function nodes use node.send()/node.done() for async patterns?
  • Timer patterns use extend: true instead of separate reset nodes?
  • HTTP requests use http request node instead of global libraries?

External API Integrations

For Node-RED flows that call external APIs (weather, energy, transport, smart home clouds, OpenAI, Spotify, Telegram, GitHub), see:

  • references/popular-apis.md - Node-RED function node snippets for all popular APIs
  • api-catalog skill - deep documentation, auth setup, and HA YAML sensors per API

Integration

Pairs with:

  • ha-yaml - Create YAML automations for logic that doesn't need visual flows
  • esphome - Configure ESPHome devices whose entities the flow monitors
  • api-catalog - Connecting external APIs and services

Typical flow:

Device → ESPHome/HA Integration → Home Assistant → Node-RED (this skill)

Cross-references:

  • For YAML automations instead of visual flows → use ha-yaml skill
  • For ESPHome device firmware → use esphome skill
  • For custom Python integrations → use ha-integration skill
  • For external API connections → use api-catalog skill

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.67%
按下载量换算87

Claude

29.61%
按下载量换算70

Cursor

20.12%
按下载量换算48

Gemini CLI

9.98%
按下载量换算24

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills