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

 找回密码
 立即注册
查看: 15300|回复: 29

[技术探讨] 关于人体感应自动开灯的一个想法

[复制链接]

2

主题

37

帖子

127

积分

注册会员

Rank: 2

积分
127
金钱
90
HASS币
0
发表于 2018-10-25 09:01:26 来自手机 | 显示全部楼层 |阅读模式
看到大佬们写的关于厕所等自动开关,做不到人走灯灭长时间不动不能触发人体感应的问题,有一个想法不知道是否可行,

两个人体感应位置如下
   
门口~感应1~感应2~马桶

1设置只触发关灯命令,2只设置只触发开灯命令。


这样的话即可做到人来等亮人走灯灭,  除非你在上厕所的时候又进来一个人,这样灯会灭一下再亮,
只是一个想法,还没有试过。
回复

使用道具 举报

123

主题

4661

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
16410
金钱
11664
HASS币
45
发表于 2018-10-25 09:16:09 | 显示全部楼层
终极方案人体计数,即将出炉
回复

使用道具 举报

2

主题

68

帖子

278

积分

中级会员

Rank: 3Rank: 3

积分
278
金钱
210
HASS币
0
发表于 2018-10-25 09:22:54 来自手机 | 显示全部楼层
Jones 发表于 2018-10-25 09:16
终极方案人体计数,即将出炉

这个好   什么时候能出啊   期待
回复

使用道具 举报

175

主题

2967

帖子

7606

积分

超级版主

我就是六神

Rank: 8Rank: 8

积分
7606
金钱
4614
HASS币
398

活跃会员教程狂人灌水之王

QQ
发表于 2018-10-25 09:36:11 | 显示全部楼层
Jones 发表于 2018-10-25 09:16
终极方案人体计数,即将出炉

我看某宝PW已经实现了 半成品,还有一点地方不恰当再改
回复

使用道具 举报

219

主题

1287

帖子

7945

积分

超级版主

Rank: 8Rank: 8

积分
7945
金钱
6628
HASS币
86

教程狂人论坛风云人物突出贡献

发表于 2018-10-25 09:40:43 | 显示全部楼层
如果是小米人体感应的话,这样做是行不通的.
马桶的话,可以考虑用门磁
回复

使用道具 举报

8

主题

2073

帖子

6053

积分

论坛元老

流水无味

Rank: 8Rank: 8

积分
6053
金钱
3980
HASS币
145

灌水之王

发表于 2018-10-25 09:41:01 | 显示全部楼层
目前用的 洗手间整体人体+大门门磁+浴室门门磁+镜灯激光次测距+马桶激光测距……
就是复杂了点 但是基本无错!
回复

使用道具 举报

9

主题

358

帖子

3113

积分

论坛元老

Rank: 8Rank: 8

积分
3113
金钱
2755
HASS币
0
发表于 2018-10-25 10:58:29 | 显示全部楼层
xieahui 发表于 2018-10-25 09:41
目前用的 洗手间整体人体+大门门磁+浴室门门磁+镜灯激光次测距+马桶激光测距……
就是复杂了点 但是基本无 ...

马桶激光测距....可否分享一下
回复

使用道具 举报

2

主题

68

帖子

278

积分

中级会员

Rank: 3Rank: 3

积分
278
金钱
210
HASS币
0
发表于 2018-10-25 11:48:12 | 显示全部楼层
xieahui 发表于 2018-10-25 09:41
目前用的 洗手间整体人体+大门门磁+浴室门门磁+镜灯激光次测距+马桶激光测距……
就是复杂了点 但是基本无 ...

分享下激光测距
回复

使用道具 举报

8

主题

870

帖子

5218

积分

论坛元老

Rank: 8Rank: 8

积分
5218
金钱
4348
HASS币
0
发表于 2018-10-25 19:22:03 | 显示全部楼层
感应1~感应2的范围不能叠加,这个要怎么处理?
回复

使用道具 举报

8

主题

2073

帖子

6053

积分

论坛元老

流水无味

Rank: 8Rank: 8

积分
6053
金钱
3980
HASS币
145

灌水之王

发表于 2018-10-26 08:02:39 | 显示全部楼层
本帖最后由 xieahui 于 2018-10-26 08:05 编辑
jozhi 发表于 2018-10-25 10:58
马桶激光测距....可否分享一下

