├── .travis.yml
├── CONTRIBUTING.md
├── LICENSE.txt
├── README.md
├── README_en.md
├── deploy.py
├── id_rsa.enc
├── release_note.md
└── src
├── architecture.svg
├── connect.jpg
├── device_setting.jpg
├── discovery.jpg
├── donate-alipay.jpg
├── donate-wechat.jpg
├── ir_led.jpg
├── ir_receiver.jpg
├── main.jpg
├── mqtt.jpg
├── nodemcu.jpg
├── parse.jpg
├── select.jpg
├── sequence.jpg
├── struction.png
└── transistor.jpg
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | branches:
3 | only:
4 | - master
5 | script: echo 'build'
6 | before_install:
7 | - openssl aes-256-cbc -K $encrypted_9b2d7e19d83c_key -iv $encrypted_9b2d7e19d83c_iv
8 | -in id_rsa.enc -out ~/.ssh/id_rsa -d
9 | addons:
10 | ssh_know_hosts:
11 | - ssh.caffreyfans.top:222
12 | # after_success:
13 | # - chmod 600 ~/.ssh/id_rsa
14 | # - ssh root@ssh.caffreyfans.top -p 222 'bash /root/IRbaby_deploy/start.sh'
15 | deploy:
16 | provider: script
17 | script:
18 | - chmod 600 ~/.ssh/id_rsa
19 | - ssh root@ssh.caffreyfans.top -p 222 'bash /root/IRbaby_deploy/start.sh'
20 | on:
21 | tags: true
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | @Caffreyfans
2 | @Strawmanbobi
3 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020 IRbaby
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # IRbaby
2 | **中文版 | [English](README_en.md)**
3 |
4 | IRbaby 使用 [IRext](https://github.com/irext/irext-core) 开源红外库(**由于某些原因该仓库已关闭,相关网站已下架,但是码库服务仍然提供**),提供数以万计的红外设备遥控编码。IRbaby 是一个 ESP8266 万能红外方案,配合硬件支持达到类似于市面上售卖的万能红外遥控。并且只需对其进行简单设置就可以快速部署在[HomeAssisant](https://www.home-assistant.io)。
5 |
6 | [](https://forthebadge.com)
7 |
8 | ---
9 |
10 | ## 特点
11 |
12 | * IRext 强大红外码库
13 | * 基于 ESP8266 的芯片
14 | * 提供 MQTT API
15 | * 提供 UDP API
16 | * 支持录码
17 | * 离线解码
18 | * HomeAssistant 自动发现
19 | * LED 工作指示灯
20 | ---
21 |
22 | ## 架构图
23 | 
24 | ## 开始使用
25 | > 1. **下载 ESP8266 固件并烧写到设备。[IRbaby-firmware](https://github.com/Caffreyfans/IRbaby-firmware/releases)**
26 | > 2. **设备上电,移动端搜索连接到 `ESP**` 信号,并在浏览器中输入 `192.168.4.1` 对设备进行联网设置**
27 | > 3. **下载 `Android` 客户端并运行,对设备进行 MQTT 和红外收发引脚设定。[IRbaby-android](https://github.com/Caffreyfans/IRbaby-android/releases)**
28 | > 4. **匹配电器,完成控制, HomeAssistant 用户可在控制界面导出配置文件(现已支持 HomeAssistant 自动发现功能,设备添加之后,可直接在 HA 集成中看到)**
29 |
30 | > **IRbaby目前仍处于开发阶,目前的交互协议可能随时改变,不保证向后兼容,升级新版本时需要注意公告说明同时升级固件和客户端。**
31 |
32 | ## 六步连接HomeAssistant
33 | **[效果演示视频](https://www.bilibili.com/video/BV13K411j7QD)**
34 |
35 | ||||
36 | |---|---|---|
37 | | | | |
38 | | | | |
39 |
40 | ## 材料
41 | ### 红外接收头可选(如果需要录码功能)
42 | |||
43 | |---|---|
44 | | |  |
45 |  |  |
46 |
47 | ## 关于连线
48 |
49 | 
50 |
51 | `备注:红外二级管连接的时候也可以尝试不用三级管,直接连接。红外二级管长引脚接gpio,短脚接地。红外接收头的话就照着上图标示的那样与模块连接。红外接收头非必须,如果你不使用录码功能可忽略红外接收头。只要你有一个红外发射管和一块 ESP8266 和一部 Android 手机就可以尝试该项目。另外目前项目只支持空调控制,其他功能暂不支持,后续会添加。控制客户端目前也只支持 Android,跨平台客户端也在后续添加中`
52 |
53 | ## 附加下载地址
54 | 如果你有在 **github releases** 下载文件过慢的问题,请在 [https://irbaby.caffreyfans.top](https://irbaby.caffreyfans.top) 下在对应文件
55 |
56 | ## 捐赠
57 | |支付宝|微信|
58 | |---|---|
59 |
|
60 |
61 | ## 特别感谢
62 | [Strawmanbobi](https://github.com/strawmanbobi) IRext开源库的作者,给予我技术和精神上的支持。
63 |
--------------------------------------------------------------------------------
/README_en.md:
--------------------------------------------------------------------------------
1 |
7 | ## IRbaby
8 | **[中文版](README.md) | English**
9 |
10 | **IRbaby use [IRext](https://irext.net/) private IR library, it provide tens of thousands of infrared device remote control codes. IRbaby is an ESP8266 complete IR control program, with hardware support to achieve a universal infrared remote control effect similar to that on the market. And it can be quickly deployed in HomeAssistant by simply setting it up.**
11 |
12 | [](https://forthebadge.com)
13 |
14 | ---
15 |
16 | ## Features
17 |
18 | * IRext powerful IR libaray
19 | * support MQTT control api
20 | * support UDP control api
21 | * support record IR raw signal
22 | * offline decoding
23 | * Homeassistant mqtt auto discovery
24 | * LED indicator light
25 |
26 | ## Architecture
27 |
28 | 
29 |
30 | ## Setup
31 |
32 | > 1. **Download ESP8266 firmware and flash to device. [IRbaby-firmware](https://github.com/Caffreyfans/IRbaby-firmware/releases)**
33 | > 2. **Power on the device, search for the signal connected to the `ESP etc.` on the mobile phone, and enter `192.168.4.1` in the browser to set up the network**
34 | > 3. **Download `Android` client and run it on phone, set the MQTT and IR receiver and transceiver pins of the device [IRbaby-android](https://github.com/Caffreyfans/IRbaby-android/releases)**
35 |
36 | ## Connect to Homeassistant
37 |
38 | | | | |
39 | | ------------------------------------------------------------ | ------------------------------------------------------------ | --------------------------------------------------------- |
40 | |  |  |  |
41 | |  |  |  |
42 |
43 | ## material
44 | ### IR receiver optional (if recording function is required)
45 | | | |
46 | | --------------------------------------------------------- | ----------------------------------------------------------- |
47 | |  |  |
48 |  |  |
49 |
50 | ## About line connection
51 |
52 | 
53 |
54 | Remarks: When connecting the infrared diode, you can also try to connect directly without the tertiary tube. The long pin of the infrared diode is connected to GPIO, and the short pin is grounded. If the infrared receiver is connected to the module as shown on the icon. The infrared receiver is not necessary, if you do not use the code recording function, you can ignore the infrared receiver. As long as you have an infrared transmitter, an ESP8266 and an Android phone, you can try this project. In addition, the current project only supports air-conditioning control, other functions are temporarily not supported, and will be added later. The control client currently only supports Android, and the cross-platform client is also being added later
55 |
56 |
57 |
58 | ## Special thanks to
59 | [Strawmanbobi](https://github.com/strawmanbobi) the author of IRext private IR library, give me technical and spiritual support.
60 |
--------------------------------------------------------------------------------
/deploy.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/python3
2 | import requests
3 | import json
4 | import os
5 | os.system('rm -r IRbaby_deploy_tmp')
6 | os.system('mkdir -p IRbaby_deploy_tmp')
7 | url = 'https://api.github.com/repos/Caffreyfans/IRbaby-firmware/releases/latest'
8 | response = requests.get(url)
9 | data = json.loads(response.text)
10 | download_url = data['assets'][0]['browser_download_url']
11 | tag_name = data["tag_name"]
12 | os.system('wget ' + download_url)
13 | os.system('unzip -d IRbaby_deploy_tmp IRbaby.zip')
14 | os.system('rm IRbaby.zip')
15 | url = 'https://api.github.com/repos/Caffreyfans/IRbaby-android/releases/latest'
16 | response = requests.get(url)
17 | data = json.loads(response.text)
18 | download_url = data['assets'][0]['browser_download_url']
19 | os.system('wget ' + download_url + ' -P IRbaby_deploy_tmp')
20 | os.system("rm -rf /var/www/irbaby/latest/")
21 | os.system('mkdir -p /var/www/irbaby/' + tag_name)
22 | os.system('mkdir -p /var/www/irbaby/latest')
23 | os.system('cp -r IRbaby_deploy_tmp/* /var/www/irbaby/latest')
24 | os.system('mkdir -p /var/www/irbaby/' + tag_name)
25 | os.system('cp -r IRbaby_deploy_tmp/* /var/www/irbaby/' + tag_name)
--------------------------------------------------------------------------------
/id_rsa.enc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/id_rsa.enc
--------------------------------------------------------------------------------
/release_note.md:
--------------------------------------------------------------------------------
1 | * 2020-11-15,0.9,添加安卓客户端删除设备同步到 HomeAssistant 功能。
2 | * 2020-08-29,0.8,添加 HomeAssistant 自动发现功能,修复 MQTT 控制异常。
3 | * 2020-08-20, 0.7, 修复 MQTT 设置失败错误。
4 | * 2020-08-17, 0.6, 修复 APP 中引脚显示错误问题。
5 |
6 |
--------------------------------------------------------------------------------
/src/architecture.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/connect.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/connect.jpg
--------------------------------------------------------------------------------
/src/device_setting.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/device_setting.jpg
--------------------------------------------------------------------------------
/src/discovery.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/discovery.jpg
--------------------------------------------------------------------------------
/src/donate-alipay.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/donate-alipay.jpg
--------------------------------------------------------------------------------
/src/donate-wechat.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/donate-wechat.jpg
--------------------------------------------------------------------------------
/src/ir_led.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/ir_led.jpg
--------------------------------------------------------------------------------
/src/ir_receiver.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/ir_receiver.jpg
--------------------------------------------------------------------------------
/src/main.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/main.jpg
--------------------------------------------------------------------------------
/src/mqtt.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/mqtt.jpg
--------------------------------------------------------------------------------
/src/nodemcu.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/nodemcu.jpg
--------------------------------------------------------------------------------
/src/parse.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/parse.jpg
--------------------------------------------------------------------------------
/src/select.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/select.jpg
--------------------------------------------------------------------------------
/src/sequence.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/sequence.jpg
--------------------------------------------------------------------------------
/src/struction.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/struction.png
--------------------------------------------------------------------------------
/src/transistor.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Caffreyfans/IRbaby/6e9e611d7c163eeba73645c50f7cce297b6c7cb2/src/transistor.jpg
--------------------------------------------------------------------------------