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

 找回密码
 立即注册
查看: 13637|回复: 14

[教程系列] 求大神写一篇node-red直接配置小米网关和配件的教程

[复制链接]

10

主题

154

帖子

583

积分

高级会员

Rank: 4

积分
583
金钱
429
HASS币
0
发表于 2019-1-17 18:13:10 | 显示全部楼层 |阅读模式
小白对ha中的代码都搞不懂。希望求大神写一篇node-red直接配置小米网关和配件的教程。非常感谢!
回复

使用道具 举报

23

主题

1338

帖子

6769

积分

超级版主

Rank: 8Rank: 8

积分
6769
金钱
5406
HASS币
100

教程狂人

发表于 2019-1-17 21:29:17 | 显示全部楼层
建议不要发这种帖子
回复

使用道具 举报

8

主题

2073

帖子

6057

积分

论坛元老

流水无味

Rank: 8Rank: 8

积分
6057
金钱
3984
HASS币
145

灌水之王

发表于 2019-1-18 13:23:32 | 显示全部楼层
你看 惹上面的大神不高兴了
回复

使用道具 举报

40

主题

3056

帖子

1万

积分

超级版主

Nero

Rank: 8Rank: 8

积分
11149
金钱
8042
HASS币
182
发表于 2019-1-18 14:38:12 | 显示全部楼层
nodered点top
Nero
回复

使用道具 举报

0

主题

114

帖子

1166

积分

金牌会员

Rank: 6Rank: 6

积分
1166
金钱
1052
HASS币
0
发表于 2019-2-12 20:20:43 | 显示全部楼层
同求。。。。。。。
回复

使用道具 举报

10

主题

154

帖子

583

积分

高级会员

Rank: 4

积分
583
金钱
429
HASS币
0
 楼主| 发表于 2019-2-13 17:26:46 | 显示全部楼层
lyymg 发表于 2019-2-12 20:20
同求。。。。。。。

我搞明白了,我发两个图你看下就明白了。需要注意的就是配置网关节点的时候,要一起把子设备录入。还有就是把ha里面小米网关给屏蔽掉。要不网关在nodered里面容易掉线。
网关节点配置图

网关节点配置图

网关节点配置图

控制设备

控制设备

读取设备状态

读取设备状态
回复

使用道具 举报

0

主题

114

帖子

1166

积分

金牌会员

Rank: 6Rank: 6

积分
1166
金钱
1052
HASS币
0
发表于 2019-2-13 22:38:49 | 显示全部楼层
刚开始弄,很多都没搞懂,能详细点吗?
比如设置按无线开关,控制2个灯同时开关,如何设置?
node red 参考点东西太少了
回复

使用道具 举报

7

主题

74

帖子

285

积分

中级会员

Rank: 3Rank: 3

积分
285
金钱
211
HASS币
0
发表于 2019-2-13 22:50:02 | 显示全部楼层
感觉我安装node-red都出问题了
回复

使用道具 举报

10

主题

154

帖子

583

积分

高级会员

Rank: 4

积分
583
金钱
429
HASS币
0
 楼主| 发表于 2019-2-14 11:44:10 | 显示全部楼层
