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

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

[技术探讨] esphome构建固件出错

[复制链接]

23

主题

125

帖子

2053

积分

金牌会员

Rank: 6Rank: 6

积分
2053
金钱
1928
HASS币
10
发表于 2023-1-2 13:47:50 | 显示全部楼层 |阅读模式
1672638392526.jpg
1672638420147.jpg

substitutions:
  device_name: aiyun_infrared
  led_state: GPIO16 # 板载led灯,0绿亮红灭,1红亮绿灭
  transmitter_gpio: GPIO14 # 红外发射
  receiver_gpio: GPIO4 # 板载蜂鸣器 改 红外接收
  butten: GPIO5 # 板载按钮

esphome:
  name: $device_name
  platform: ESP8266
  esp8266_restore_from_flash: yes
  build_path: build/$device_name
  board: d1

status_led:
  pin:
    number: $led_state
    inverted: true

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "pyJoQRrN8BTVK9aJUrDLB6wBMFTbwCqdDJ3nOaK3Va4="

ota:
  safe_mode: true
  password: "115bf6c163a88f51fefeed3b43817600"

wifi:
  ssid: !secret wifi_ssid
  password: !secret wifi_password
  power_save_mode: none

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Aiyun-Infrared Fallback Hotspot"
    password: "IAH0xQPlA0gS"

captive_portal:
    
web_server:
  port: 80
  css_url: https://esphome.io/_static/webserver-v1.min.css
  js_url: https://esphome.io/_static/webserver-v1.min.js

time:
  - platform: sntp
    id: sntp_time

remote_transmitter:
  pin:
    number: $transmitter_gpio
    inverted: true
  carrier_duty_percent: 50%

remote_receiver:
  id: rcvr
  pin:
    number: $receiver_gpio
    inverted: true
  dump: all

#climate:
#  - platform: coolix       # adjust to match your AC unit!
#    name: "Living Room AC"
#    #receiver_id: rcvr
#
switch:
  - platform: restart
    name: "${device_name}_Restart"
  - platform: template
    name: turn_on_ktiao
    turn_on_action:
      - remote_transmitter.transmit_raw:
          code: [9060, -4559, 636, -550, 636, -553, 662, -554, 636,
                -1640, 662, -552, 636, -553, 663, -552, 637, -552, 664,
                -1638, 664, -523, 664, -552, 637, -1638, 665, -550, 636,
                -554, 660, -581, 609, -581, 633, -583, 632, -584, 581, 
                -608, 608, -608, 582, -581, 608, -608, 582, -608, 607, 
                -609, 581, -582, 607, -609, 581, -609, 607, -610, 580, 
                -1696, 580, -580, 607, -1669, 580, -580, 607, -582, 607, 
                -1696, 607, -607, 581]
          carrier_frequency: 38000Hz
  - platform: template
    name: turn_off_ktiao
    turn_on_action:
      - remote_transmitter.transmit_raw:
          code: [9055, -4560, 636, -551, 635, -553, 662, -554, 612,
                 -578, 662, -553, 663, -553, 637, -552, 664, -552, 637, 
                 -1639, 638, -523, 663, -552, 638, -1638, 664, -549, 637, 
                 -552, 663, -553, 636, -555, 660, -557, 658, -582, 607, 
                 -583, 608, -584, 606, -557, 632, -608, 582, -583, 633, 
                 -584, 606, -557, 631, -609, 582, -583, 632, -608, 583, 
                 -1670, 605, -580, 607, -1645, 605, -579, 608, -581, 608, 
                 -1671, 631, -606, 582]
          carrier_frequency: 38000Hz
  - platform: template
    name: turn_off_ktiao1
    turn_on_action:
      - remote_transmitter.transmit_lg:
          data: 0x2230048A
          nbits: 32
    
binary_sensor:
- platform: gpio
  pin:
    number: $butten
    inverted: true
  name: "${device_name}_button"
  id: "${device_name}_button"

i2c:
  sda: 15
  scl: 13
  scan: true
  id: bus_a

sensor:
- platform: bh1750
  i2c_id: bus_a
  name: "BH1750 Illuminance"
  address: 0x23
  update_interval: 60s



这个是什么原因导致的啊
回复

使用道具 举报

47

主题

1659

帖子

6700

积分

论坛元老

Rank: 8Rank: 8

积分
6700
金钱
5031
HASS币
40
发表于 2023-1-2 15:37:30 | 显示全部楼层
清除编译缓存
折腾精神永存,感恩感谢论坛每一位愿意分享和帮助过我的大佬,论坛有你更精彩
回复

使用道具 举报

10

主题

184

帖子

1822

积分

论坛技术达人

积分
1822
金钱
1633
HASS币
20
发表于 2023-1-2 20:57:45 | 显示全部楼层
似乎是网络不科学
回复

使用道具 举报

3

主题

37

帖子

343

积分

中级会员

Rank: 3Rank: 3

积分
343
金钱
306
HASS币
0
发表于 2023-1-3 11:46:18 | 显示全部楼层
好巧,我昨天也报这个错 折腾了好久
似乎是网络不科学的锅,我把网络重新设置了一下后面就正常了,不得不说HA里面好多莫名其妙的问题,最后发现都跟网络环境有关。
回复

使用道具 举报

23

主题

125

帖子

2053

积分

金牌会员

Rank: 6Rank: 6

积分
2053
金钱
1928
HASS币
10
 楼主| 发表于 2023-1-3 16:07:40 | 显示全部楼层

清除过缓存了,一样的结果
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-28 11:37 , Processed in 0.057762 second(s), 30 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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