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

 找回密码
 立即注册
楼主: David_dongye

[硬件DIY] 涂鸦红外遥控器刷ESPHome

[复制链接]

0

主题

3

帖子

24

积分

新手上路

Rank: 1

积分
24
金钱
21
HASS币
0
发表于 2023-7-14 01:34:39 | 显示全部楼层
带温湿度的可以搞吗
回复

使用道具 举报

0

主题

2

帖子

58

积分

注册会员

Rank: 2

积分
58
金钱
56
HASS币
0
发表于 2023-7-21 10:40:14 | 显示全部楼层
能否更进一步接入smartir呢,加上温湿度传感器,模拟出一个完整的空调。。
我发现每次开关空调的raw code都不一样,有点难搞
回复

使用道具 举报

3

主题

64

帖子

1673

积分

金牌会员

Rank: 6Rank: 6

积分
1673
金钱
1609
HASS币
0
发表于 2023-8-20 22:22:59 | 显示全部楼层
TUYA-CONVERT,这项目对新固件没用
回复

使用道具 举报

0

主题

14

帖子

102

积分

注册会员

Rank: 2

积分
102
金钱
88
HASS币
0
发表于 2023-8-28 19:10:17 | 显示全部楼层
点赞
回复

使用道具 举报

5

主题

35

帖子

140

积分

注册会员

Rank: 2

积分
140
金钱
105
HASS币
0
发表于 2023-9-26 23:46:36 | 显示全部楼层
tine 发表于 2023-7-14 01:34
带温湿度的可以搞吗

同问,看到有带温湿度的红外

                               
登录/注册后可看大图
回复

使用道具 举报

0

主题

15

帖子

90

积分

注册会员

Rank: 2

积分
90
金钱
75
HASS币
0
发表于 2023-10-13 16:22:34 | 显示全部楼层
qiudaomao 发表于 2023-7-21 10:40
能否更进一步接入smartir呢,加上温湿度传感器,模拟出一个完整的空调。。
我发现每次开关空调的raw code都 ...

空调的遥控码没有标准协议, 基本上每个品牌都不一样,不同的机型也可能不同, 空调遥控码每次发送会更新所有的状态, 会同时更新温度,风速,扫风方向,定时值等所有的状态值和效验, 有些复杂的遥控器比如格力的部分遥控器 ,  一些功能如风速定时等功能还会导致发送几次不同的编码(后面的编码会覆盖前面的部分编码定义), 所以每次开关机你会发现raw  code不一样,其实很多不一样的部分是因为空调的当前状态和上次的状态不一样,比如时间值 ,所以万能遥控器基本只能控制部分功能.  模拟遥控器的完全功能,除非拿到空调厂家给的遥控码定义, 就只能自己把原装遥控器不同状态的码接收下来对比分析.分析不同字段的含义,并猜测破解出效验码的计算方法.
回复

使用道具 举报

2

主题

148

帖子

821

积分

高级会员

Rank: 4

积分
821
金钱
673
HASS币
0
发表于 2024-3-18 13:51:28 | 显示全部楼层
dscao 发表于 2023-2-16 14:50
什么都不懂时就买了一个,一直闲置着,好几年了。现在去拆开看看,也折腾一下。
怎么拆开呀,找了半天没看 ...

请问这个服务怎么生成的?需要些配置文件吗?
回复

使用道具 举报

2

主题

148

帖子

821

积分

高级会员

Rank: 4

积分
821
金钱
673
HASS币
0
发表于 2024-3-18 13:58:20 | 显示全部楼层
请问这个按钮只能写6个吗?我写了10几个,实际能看到的只有6个,而且顺序还乱了。
回复

使用道具 举报

4

主题

55

帖子

1159

积分

金牌会员

Rank: 6Rank: 6

积分
1159
金钱
1104
HASS币
20
 楼主| 发表于 2024-3-18 16:46:34 | 显示全部楼层
summ99111 发表于 2024-3-18 13:58
请问这个按钮只能写6个吗?我写了10几个,实际能看到的只有6个,而且顺序还乱了。
...

template button加多少个都行啊,只要name不一样就好了
回复

使用道具 举报

2

主题

148

帖子

821

积分

高级会员

Rank: 4

积分
821
金钱
673
HASS币
0
发表于 2024-3-18 19:23:10 | 显示全部楼层
David_dongye 发表于 2024-3-18 16:46
template button加多少个都行啊,只要name不一样就好了

谢谢老哥回复
这是我根据你的配置写的
麻烦帮我看看   我写了4个开关  但是只显示3个开关
esphome:
  name: tuya-ir-1

esp8266:
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "12345678"
ota:
  password: "12345678"

