『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 5737|回复: 0

[教程系列] 关于Node-red与Homeassistant对接问题

[复制链接]

7

主题

40

帖子

579

积分

高级会员

Rank: 4

积分
579
金钱
539
HASS币
0
发表于 2021-7-22 23:18:20 | 显示全部楼层 |阅读模式
本帖最后由 logan 于 2021-7-22 23:19 编辑

设备通过homeassistant的Zigbee Home Automation集成ZHA对接了Aqara的六键场景开关
1.png

实体属性只有一个电量显示,Zigbee的设备签名如下


{
  "node_descriptor": "NodeDescriptor(byte1=2, byte2=64, mac_capability_flags=128, manufacturer_code=4447, maximum_buffer_size=127, maximum_incoming_transfer_size=100, server_mask=11264, maximum_outgoing_transfer_size=100, descriptor_capability_field=0, *allocate_address=True, *complex_descriptor_available=False, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=True, *is_full_function_device=False, *is_mains_powered=False, *is_receiver_on_when_idle=False, *is_router=False, *is_security_capable=False, *is_valid=True, *logical_type=<LogicalType.EndDevice: 2>, *user_descriptor_available=False)",
  "endpoints": {
    "1": {
      "profile_id": 260,
      "device_type": "0x0105",
      "in_clusters": [
        "0x0000",
        "0x0001",
        "0x0003",
        "0x0012",
        "0xfcc0"
      ],
      "out_clusters": [
        "0x0003",
        "0x0006",
        "0x0008",
        "0x0300"
      ]
    },
    "2": {
      "profile_id": 260,
      "device_type": "0x0103",
      "in_clusters": [
        "0x0003"
      ],
      "out_clusters": [
        "0x0003",
        "0x0006"
      ]
    },
    "3": {
      "profile_id": 260,
      "device_type": "0x0103",
      "in_clusters": [
        "0x0003",
        "0x0012"
      ],
      "out_clusters": [
        "0x0006"
      ]
    },
    "4": {
      "profile_id": 260,
      "device_type": "0x0103",
      "in_clusters": [
        "0x0003",
        "0x0012"
      ],
      "out_clusters": [
        "0x0006"
      ]
    },
    "5": {
      "profile_id": 260,
      "device_type": "0x0103",
      "in_clusters": [
        "0x0003",
        "0x0012"
      ],
      "out_clusters": [
        "0x0006"
      ]
    },
    "6": {
      "profile_id": 260,
      "device_type": "0x0103",
      "in_clusters": [
        "0x0003",
        "0x0012"
      ],
      "out_clusters": [
        "0x0006"
      ]
    }
  },
  "manufacturer": "LUMI",
  "model": "lumi.remote.b686opcn01",
  "class": "zhaquirks.xiaomi.aqara.opple_remote.RemoteB686OPCN01V5"
}


原先在Node-red中控制Homeassistant是通过node-red-contrib-home-assistant-websocket,读取home assistant指定ID开关的状态,然后执行相对应动作。


2.png


现在没有了home assistant的实体,尝试读取电量实体获取不到开关按压状态。如果想通过node-red对homeassistant自动化编程,应该如何操作?感谢求教!





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-21 22:03 , Processed in 1.118152 second(s), 25 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表