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

 找回密码
 立即注册
查看: 643|回复: 4

[求助] ha怎么处理tasmota的接收红外

[复制链接]

4

主题

61

帖子

263

积分

中级会员

Rank: 3Rank: 3

积分
263
金钱
202
HASS币
0
发表于 2024-6-28 11:21:40 | 显示全部楼层 |阅读模式
本帖最后由 qingvsyu 于 2024-7-2 09:29 编辑

我现在是tasmota连接咯 红外发送和红外接收 {1FC38F25-3F9F-4c98-9777-1B63B9DD438F}.png
file:///C:/Users/qingv/AppData/Local/Temp/%7B1FC38F25-3F9F-4c98-9777-1B63B9DD438F%7D.png
我是科龙空调 ,下面是接收的码
{CB38857A-52BB-476a-A4D1-489CFAA60FAC}.png

这是文本
04:05:42.531 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"rotocol":"KELON","Bits":48,"Data":"0xC2000683","DataLSB":"0x430060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Cool","ower":"On","Celsius":"On","Temp":30,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:06:40.380 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"rotocol":"KELON","Bits":48,"Data":"0x20000683","DataLSB":"0x40060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Heat","ower":"On","Celsius":"On","Temp":20,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:07:08.789 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"rotocol":"KELON","Bits":48,"Data":"0x71000683","DataLSB":"0x8E0060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Auto","ower":"On","Celsius":"On","Temp":25,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:07:12.879 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"rotocol":"KELON","Bits":48,"Data":"0x74030683","DataLSB":"0x2EC060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Fan","ower":"On","Celsius":"On","Temp":25,"FanSpeed":"Low","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:07:16.354 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"rotocol":"KELON","Bits":48,"Data":"0x73000683","DataLSB":"0xCE0060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Dry","ower":"On","Celsius":"On","Temp":25,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:07:20.572 MQT: tele/tasmota_ED6BE3/RESULT = {"IrReceived":{"Protocol":"KELON","Bits":48,"Data":"0xC2000683","DataLSB":"0x430060C1","Repeat":0,"IRHVAC":{"Vendor":"KELON","Model":-1,"Command":"Control","Mode":"Cool","Power":"On","Celsius":"On","Temp":30,"FanSpeed":"Auto","SwingV":"Auto","SwingH":"Off","Quiet":"Off","Turbo":"Off","Econo":"Off","Light":"On","Filter":"Off","Clean":"Off","Beep":"On","Sleep":-1,"iFeel":"Off","SensorTemp":null}}}
04:08:06.238 MQT: tele/tasmota_ED6BE3/STATE = {"Time":"2024-06-28T04:08:06","Uptime":"0T00:05:12","UptimeSec":312,"Vcc":3.017,"Heap":26,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":1,"Wifi":{"AP":1,"SSId":"Redmi","BSSId":"9C:9D:7E:57:532","Channel":1,"Mode":"11n","RSSI":96,"Signal":-52,"LinkCount":1,"Downtime":"0T00:00:06"}}
上面是各种模式的..红外码
6baf45c0c3853723e3b99a94ab2d057e.png 上面是ha的界面..很详细 大家也可以参考下哈哈..
进过 后面找到咯https://github.com/hristo-atanasov/Tasmota-IRHVAC 这个组件来配合mqtt控制红外。。
昨天成功咯。。。
下一步是从这个仓库下载文件,获取名为“tasmota_irhvac”的文件夹,并将其放置在“custom_components”文件夹中。重新启动家庭助手!
重新启动后,将“configuration. yaml”中的配置添加到“configuration.yaml”文件中
tasmota_irhvac

按照上面的步骤安装咯

然后就是修改咯 配置咯 。直接上我的 给大家参考
  #科龙空调 开始
  - platform: tasmota_irhvac
    <span style="background-color: rgb(255, 140, 0);">name: "kelon_AC"
    unique_id: kelon_ac
    command_topic: "cmnd/tasmota_D5223A/irhvac"</span>
    # Pick one of the following:
    # State is updated when the tasmota device receives an IR signal (includes own transmission and original remote)
    # useful when a normal remote is in use alongside the tasmota device, may be less reliable than the second option.
    #state_topic: "<span style="background-color: rgb(244, 164, 96);">tele/tasmota_D5223A/RESULT"</span>
    # State is updated when the tasmota device completes IR transmissionm, should be pretty reliable.
    state_topic: "<span style="background-color: rgb(244, 164, 96);">stat/tasmota_D5223A/RESULT</span>"
    # Optional second state topic, This option allows you to subscribe to both "tele" and "stat" messages.
    #state_topic_2: "<span style="background-color: rgb(244, 164, 96);">stat/tasmota_D5223A/RESULT</span>"
    # Uncomment if your 'available topic' of Tasmota IR device are different (if device in HA is disabled)
    #availability_topic: <span style="background-color: rgb(255, 165, 0);">"tele/tasmota_D5223A/LWT"</span>
    temperature_sensor: sensor.kitchen_temperature
    humidity_sensor: sensor.kitchen_humidity #optional - default None
    power_sensor: binaly_sensor.kitchen_ac_power #optional - default None
    vendor: "<span style="background-color: rgb(255, 165, 0);">WHIRLPOOL_AC"#空调的协议</span>
    # When operating grouped devices at the same time, MQTT commands are intentionally delayed to prevent multiple devices
    # from performing the same operation at the same time. This allows the high current peaks to be shifted.
    #当同时操作分组设备时,MQTT命令会故意延迟,以防止多个设备 
    #防止同时执行相同的操作。这允许高电流峰值发生偏移。
    mqtt_delay: 0.0 #optional - default 0 int or 0.0 float value in [sec].
    min_temp: 18 #optional - default 16 int value
    max_temp: 32 #optional - default 32 int value
    target_temp: 26 #optional - default 26 int value
    initial_operation_mode: "off" # optional - default "off" string value (one of the "supported_modes")
    away_temp: 24 #离开模式的温度optional - default 24 int value
    precision: 1 #精度optional - default 1 int or float value. Can be set to 1, 0.5 or 0.1
    #空调工作模式
    supported_modes:
      - "heat"
      - "cool"
      - "dry"
      - "fan_only" # Use "fan_only" even if Tasmota shows "Mode":"Fan"
      - "auto"
      - "off" #Turns the AC off - Should be in quotes
      # Some devices have "auto" and "fan_only" switched
      # If the following two lines are uncommented, "auto" and "fan" shoud be commented out
      #- "auto_fan_only" #if remote shows fan but tasmota says auto
      #- "fan_only_auto" #if remote shows auto but tasmota says fan
      #风扇转速
    supported_fan_speeds:
      # Some devices say max,but it is high, and auto which is max
      # If you uncomment the following two, you have to comment high and max
      # - "auto_max" #woud become max
      # - "max_high" #would become high
      #- "on"
      #- "off"
      - "low"
      - "medium"
      - "high"
      #- "middle"
      #- "focus"
      #- "diffuse"
      #- "min"
      #- "max"
      - "auto"
      #风向*
    supported_swing_list:
      - "off"
      - "vertical" #up to down
      # - "horizontal" # Left to right
      # - "both"
    default_quiet_mode: "Off" #optional - default "Off" string value
    default_turbo_mode: "Off" #optional - default "Off" string value
    default_econo_mode: "Off" #optional - default "Off" string value
    hvac_model: "DG11J13A" #optional - default "1" string value
    celsius_mode: "On" #optional - default "On" string value
    default_light_mode: "Off" #optional - default "Off" string value
    default_filter_mode: "Off" #optional - default "Off" string value
    default_beep_mode: "Off" #optional - default "Off" string value
    default_sleep_mode: "-1" #optional - default "-1" string value
    default_swingv: "high" #optional - default "" string value
    default_swingh: "left" #optional - default "" string value 
    keep_mode_when_off: False #optional - default False boolean value : Must be True for MITSUBISHI_AC, ECOCLIM, etc.
    toggle_list: #optional - default []
      # The toggled property is a setting that does not retain the On state.
      # Set this if your AC properties are toggle function.
      #- Beep
      #- Econo
      #- Filter
      #- Light
      #- Quiet
      - Sleep
      #- SwingH
      - SwingV
      #- Turbo
# When turning off some devices with their remote control they are set to the lowest temperature
# and this is shown on the thermostat card. Setting `ignore_off_temp` value to True will keep the last target temperature displayed on the card.
#ignore_off_temp: False #optional - default False boolean value

# Example configuration.yaml entry
上面 标红是必须要修改的,下面就按照你自己空调修改。我也 还没有 研究明白。。
。。。。。

  "Clock": 1184, 发射的红外编码里面 -后面我还多咯一个这个。。|
我是在改咯原码里面注释掉的,,,
climate.py
复制过来 有底色 ???打开这个文件。。。
找的后面1249行
#"Clock": int(_min),
注释掉,保存 。
然后重启 就可以咯。。

然后在建空调卡片 就可以遥控咯,,,
现在接收的不能同步 ,不知道是哪里问题的,至少看到咯希望。。之前那些 我都没有成功。。。。发出红外 。嘎嘎



回复

使用道具 举报

0

主题

31

帖子

364

积分

中级会员

Rank: 3Rank: 3

积分
364
金钱
333
HASS币
0
发表于 2024-6-28 22:19:26 | 显示全部楼层
这是要求助什么…
回复

使用道具 举报

4

主题

61

帖子

263

积分

中级会员

Rank: 3Rank: 3

积分
263
金钱
202
HASS币
0
 楼主| 发表于 2024-7-1 17:09:42 | 显示全部楼层
sang131313 发表于 2024-6-28 22:19
这是要求助什么…

怎么用ha 接收tasmota接收到的红外编码呀。
我现在找到咯 https://github.com/hristo-atanasov/Tasmota-IRHVAC
没连接上呀。。
回复

使用道具 举报

0

主题

31

帖子

364

积分

中级会员

Rank: 3Rank: 3

积分
364
金钱
333
HASS币
0
发表于 2024-7-3 18:19:26 | 显示全部楼层
是不是只用一个topic的时候只能用tele/啊
回复

使用道具 举报

0

主题

31

帖子

364

积分

中级会员

Rank: 3Rank: 3

积分
364
金钱
333
HASS币
0
发表于 2024-7-3 18:21:52 | 显示全部楼层
我是大金的,也有clock,没有修改可以的。但是之前vendor选的不对的时候也有过不能同步的,就是时间有点久了,记得不太清楚了
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-12-23 17:39 , Processed in 0.171391 second(s), 29 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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