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

 找回密码
 立即注册
楼主: alei643

[教程系列] Node Red系列教程之三 实现Node Red与Home Assistant之间的联动

  [复制链接]

0

主题

6

帖子

164

积分

注册会员

Rank: 2

积分
164
金钱
158
HASS币
0
发表于 2023-9-4 16:30:02 | 显示全部楼层
感谢分享
回复

使用道具 举报

0

主题

4

帖子

22

积分

新手上路

Rank: 1

积分
22
金钱
18
HASS币
0
发表于 2023-9-4 23:05:52 | 显示全部楼层
学习学习中
回复

使用道具 举报

0

主题

10

帖子

82

积分

注册会员

Rank: 2

积分
82
金钱
72
HASS币
0
发表于 2023-9-5 10:16:41 | 显示全部楼层
来学习一下
回复

使用道具 举报

3

主题

12

帖子

93

积分

注册会员

Rank: 2

积分
93
金钱
81
HASS币
0
发表于 2023-9-5 18:17:49 | 显示全部楼层
学习一下
回复

使用道具 举报

0

主题

6

帖子

30

积分

新手上路

Rank: 1

积分
30
金钱
24
HASS币
0
发表于 2023-9-6 15:08:38 | 显示全部楼层
6666666666
回复

使用道具 举报

0

主题

5

帖子

84

积分

注册会员

Rank: 2

积分
84
金钱
79
HASS币
0
发表于 2023-9-6 17:27:15 | 显示全部楼层
[{"id":"6e11a160.6d6be","type":"api-current-state","z":"f5950339.f19eb","name":"1","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.3dda_yin_ji","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":600,"wires":[["2c1c2fbe.6e96b"]]},{"id":"cb413974.57de98","type":"inject","z":"f5950339.f19eb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":600,"wires":[["6e11a160.6d6be"]]},{"id":"136cad8f.c63692","type":"debug","z":"f5950339.f19eb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":720,"wires":[]},{"id":"2c1c2fbe.6e96b","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":600,"wires":[["1779c547.64fceb"]]},{"id":"1779c547.64fceb","type":"api-current-state","z":"f5950339.f19eb","name":"2","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.zhu_wo_dian_feng_shan","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":660,"wires":[["fb97adc9.a3515"]]},{"id":"1d6752b6.771ebd","type":"api-current-state","z":"f5950339.f19eb","name":"3","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.chuang_tou_cha_zuo","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":720,"wires":[["f6b17eac.be82f"]]},{"id":"fb97adc9.a3515","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state2","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":660,"wires":[["1d6752b6.771ebd"]]},{"id":"f6b17eac.be82f","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state3","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":720,"wires":[["5b059ca6.aa2474"]]},{"id":"5b059ca6.aa2474","type":"function","z":"f5950339.f19eb","name":"","func":"if(flow.get('state1') == 'on' && flow.get('state2') == 'on' && flow.get('state3') == 'on'){\n    msg.payload = '你想发送的东西'\n    return msg;\n}else{\n    msg.state1 = flow.get('state1')\n    msg.state2 = flow.get('state2')\n    msg.state3 = flow.get('state3')\n    return msg\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":720,"wires":[["136cad8f.c63692"]]},{"id":"19170cf5.155303","type":"server","name":"Home Assistant"}][{"id":"6e11a160.6d6be","type":"api-current-state","z":"f5950339.f19eb","name":"1","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.3dda_yin_ji","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":600,"wires":[["2c1c2fbe.6e96b"]]},{"id":"cb413974.57de98","type":"inject","z":"f5950339.f19eb","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":90,"y":600,"wires":[["6e11a160.6d6be"]]},{"id":"136cad8f.c63692","type":"debug","z":"f5950339.f19eb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":730,"y":720,"wires":[]},{"id":"2c1c2fbe.6e96b","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state1","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":600,"wires":[["1779c547.64fceb"]]},{"id":"1779c547.64fceb","type":"api-current-state","z":"f5950339.f19eb","name":"2","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.zhu_wo_dian_feng_shan","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":660,"wires":[["fb97adc9.a3515"]]},{"id":"1d6752b6.771ebd","type":"api-current-state","z":"f5950339.f19eb","name":"3","server":"19170cf5.155303","version":1,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","override_topic":false,"entity_id":"switch.chuang_tou_cha_zuo","state_type":"str","state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","blockInputOverrides":false,"x":230,"y":720,"wires":[["f6b17eac.be82f"]]},{"id":"fb97adc9.a3515","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state2","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":660,"wires":[["1d6752b6.771ebd"]]},{"id":"f6b17eac.be82f","type":"change","z":"f5950339.f19eb","name":"","rules":[{"t":"move","p":"payload","pt":"msg","to":"state3","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":410,"y":720,"wires":[["5b059ca6.aa2474"]]},{"id":"5b059ca6.aa2474","type":"function","z":"f5950339.f19eb","name":"","func":"if(flow.get('state1') == 'on' && flow.get('state2') == 'on' && flow.get('state3') == 'on'){\n    msg.payload = '你想发送的东西'\n    return msg;\n}else{\n    msg.state1 = flow.get('state1')\n    msg.state2 = flow.get('state2')\n    msg.state3 = flow.get('state3')\n    return msg\n}\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":590,"y":720,"wires":[["136cad8f.c63692"]]},{"id":"19170cf5.155303","type":"server","name":"Home Assistant"}]
回复

使用道具 举报

1

主题

8

帖子

116

积分

注册会员

Rank: 2

积分
116
金钱
108
HASS币
0
发表于 2023-9-6 21:15:54 | 显示全部楼层
学习学习
回复

使用道具 举报

5

主题

43

帖子

255

积分

中级会员

Rank: 3Rank: 3

积分
255
金钱
212
HASS币
0
发表于 2023-9-7 17:23:12 | 显示全部楼层
支持一下,有空测试
回复

使用道具 举报

2

主题

22

帖子

159

积分

注册会员

Rank: 2

积分
159
金钱
137
HASS币
0
发表于 2023-9-8 13:20:03 | 显示全部楼层
感谢分享
回复

使用道具 举报

2

主题

17

帖子

130

积分

注册会员

Rank: 2

积分
130
金钱
113
HASS币
0
发表于 2023-9-8 15:28:50 | 显示全部楼层
来学习了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-25 21:33 , Processed in 0.163351 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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