scibs 发表于 2019-2-13 23:17
学习学习,有附代码么
[{"id":"d0efcbfd.c8e268","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"烘鞋器","sid":"158d000119a388","onmsg":"","offmsg":"","output":"0","x":608,"y":1093,"wires":[["fdf5d00a.07068"]]},{"id":"fdf5d00a.07068","type":"xiaomi-actions on","z":"79c48968.9b53a8","name":"","x":781,"y":1093,"wires":[["7368444b.d333bc"]]},{"id":"ab3ef10c.9eb9a","type":"xiaomi-actions off","z":"79c48968.9b53a8","name":"","x":782,"y":1140,"wires":[["7368444b.d333bc"]]},{"id":"7368444b.d333bc","type":"xiaomi-gateway out","z":"79c48968.9b53a8","name":"客厅小米网关","gateway":"432f4ad8.ac0c44","ip":"192.168.1.12","x":981,"y":1286,"wires":[]},{"id":"1670ff9d.35dcd","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"烘鞋器","sid":"158d000119a388","onmsg":"","offmsg":"","output":"0","x":610,"y":1140,"wires":[["ab3ef10c.9eb9a"]]},{"id":"9ea729f7.e09a28","type":"switch","z":"79c48968.9b53a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":456,"y":1120,"wires":[["d0efcbfd.c8e268"],["1670ff9d.35dcd"]]},{"id":"ed12017e.e7e01","type":"function","z":"79c48968.9b53a8","name":"","func":"on1=msg.payload.On;\nglobal.set("on1",on1);\nvar msg= { payload:on1};\nreturn msg;","outputs":1,"noerr":0,"x":327,"y":1120,"wires":[["9ea729f7.e09a28"]]},{"id":"1d42b7be.f5a218","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"电热毯插座","sid":"158d00014cd8fb","onmsg":"","offmsg":"","output":"0","x":626,"y":1208,"wires":[["d1b20e97.e17e"]]},{"id":"d1b20e97.e17e","type":"xiaomi-actions on","z":"79c48968.9b53a8","name":"","x":779,"y":1208,"wires":[["7368444b.d333bc"]]},{"id":"13ee6dbf.297742","type":"xiaomi-actions off","z":"79c48968.9b53a8","name":"","x":780,"y":1255,"wires":[["7368444b.d333bc"]]},{"id":"1c7d65bd.26520a","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"电热毯插座","sid":"158d00014cd8fb","onmsg":"","offmsg":"","output":"0","x":628,"y":1255,"wires":[["13ee6dbf.297742"]]},{"id":"9c92c526.670308","type":"switch","z":"79c48968.9b53a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":454,"y":1235,"wires":[["1d42b7be.f5a218"],["1c7d65bd.26520a"]]},{"id":"7355f941.428ed8","type":"function","z":"79c48968.9b53a8","name":"","func":"on1=msg.payload.On;\nglobal.set("on1",on1);\nvar msg= { payload:on1};\nreturn msg;","outputs":1,"noerr":0,"x":325,"y":1235,"wires":[["9c92c526.670308"]]},{"id":"b3396320.2f0e1","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"功放插座","sid":"158d0001a3558f","onmsg":"","offmsg":"","output":"0","x":618,"y":1333,"wires":[["8540968a.d398f8"]]},{"id":"8540968a.d398f8","type":"xiaomi-actions on","z":"79c48968.9b53a8","name":"","x":781,"y":1333,"wires":[["7368444b.d333bc"]]},{"id":"a2105129.316ef","type":"xiaomi-actions off","z":"79c48968.9b53a8","name":"","x":782,"y":1380,"wires":[["7368444b.d333bc"]]},{"id":"dfe205f1.85c198","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"功放插座","sid":"158d0001a3558f","onmsg":"","offmsg":"","output":"0","x":620,"y":1380,"wires":[["a2105129.316ef"]]},{"id":"ffd40104.4d022","type":"switch","z":"79c48968.9b53a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":456,"y":1360,"wires":[["b3396320.2f0e1"],["dfe205f1.85c198"]]},{"id":"791d1f5.00d71e","type":"function","z":"79c48968.9b53a8","name":"","func":"on1=msg.payload.On;\nglobal.set("on1",on1);\nvar msg= { payload:on1};\nreturn msg;","outputs":1,"noerr":0,"x":327,"y":1360,"wires":[["ffd40104.4d022"]]},{"id":"e70e9fc5.d69e9","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"投影插座","sid":"158d0002524ea2","onmsg":"","offmsg":"","output":"0","x":616,"y":1451,"wires":[["b331dea7.aa8fe"]]},{"id":"b331dea7.aa8fe","type":"xiaomi-actions on","z":"79c48968.9b53a8","name":"","x":779,"y":1451,"wires":[["7368444b.d333bc"]]},{"id":"1ba772a0.148c1d","type":"xiaomi-actions off","z":"79c48968.9b53a8","name":"","x":780,"y":1498,"wires":[["7368444b.d333bc"]]},{"id":"9395f276.727e1","type":"xiaomi-plug","z":"79c48968.9b53a8","gateway":"432f4ad8.ac0c44","name":"投影插座","sid":"158d0002524ea2","onmsg":"","offmsg":"","output":"0","x":618,"y":1498,"wires":[["1ba772a0.148c1d"]]},{"id":"b587dc7b.b4a97","type":"switch","z":"79c48968.9b53a8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"true"},{"t":"false"}],"checkall":"true","repair":false,"outputs":2,"x":454,"y":1478,"wires":[["e70e9fc5.d69e9"],["9395f276.727e1"]]},{"id":"21d45f2a.e73a8","type":"function","z":"79c48968.9b53a8","name":"","func":"on1=msg.payload.On;\nglobal.set("on1",on1);\nvar msg= { payload:on1};\nreturn msg;","outputs":1,"noerr":0,"x":325,"y":1478,"wires":[["b587dc7b.b4a97"]]},{"id":"7e89352e.ac5fbc","type":"homekit-service","z":"79c48968.9b53a8","bridge":"3b4f10d7.df067","name":"烘鞋器插座","serviceName":"Outlet","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"{}","x":180,"y":1122,"wires":[["ed12017e.e7e01"]]},{"id":"f450f7ee.b48cd8","type":"homekit-service","z":"79c48968.9b53a8","bridge":"3b4f10d7.df067","name":"电热毯插座","serviceName":"Outlet","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"{}","x":183,"y":1236,"wires":[["7355f941.428ed8"]]},{"id":"7863e76f.88b138","type":"homekit-service","z":"79c48968.9b53a8","bridge":"3b4f10d7.df067","name":"功放插座","serviceName":"Outlet","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"{}","x":169,"y":1361,"wires":[["791d1f5.00d71e"]]},{"id":"c6a5030e.dcbbc","type":"homekit-service","z":"79c48968.9b53a8","bridge":"3b4f10d7.df067","name":"投影插座","serviceName":"Outlet","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number","characteristicProperties":"{}","x":172,"y":1478,"wires":[["21d45f2a.e73a8"]]},{"id":"432f4ad8.ac0c44","type":"xiaomi-configurator","z":"","name":"客厅小米网关","ip":"192.168.1.12","sid":"","deviceList":[{"sid":"158d00014cd8fb","desc":"电热毯插座","model":"plug"},{"sid":"158d000119a388","desc":"烘鞋器","model":"plug"},{"sid":"158d0001563b18","desc":"无线开关","model":"switch"},{"sid":"158d0002524ea2","desc":"投影插座","model":"plug"},{"sid":"158d0001a3558f","desc":"功放插座","model":"plug"}],"key":"F9656A013C054BDA"},{"id":"3b4f10d7.df067","type":"homekit-bridge","z":"","bridgeName":"插座","pinCode":"411-11-111","port":"","manufacturer":"Default Manufacturer","model":"Default Model","serialNo":"Default Serial Number"}]

回复

使用道具 举报

0

主题

114

帖子

1166

积分

金牌会员

Rank: 6Rank: 6

积分
1166
金钱
1052
HASS币
0
发表于 2019-4-16 22:24:36 | 显示全部楼层
太难了。完全不明白
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-22 15:59 , Processed in 0.058677 second(s), 35 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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