请选择 进入手机版 | 继续访问电脑版

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

 找回密码
 立即注册
查看: 21411|回复: 25

小奇智能家居中控系统

[复制链接]

3

主题

62

帖子

407

积分

论坛技术达人

积分
407
金钱
335
HASS币
60
发表于 2020-3-7 10:23:10 | 显示全部楼层 |阅读模式
本帖最后由 liujiaqi 于 2020-3-7 10:23 编辑

本帖适合正在装修的用户,因为安装这个东西需要重新下线!
      前不久看某鱼,esp8266又涨价了,想我这种学生党(穷B),多买几个简直就是要了血命,正巧手里有一个Arduino Mega 2560,和一个esp-01所以我就在设计,能不能实现esp8266负责联网通讯,然后Arduino负责数据处理采集和控制,试了一下,完全ok!
先上测试图:
0153575bb9825fa801213dea84fddc2.gif

分部控制

集合控制

集合控制

集合控制(为了这个我苦思了2天)

QQ浏览器截图20200307095749.png

数据采集(因为是仿真所以数据不真实)

3153575bb9825fa801213dea84fddc2.gif

人体感应检查



    关于人体感应给大家讲讲这些系统的一些创新的地方,声音辅助人体感应,所谓的声音辅助人体感应就是指在人体感应的基础上又添加了一道声音识别防止发生误判断。给大家演示一些。


5.gif

启动“声音辅助人体感应”后只感应到人体灯不会亮

6.gif

当声音和人体感应同时检测到的时候灯才会亮


     以上就是演示内容,还有一些细节例如TM1638控制面板(因为仿真程序没有这个集成块),就没有给大家演示。这时有人就会问了,为啥只有模拟测试,其实我在实体开发板上也调试过了,但是后来因为高考原因就被家长收起来了,也没有在拿出来安装。目前我手头只有一个esp8266,所以我就决定用protues模拟,并用串口与esp8266通讯。随便跟大家说一下protues的一个心得(坑):ttl不能并联!(不要想着可以两个串口并联控制一台设备)。
efa39264bb924331a21058ae8b5e359.jpg
我的艰苦开发环境


好了寒暄完了,我们聊正事:


