用户
 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

1

主题

3

帖子

141

积分

注册会员

Rank: 2

积分
141
2019-9-24 18:21:57 mabel198866 注册会员 楼主 1217
本文为mabel198866原创文章,未经许可,严禁转载!
如经许可转载时务必注明原作者mabel198866及原始链接,并注明“发表于ioBroker中国”,转载不得对作品进行修改。 https://bbs.iobroker.cn/thread-340-1-1.html
本帖最后由 mabel198866 于 2019-9-24 18:28 编辑

以下分享是群里各位大佬耐心指导下完成的!!!!

家里新装房子,浴缸在2楼,本来主卧也放在1楼,但是每天爬楼梯好累,就搬到1楼住了。
所以泡澡不知道水满没有,一直去看是很累的,现在看了这个,就会让你很轻松了!

需要设备:
1.一台可以运行node red的机器,各种NAS和PI,这个略过。
2.米家多功能网关+水浸传感器。(PS:如果新装房子还未竣工,可以考虑使用两个电磁水阀,接混水阀的冷热水,配合恒温龙头,水位达到指定位置可以自动关水。)

实现流程:
1.安装Node Red。额,这个自己找找教程吧,我的是群辉Docker安装的。
2.安装xiaoai TTS节点。

安装成功左边会多这两个东西。

3.测试小爱节点是否成功接入,成功接入会有成功获取某某设备的提示。
这是测试流程,选择中间的设备列表,把你自己的账号密码填进去,填好以后记得要保存和更新。


点击部署,然后点时间戳,就会成功获取设备。

这是测试节点:
[AppleScript] 纯文本查看 复制代码
[{"id":"975cbf2e.40c2b","type":"tab","label":"流程3","disabled":false,"info":""},{"id":"360e8ef9.c82a12","type":"inject","z":"975cbf2e.40c2b","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":80,"wires":[["3f0d481d.c38ee8"]]},{"id":"3f0d481d.c38ee8","type":"xiaoai-devices","z":"975cbf2e.40c2b","name":"小爱音箱","xiaoai":"dbd3bf2b.a4321","x":260,"y":80,"wires":[["625b7b69.5004e4"]]},{"id":"625b7b69.5004e4","type":"debug","z":"975cbf2e.40c2b","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":430,"y":80,"wires":[]},{"id":"dbd3bf2b.a4321","type":"xiaoai-tts-configurator","z":"","name":"小爱音箱","username":"yourname","password":"yourpassword"}]

4.通过米家多功能网关将水浸传感器接入node red。我是安装了HA然后安装HA的插件接入的,不知道还有没有其他方法。
5.填写水浸传感器状态变为on,即浸水状态,小爱语音TTS播报洗澡水放好的信息。这是洗澡水OK的节点
[JavaScript] 纯文本查看 复制代码
[{"id":"fc787aaa.53e298","type":"tab","label":"浴缸OK","disabled":false,"info":""},{"id":"da0c0cc0.6912a","type":"server-state-changed","z":"fc787aaa.53e298","name":"水浸传感器","server":"1bfd4f2a.a1d621","version":1,"entityidfilter":"binary_sensor.water_leak_sensor_158d000343da4a","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":80,"y":60,"wires":[["c87026ff.a3bf28"],[]]},{"id":"c87026ff.a3bf28","type":"xiaoai-tts","z":"fc787aaa.53e298","name":"洗澡水OK播报","xiaoai":"dbd3bf2b.a4321","tts":"主人你的洗澡水已经放好了,请您准备沐浴了哦!","device":"","x":280,"y":60,"wires":[["cb822dc8.ca009"],[]]},{"id":"cb822dc8.ca009","type":"debug","z":"fc787aaa.53e298","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":490,"y":60,"wires":[]},{"id":"1bfd4f2a.a1d621","type":"server","z":"","name":"black","legacy":false,"hassio":false,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true},{"id":"dbd3bf2b.a4321","type":"xiaoai-tts-configurator","z":"","name":"小爱音箱","username":"yourname","password":"yourpassword"}]


对了,要把节点的用户密码改为你的才能用,另外,把用于浴缸的水浸传感器联动报警关闭,不然每次网关都会警铃大作,很煞风景的!






7.jpg
使用道具 举报 回复
感谢群友分享,学习
使用道具 举报 回复 支持 反对
发新帖
您需要登录后才可以回帖 登录 | 立即注册