wifi:
  ssid: Xiaomi_60A4
  password: abcD@0808

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "tuya-ir-121"
    password: "12345678"
  manual_ip:
    static_ip: 192.168.31.66   #自己定义的地址
    gateway: 192.168.31.1       #网关
    subnet: 255.255.255.0   
  
captive_portal:
 
remote_receiver:
  pin: 
    number: GPIO5
    inverted: True
    mode: INPUT_PULLUP
  dump: raw
  idle: 40ms

remote_transmitter:
  pin: GPIO14
  carrier_duty_percent: 50%
 
switch:
  - platform: template
    name: "客厅空调"
    id: esp32_ac_swi
    turn_on_action:
      then:
        - switch.template.publish:
            id: esp32_ac_swi
            state: ON
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3252, -1635, 419, -393, 419, -420, 366, -1236, 420, -394, 415, -1211, 416, -396, 393, -420, 419, -402, 418, -1210, 419, -1208, 419, -393, 392, -420, 421, -418, 391, -1215, 413, -1210, 417, -404, 419, -393, 420, -393, 417, -396, 417, -394, 418, -421, 392, -396, 418, -393, 419, -402, 392, -422, 392, -419, 417, -397, 416, -394, 419, -1209, 418, -394, 420, -394, 418, -429, 392, -395, 416, -395, 420, -419, 392, -395, 417, -1212, 419, -391, 418, -396, 418, -402, 419, -419, 394, -1208, 419, -1209, 421, -1206, 419, -1209, 418, -1208, 418, -1211, 416, -1222, 418, -1207, 417, -397, 417, -395, 391, -1236, 417, -397, 418, -393, 419, -392, 421, -401, 418, -395, 416, -395, 419, -393, 420, -419, 393, -1210, 417, -1210, 418, -394, 416, -406, 419, -1210, 416, -394, 420, -393, 416, -396, 418, -1210, 418, -395, 417, -1209, 420, -402, 420, -1208, 418, -394, 391, -421, 419, -394, 418, -394, 392, -446, 392, -395, 419, -402, 391, -448, 391, -395, 390, -422, 417, -396, 419, -396, 415, -395, 417, -395, 418, -404, 415, -397, 417, -395, 421, -392, 417, -394, 417, -396, 420, -395, 417, -393, 390, -431, 417, -396, 394, -420, 415, -396, 416, -396, 418, -395, 417, -395, 417, -396, 417, -403, 417, -394, 419, -394, 417, -397, 417, -395, 418, -395, 418, -395, 416, -395, 419, -403, 414, -398, 416, -397, 417, -395, 416, -399, 414, -396, 418, -1209, 417, -396, 418, -403, 419, -392, 419, -1208, 418, -1211, 419, -1209, 391, -1236, 415, -397, 417, -1210, 418, -395, 419]  #这个code改成自己识别到的raw码
   
    turn_off_action:
      then:
        - switch.template.publish:
            id: esp32_ac_swi
            state: OFF
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3252, -1637, 415, -398, 417, -395, 418, -1210, 391, -422, 415, -1214, 391, -419, 392, -421, 416, -404, 392, -1236, 418, -1209, 420, -394, 419, -392, 417, -396, 404, -1224, 417, -1210, 419, -402, 394, -419, 416, -397, 418, -395, 390, -422, 417, -394, 420, -392, 419, -395, 391, -430, 417, -395, 420, -392, 417, -422, 392, -394, 416, -1212, 416, -396, 420, -394, 417, -402, 418, -395, 419, -394, 446, -366, 420, -392, 419, -1209, 418, -394, 418, -395, 417, -403, 418, -396, 419, -1207, 418, -396, 418, -394, 418, -395, 416, -395, 419, -393, 420, -401, 399, -1230, 420, -392, 420, -1208, 417, -1211, 419, -1207, 420, -1208, 418, -1209, 419, -1210, 416]  #这个code改成自己识别到的raw码             

  - platform: template
    name: "空调强劲风"
    id: esp32_fan_swi
    turn_on_action:
      then:
        - switch.template.publish:
            id: esp32_fan_swi
            state: ON
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3255, -1635, 416, -396, 419, -419, 390, -1238, 391, -396, 418, -1210, 420, -395, 420, -389, 420, -402, 418, -1208, 420, -1207, 422, -418, 391, -420, 392, -395, 403, -1225, 420, -1207, 418, -403, 418, -395, 418, -420, 394, -420, 390, -396, 418, -397, 416, -394, 417, -394, 392, -456, 391, -395, 418, -394, 420, -394, 417, -394, 419, -1209, 418, -394, 392, -421, 419, -402, 417, -396, 416, -396, 421, -391, 419, -394, 419, -1209, 415, -396, 418, -396, 418, -402, 420, -1208, 417, -396, 416, -395, 418, -1210, 417, -1210, 419, -1211, 420, -390, 417, -405, 417, -394, 421, -1220, 379, -1237, 420, -391, 418, -397, 416, -420, 365, -1237, 418, -1210, 416]  #这个code改成自己识别到的raw码
   
    turn_off_action:
      then:
        - switch.template.publish:
            id: esp32_fan_swi
            state: OFF
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3253, -1636, 418, -395, 418, -398, 413, -1211, 421, -392, 417, -1210, 397, -441, 393, -395, 420, -402, 417, -1208, 419, -1209, 418, -396, 418, -394, 416, -397, 416, -1210, 418, -1208, 394, -430, 389, -423, 417, -395, 392, -421, 417, -394, 417, -396, 420, -393, 419, -394, 419, -401, 418, -395, 418, -393, 418, -397, 416, -394, 417, -1210, 419, -395, 415, -397, 417, -405, 419, -392, 419, -394, 393, -444, 390, -398, 417, -1211, 423, -389, 391, -422, 416, -404, 392, -1237, 416, -395, 418, -394, 419, -1210, 416, -1210, 419, -1209, 420, -393, 418, -403, 418, -394, 418, -1210, 418, -1210, 417, -395, 418, -394, 419, -394, 417, -1210, 418, -1210, 419]  #这个code改成自己识别到的raw码             

  - platform: template
    name: "电视盒子"
    id: esp32_box_swi
    turn_on_action:
      then:
        - switch.template.publish:
            id: esp32_box_swi
            state: ON
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [8980, -2292, 547]

    turn_off_action:
      then:
        - switch.template.publish:
            id: esp32_box_swi
            state: OFF
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [9007, -2290, 518] 
              
  - platform: template
    name: "电视"
    id: esp32_TV_swi
    turn_on_action:
      then:
        - switch.template.publish:
            id: esp32_TV_swi
            state: ON
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3989, -3998, 528, -1997, 526, -1998, 526, -1998, 526, -1998, 527, -991, 525, -993, 527, -1995, 528, -990, 526, -1998, 525, -997, 522, -1997, 526, -994, 525, -990, 527, -992, 527, -990, 526, -992, 526, -1997, 526, -2001, 524, -991, 526, -1999, 525, -993, 525, -1997, 527, -992, 525, -1998, 475, -8949, 3989, -3999, 527, -1998, 525, -1999, 525, -1999, 527, -1996, 526, -992, 526, -992, 526, -1999, 528, -989, 526, -1997, 526, -993, 528, -1996, 527, -994, 524, -991, 528, -989, 528, -990, 528, -989, 530, -1994, 528, -1996, 529, -989, 529, -1995, 529, -989, 529, -1995, 530, -989, 528, -1994, 478, -8947, 4017, -3971, 531, -1993, 531, -1993, 530, -1995, 530, -1994, 531, -987, 530, -987, 530, -1994, 557, -961, 555, -1969, 530, -989, 530, -1992, 531, -988, 530, -987, 534, -984, 531, -987, 556, -961, 556, -1968, 532, -1992, 531, -988, 530, -1993, 532, -987, 530, -1994, 529, -988, 531, -1993, 479]  #这个code改成自己识别到的raw码
   
    turn_off_action:
      then:
        - switch.template.publish:
            id: esp32_TV_swi
            state: OFF
        - remote_transmitter.transmit_raw:
              carrier_frequency: 38kHz
              code: [3991, -3995, 529, -1996, 528, -1996, 525, -1999, 526, -1998, 527, -991, 525, -992, 526, -1997, 527, -991, 527, -1999, 522, -994, 526, -1998, 526, -992, 524, -993, 526, -991, 527, -991, 526, -991, 525, -1999, 526, -1998, 529, -989, 526, -1998, 525, -992, 528, -1996, 526, -992, 525, -1999, 475, -8948, 3990, -3998, 526, -1999, 525, -1999, 525, -1998, 528, -1998, 525, -992, 525, -992, 527, -1997, 526, -992, 530, -1994, 527, -990, 526, -1998, 526, -992, 526, -992, 527, -990, 525, -993, 525, -992, 526, -1998, 527, -1997, 525, -993, 526, -1998, 527, -991, 525, -2000, 525, -992, 526, -1997, 475, -8949, 3991, -3998, 525, -2000, 527, -1999, 524, -1999, 527, -1996, 526, -991, 525, -993, 525, -1999, 526, -992, 527, -1999, 524, -991, 527, -1998, 528, -989, 528, -990, 529, -989, 526, -993, 525, -991, 529, -1996, 526, -1998, 526, -992, 527, -1996, 529, -989, 529, -1994, 530, -989, 529, -1994, 478]  #这个code改成自己识别到的raw码             

web_server:
  port: 80
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-1 07:03 , Processed in 0.057959 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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