先看一下接线图:(我家是两厅

搜狗截图20200307101031.png
大家可以选择性安装。下面是一下参考名词:(我英语60分
搜狗截图20200307101211.png


然后是HA配置:
light:
  - platform: mqtt
    name: "客厅的灯"
    command_topic: "homeassistant/light/LivLight/set"
    state_topic: "homeassistant/light/LivLight/state"
  - platform: mqtt
    name: "餐厅的灯"
    command_topic: "homeassistant/light/EatLight/set"
    state_topic: "homeassistant/light/EatLight/state"
  - platform: mqtt
    name: "大卧室的灯"
    command_topic: "homeassistant/light/BbadLight/set"
    state_topic: "homeassistant/light/BbadLight/state"
  - platform: mqtt
    name: "洗手间的灯"
    command_topic: "homeassistant/light/WashLight/set"
    state_topic: "homeassistant/light/WashLight/state"
  - platform: mqtt
    name: "厨房的灯"
    command_topic: "homeassistant/light/KitLight/set"
    state_topic: "homeassistant/light/KitLight/state"
  - platform: mqtt
    name: "小卧室的灯"
    command_topic: "homeassistant/light/LbadLight/set"
    state_topic: "homeassistant/light/LbadLight/state"
switch:
  - platform: mqtt
    name: "启用客厅人体感应"
    command_topic: "homeassistant/switch/LivCheckuse/set"
    state_topic: "homeassistant/switch/LivCheckuse/state"
  - platform: mqtt
    name: "启用餐厅人体感应"
    command_topic: "homeassistant/switch/EatCheckuse/set"
    state_topic: "homeassistant/switch/EatCheckuse/state"  
  - platform: mqtt
    name: "启用卫生间人体感应"
    command_topic: "homeassistant/switch/WashCheckuse/set"
    state_topic: "homeassistant/switch/WashCheckuse/state"
  - platform: mqtt
    name: "启动声音辅助人体感应"
    command_topic: "homeassistant/switch/voiceauxiliary/set"
    state_topic: "homeassistant/switch/voiceauxiliary/state"
  - platform: mqtt
    name: "启动照明系统"
    command_topic: "homeassistant/switch/power/set"
    state_topic: "homeassistant/switch/power/state"
  - platform: mqtt
    name: "无线模块升级"
    command_topic: "homeassistant/switch/espupdata/set"
    state_topic: "homeassistant/switch/espupdata/state"
binary_sensor:
  - platform: mqtt
    name: "客厅人体感应"
    state_topic: "homeassistant/sensor/LivCheck/state"
    device_class: motion
  - platform: mqtt
    name: "餐厅人体感应"
    state_topic: "homeassistant/sensor/EatCheck/state"
    device_class: motion  
  - platform: mqtt
    name: "卫生间人体感应"
    state_topic: "homeassistant/sensor/WashCheck/state"
    device_class: motion 
sensor:
  - platform: mqtt
    state_topic: "homeassistant/sensor/temperature"
    name: "室内温度"
    device_class: temperature
    unit_of_measurement: "℃"
  - platform: mqtt
    state_topic: "homeassistant/sensor/humidity"
    name: "室内湿度"
    device_class: humidity
    unit_of_measurement: "%"
  - platform: mqtt
    state_topic: "homeassistant/sensor/voice"
    name: "声音强度"
    device_class: signal_strength
    unit_of_measurement: "dB"  
  - platform: mqtt
    state_topic: "homeassistant/sensor/illuminance"
    name: "室内光线强度"
    device_class: illuminance
    unit_of_measurement: "lx" 
接下来说一下我的开发进度:我正在研究天猫精灵接入,和全局自动化,以及添加红外控制功能。但是由于高考原因我会缓慢更新。
大家如果喜欢(催更)的话可以评论个666。
谢谢大家听我磨叽了这么多,最后作为礼物,把还没有成熟的ESP8266 代码给大家,可以参考参考,希望大家喜欢。 sketch_mar01a.zip (9.18 KB, 下载次数: 20)


0153575bb9825fa801213dea84fddc2.gif

评分

参与人数 2金钱 +40 HASS币 +20 收起 理由
27hh + 20 666!
+ 20 + 20 中国智能家居的未来,就靠你们了!.

查看全部评分

回复

使用道具 举报

3

主题

62

帖子

407

积分

论坛技术达人

积分
407
金钱
335
HASS币
60
 楼主| 发表于 2020-3-7 10:33:31 | 显示全部楼层
自己顶一下
回复

使用道具 举报

0

主题

6

帖子

49

积分

新手上路

Rank: 1

积分
49
金钱
43
HASS币
0
发表于 2020-3-7 10:33:57 | 显示全部楼层
6666666
回复

使用道具 举报

26

主题

2095

帖子

8459

积分

论坛元老

Rank: 8Rank: 8

积分
8459
金钱
6359
HASS币
30

论坛元老

发表于 2020-3-7 11:28:14 | 显示全部楼层
本帖最后由 情非殇 于 2020-3-7 11:34 编辑

其实我想说,这个改造下线要多花很多钱的,有这个钱,能买多少8266

等等,高考?卧槽,现在的小孩子都这么屌么!!!
回复

使用道具 举报

6

主题

243

帖子

1864

积分

金牌会员

Rank: 6Rank: 6

积分
1864
金钱
1621
HASS币
0
发表于 2020-3-7 12:28:18 | 显示全部楼层
楼主牛B
666
回复

使用道具 举报

0

主题

204

帖子

1011

积分

金牌会员

Rank: 6Rank: 6

积分
1011
金钱
807
HASS币
0
发表于 2020-3-7 13:58:53 | 显示全部楼层
666
准备高考了,英语分数有待提高啊
回复

使用道具 举报

1

主题

237

帖子

962

积分

论坛积极会员

积分
962
金钱
725
HASS币
0
发表于 2020-3-7 15:38:01 | 显示全部楼层
高中就玩这么6,牛BI的
回复

使用道具 举报

123

主题

4620

帖子

1万

积分

管理员

囧死

Rank: 9Rank: 9Rank: 9

积分
15961
金钱
11256
HASS币
45
发表于 2020-3-7 16:29:27 | 显示全部楼层
论坛最鲜肉技术达人出炉
回复

使用道具 举报

9

主题

787

帖子

3819

积分

论坛元老

Rank: 8Rank: 8

积分
3819
金钱
3032
HASS币
87
发表于 2020-3-7 16:41:10 | 显示全部楼层
666
高三都这么屌,大学一定要选好专业哦
回复

使用道具 举报

9

主题

518

帖子

2275

积分

金牌会员

Rank: 6Rank: 6

积分
2275
金钱
1757
HASS币
0
发表于 2020-3-7 17:40:45 | 显示全部楼层
重点是高考。。。。。。。


我觉得我要封箱。。。。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-3-28 17:39 , Processed in 0.062283 second(s), 36 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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