用的NodeMcu Lua WIFI V3+SR04P (或SR04+ p和+是宽电平版不用电平转换)
刷的ESPeasy,Tasmota有10秒延迟要自己编辑
接线参照SR04接线,其实宽电平版直接接完事。
我没用 "Value"数值模式,用的"State"状态模式,只显示1和0
原因:如果测同一直线上多个位置建议用 "Value",但是只测某一点话建议用"State",
1和0只在变化时才更新到HA,而value下一直是跳动的。
自动化用的node red:
思路是指定时间段,触发开就开镜灯和同时倒计时5秒关镜灯,开和关状态变化会重置5秒时间
5秒过后延时半秒重新检测是否关状态而关镜灯,马桶思路更简单,只要洗手间关灯环节加个马桶状态重置时间即可
HA的自动化写这种情况好麻烦的 建议一起用 那边好用用那边!
[{"id":"909ec44d.8146b8","type":"api-call-service","z":"fbb2e5ba.4f10c8","name":"打开镜灯","server":"69284790.527278","service_domain":"switch","service":"turn_on","data":"{"entity_id": "switch.espv31a"}","mergecontext":"","x":980,"y":360,"wires":[[]]},{"id":"65dccaa4.1f48d4","type":"comment","z":"fbb2e5ba.4f10c8","name":"洗手间镜灯","info":"","x":100,"y":340,"wires":[]},{"id":"97a9c380.eb7b2","type":"switch","z":"fbb2e5ba.4f10c8","name":"筛选状态","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":440,"y":380,"wires":[["d010a8f7.7f1b38","6be699a2.c561a8"],["d010a8f7.7f1b38"]]},{"id":"e6d89071.63229","type":"time-range-switch","z":"fbb2e5ba.4f10c8","name":"","lat":"28.2870742103","lon":"121.0694003105","startTime":"06:59","endTime":"17:30","startOffset":"17:31","endOffset":"06:58","x":270,"y":380,"wires":[[],["97a9c380.eb7b2"]]},{"id":"d010a8f7.7f1b38","type":"stoptimer","z":"fbb2e5ba.4f10c8","duration":"5","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":680,"y":420,"wires":[["80a623ed.572ee"],[]]},{"id":"3aa1687c.cdbef8","type":"api-call-service","z":"fbb2e5ba.4f10c8","name":"关闭镜灯","server":"69284790.527278","service_domain":"switch","service":"turn_off","data":"{"entity_id": "switch.espv31a"}","mergecontext":"","x":1140,"y":480,"wires":[[]]},{"id":"de008e8.6289f7","type":"delay","z":"fbb2e5ba.4f10c8","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":470,"y":480,"wires":[["64bf3961.bb14b8"]]},{"id":"6147c12b.6d72e","type":"server-state-changed","z":"fbb2e5ba.4f10c8","name":"镜灯感应","server":"69284790.527278","entityidfilter":"binary_sensor.xsjjd","entityidfiltertype":"substring","haltifstate":"","x":100,"y":380,"wires":[["e6d89071.63229"]]},{"id":"6be699a2.c561a8","type":"api-current-state","z":"fbb2e5ba.4f10c8","name":"镜灯关","server":"69284790.527278","halt_if":"on","override_topic":true,"override_payload":true,"entity_id":"switch.espv31a","x":650,"y":360,"wires":[["1721656.ee42f9b"]]},{"id":"80a623ed.572ee","type":"switch","z":"fbb2e5ba.4f10c8","name":"确认状态","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"off","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":860,"y":420,"wires":[["de008e8.6289f7"]]},{"id":"3211e1da.4ebc4e","type":"api-current-state","z":"fbb2e5ba.4f10c8","name":"镜灯开","server":"69284790.527278","halt_if":"off","override_topic":true,"override_payload":true,"entity_id":"switch.espv31a","x":810,"y":480,"wires":[["1d670cfe.bc1853"]]},{"id":"64bf3961.bb14b8","type":"api-current-state","z":"fbb2e5ba.4f10c8","name":"感应无人","server":"69284790.527278","halt_if":"on","override_topic":true,"override_payload":true,"entity_id":"binary_sensor.xsjjd","x":660,"y":480,"wires":[["3211e1da.4ebc4e"]]},{"id":"1721656.ee42f9b","type":"api-current-state","z":"fbb2e5ba.4f10c8","name":"暂停自动化","server":"69284790.527278","halt_if":"off","override_topic":true,"override_payload":true,"entity_id":"input_boolean.testxishoujian","x":810,"y":360,"wires":[["909ec44d.8146b8"]]},{"id":"1d670cfe.bc1853","type":"api-current-state","z":"fbb2e5ba.4f10c8","name":"暂停自动化","server":"69284790.527278","halt_if":"off","override_topic":true,"override_payload":true,"entity_id":"input_boolean.testxishoujian","x":970,"y":480,"wires":[["3aa1687c.cdbef8"]]},{"id":"69284790.527278","type":"server","z":"","name":"Home Assistant","url":"http://192.168.203.203:8123","pass":"2222222222"}]




回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-24 09:02 , Processed in 1.394074 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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