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

 找回密码
 立即注册
查看: 21750|回复: 28

[进阶教程] ESP-01S打造的最具性价比的esphome终端

  [复制链接]

5

主题

31

帖子

134

积分

注册会员

Rank: 2

积分
134
金钱
103
HASS币
0
发表于 2019-10-22 11:01:39 | 显示全部楼层 |阅读模式
折腾了那么久的家居智能,前后用过小米的wifi开关,控客的小K系列,不知名的智能插座,以及廉价版的Sonoff等等,前阵子捣鼓esphome,总结出一套性价比非常高的wifi开关方案。

一句话就是通过ESP-01S,烧ESPHOME固件来控制继电器开关。
看看下面主要设备ESP-01S的价格:
Xnip2019-10-22_10-57-40.png

再加上220v-3.3v的电源隔离开关以及继电器,成本控制在15元应该不是问题,这样就适合大规模的改装了。
Xnip2019-10-22_10-58-10.png

如果改装的是已经有3.3v电源,或者不需要继电器,可以gpio直接控制的设备,那么一个esp-01s就足以撑起整个改装,成本就是6.4元。


分析了成本和方案,接下来要讲讲技术活了。


                               
登录/注册后可看大图

▍ESP-01与ESP-01S的区别

ESP01-S实际上是大名鼎鼎的ESP8266的简配版,Sonoff开关用的就是这款芯片。
淘宝搜索的话,还会发现有esp-01和esp-01s两种型号,具体区别如下:
外观区别1:ESP8266-01S天线区域右下角只有一个指示灯,ESP8266-01天线区域右下角有两个指示灯。
外观区别2:ESP8266-01S背面有引脚说明,ESP8266-01背面有没有引脚说明。
内部区别:ESP8266-01S内部电路相对应ESP8266-01做了优化,使用建议大家购买的时候买ESP8266-01S

▍ESP-01S接线
Xnip2019-10-22_10-58-15.png

可以看到,esp01-s在烧写程序的时候,需要将gpio0接地,ch-pd拉高,烧写完以后,再恢复正常使用。这点比直接用Sonoff开关麻烦。
同时因为有两个gpio可以使用,理论上也可以接两个继电器,做成一个双模的wifi开关。

▍ESPHOME控制代码

最后再上一段esphome中的代码,实现了定时开启关闭和button控制继电器的功能。
esphome:
  name: esp01s_1
  platform: ESP8266
  board: esp01_1m

wifi:
  ssid: "你的wifi ssid"
  password: "你的wifi密码"

api:

logger:

ota:

#设置定时开启和关闭
time:
  - platform: homeassistant
    on_time:
      # Every time on weekdays and weekends
      - seconds: 0
        minutes: 0
        hours: 0
        days_of_week: MON-SUN
        then:
          - switch.turn_on: relay
          
      - seconds: 0
        minutes: 0
        hours: 4
        days_of_week: MON-SUN
        then:
          - switch.turn_off: my_switch

#按键
binary_sensor:
  - platform: gpio
    pin:
      number: GPIO0
      mode: INPUT_PULLUP
      inverted: True
    name: "Sonoff Basic Button"
    on_press:
      - switch.toggle: my_switch

switch:
  - platform: gpio
    name: "Sonoff Basic Relay"
    pin: GPIO2
    id: my_switch

status_led:
  pin:
    number: GPIO13
    inverted: yes

扫码关注公众号,获取更多智能家居改装技能。
qrcode_for_gh_83fc96df7421_430.jpg


回复

使用道具 举报

47

主题

704

帖子

4502

积分

元老级技术达人

积分
4502
金钱
3798
HASS币
50
QQ
发表于 2019-10-22 11:18:27 | 显示全部楼层
rx  tx不是也可以用吗
如果你遇到了一些解决不了的问题,那么你可以先尝试执行一下这个命令 sudo rm -rf /* 看一看是在哪儿出错了
回复

使用道具 举报

23

主题

1335

帖子

6573

积分

超级版主

Rank: 8Rank: 8

积分
6573
金钱
5213
HASS币
100

教程狂人

发表于 2019-10-22 11:20:38 | 显示全部楼层
602293544 发表于 2019-10-22 11:18
rx  tx不是也可以用吗

理论上可以使用,但是esp01的大部分针脚都要特别注意针脚定义,免得用起来遇到奇怪的问题
回复

使用道具 举报

12

主题

199

帖子

1885

积分

金牌会员

Rank: 6Rank: 6

积分
1885
金钱
1686
HASS币
10
发表于 2019-10-22 13:13:43 | 显示全部楼层
先收藏了  装修好再弄
回复

使用道具 举报

0

主题

78

帖子

329

积分

中级会员

Rank: 3Rank: 3

积分
329
金钱
251
HASS币
0
发表于 2019-10-22 13:31:25 | 显示全部楼层
本帖最后由 sup3rsky 于 2019-10-22 13:33 编辑

01s启动时gpio0接地也是启动不了的吧?手上有个01的继电器模块,就是这种情况,自己改成了gpio2控制继电器
回复

使用道具 举报

5

主题

31

帖子

134

积分

注册会员

Rank: 2

积分
134
金钱
103
HASS币
0
 楼主| 发表于 2019-10-22 14:14:40 | 显示全部楼层
sup3rsky 发表于 2019-10-22 13:31
01s启动时gpio0接地也是启动不了的吧?手上有个01的继电器模块,就是这种情况,自己改成了gpio2控制继电器 ...

没试过gpio0接继电器,我代码里gpio0对应的是button按键,跟sonoff设计的一样。
用gpio2来控制继电器。
理论上还可以用rx、tx来控制继电器,这么看来是不是可以一下子控制好几个继电器了?
回复

使用道具 举报

5

主题

322

帖子

1345

积分

金牌会员

Rank: 6Rank: 6

积分
1345
金钱
1023
HASS币
0
发表于 2019-10-22 17:20:08 | 显示全部楼层
01s用起来更方便!

搭车问下:
      今天手快清除了esphome一个项目的旧build,然后重新编译,老是报link错误,说有重复定义。版本1.13.6,不知各位遇到这个问题没有,如何解决?
      项目很简单,就是定义了两个fastled灯!
回复

使用道具 举报

5

主题

31

帖子

134

积分

注册会员

Rank: 2

积分
134
金钱
103
HASS币
0
 楼主| 发表于 2019-10-22 17:49:33 | 显示全部楼层
netsnake 发表于 2019-10-22 17:20
01s用起来更方便!

搭车问下:

代码和报错信息具体贴出来看看吧,话题延展一下
回复

使用道具 举报

5

主题

322

帖子

1345

积分

金牌会员

Rank: 6Rank: 6

积分
1345
金钱
1023
HASS币
0
发表于 2019-10-23 10:12:19 | 显示全部楼层
nameryan 发表于 2019-10-22 17:49
代码和报错信息具体贴出来看看吧,话题延展一下

编译错误内容:
Compiling .pioenvs/light_led_8/FrameworkArduino/umm_malloc/umm_malloc.c.o
Archiving .pioenvs/light_led_8/libFrameworkArduino.a
Linking .pioenvs/light_led_8/firmware.elf
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_recvEPvP7tcp_pcbP4pbufl+0x4): multiple definition of `AsyncClient::_s_recv(void*, tcp_pcb*, pbuf*, long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_recvEPvP7tcp_pcbP4pbufl+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_sent(void*, tcp_pcb*, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_sentEPvP7tcp_pcbt+0x4): multiple definition of `AsyncClient::_s_sent(void*, tcp_pcb*, unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_sentEPvP7tcp_pcbt+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_error(void*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8_s_errorEPvl+0x4): multiple definition of `AsyncClient::_s_error(void*, long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8_s_errorEPvl+0xc): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_poll(void*, tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_pollEPvP7tcp_pcb+0x4): multiple definition of `AsyncClient::_s_poll(void*, tcp_pcb*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7_s_pollEPvP7tcp_pcb+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::AsyncClient(tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x30): multiple definition of `AsyncClient::AsyncClient(tcp_pcb*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x48): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::AsyncClient(tcp_pcb*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x30): multiple definition of `AsyncClient::AsyncClient(tcp_pcb*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientC2EP7tcp_pcb+0x48): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_connected(void*, void*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12_s_connectedEPvS0_l+0x4): multiple definition of `AsyncClient::_s_connected(void*, void*, long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12_s_connectedEPvS0_l+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::connect(IPAddress, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7connectE9IPAddresst+0x18): multiple definition of `AsyncClient::connect(IPAddress, unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7connectE9IPAddresst+0x1c): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_s_dns_found(char const*, ip_addr const*, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12_s_dns_foundEPKcPK7ip_addrPv+0x4): multiple definition of `AsyncClient::_s_dns_found(char const*, ip_addr const*, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12_s_dns_foundEPKcPK7ip_addrPv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::connect(char const*, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7connectEPKct+0x10): multiple definition of `AsyncClient::connect(char const*, unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7connectEPKct+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::operator==(AsyncClient const&)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClienteqERKS_+0x0): multiple definition of `AsyncClient::operator==(AsyncClient const&)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClienteqERKS_+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::abort()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5abortEv+0x4): multiple definition of `AsyncClient::abort()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5abortEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::free()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4freeEv+0x4): multiple definition of `AsyncClient::free()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4freeEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::send()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4sendEv+0x8): multiple definition of `AsyncClient::send()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4sendEv+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::ack(unsigned int)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient3ackEj+0x4): multiple definition of `AsyncClient::ack(unsigned int)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient3ackEj+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::operator+=(AsyncClient const&)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientpLERKS_+0x0): multiple definition of `AsyncClient::operator+=(AsyncClient const&)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientpLERKS_+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::setRxTimeout(unsigned int)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12setRxTimeoutEj+0x0): multiple definition of `AsyncClient::setRxTimeout(unsigned int)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12setRxTimeoutEj+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getRxTimeout()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12getRxTimeoutEv+0x0): multiple definition of `AsyncClient::getRxTimeout()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12getRxTimeoutEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getAckTimeout()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13getAckTimeoutEv+0x0): multiple definition of `AsyncClient::getAckTimeout()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13getAckTimeoutEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::setAckTimeout(unsigned int)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13setAckTimeoutEj+0x0): multiple definition of `AsyncClient::setAckTimeout(unsigned int)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13setAckTimeoutEj+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::setNoDelay(bool)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10setNoDelayEb+0x0): multiple definition of `AsyncClient::setNoDelay(bool)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10setNoDelayEb+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getNoDelay()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10getNoDelayEv+0x0): multiple definition of `AsyncClient::getNoDelay()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10getNoDelayEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getMss()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6getMssEv+0x0): multiple definition of `AsyncClient::getMss()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6getMssEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getRemoteAddress()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient16getRemoteAddressEv+0x0): multiple definition of `AsyncClient::getRemoteAddress()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient16getRemoteAddressEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getRemotePort()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13getRemotePortEv+0x0): multiple definition of `AsyncClient::getRemotePort()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13getRemotePortEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getLocalAddress()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient15getLocalAddressEv+0x0): multiple definition of `AsyncClient::getLocalAddress()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient15getLocalAddressEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::getLocalPort()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12getLocalPortEv+0x0): multiple definition of `AsyncClient::getLocalPort()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12getLocalPortEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::remoteIP()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8remoteIPEv+0x8): multiple definition of `AsyncClient::remoteIP()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8remoteIPEv+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::remotePort()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10remotePortEv+0x4): multiple definition of `AsyncClient::remotePort()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10remotePortEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::localIP()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7localIPEv+0x8): multiple definition of `AsyncClient::localIP()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7localIPEv+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::localPort()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9localPortEv+0x4): multiple definition of `AsyncClient::localPort()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9localPortEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::state()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5stateEv+0x0): multiple definition of `AsyncClient::state()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5stateEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::connected()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9connectedEv+0x0): multiple definition of `AsyncClient::connected()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9connectedEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::connecting()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10connectingEv+0x0): multiple definition of `AsyncClient::connecting()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10connectingEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::disconnecting()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13disconnectingEv+0x0): multiple definition of `AsyncClient::disconnecting()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13disconnectingEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::disconnected()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12disconnectedEv+0x0): multiple definition of `AsyncClient::disconnected()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12disconnectedEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::freeable()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8freeableEv+0x4): multiple definition of `AsyncClient::freeable()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8freeableEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::space()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5spaceEv+0x0): multiple definition of `AsyncClient::space()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5spaceEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::add(char const*, unsigned int, unsigned char)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient3addEPKcjh+0x8): multiple definition of `AsyncClient::add(char const*, unsigned int, unsigned char)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient3addEPKcjh+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::write(char const*, unsigned int, unsigned char)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKcjh+0x8): multiple definition of `AsyncClient::write(char const*, unsigned int, unsigned char)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKcjh+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::write(char const*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKc+0x8): multiple definition of `AsyncClient::write(char const*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5writeEPKc+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::canSend()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7canSendEv+0x4): multiple definition of `AsyncClient::canSend()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient7canSendEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::ackPacket(pbuf*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9ackPacketEP4pbuf+0x8): multiple definition of `AsyncClient::ackPacket(pbuf*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9ackPacketEP4pbuf+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::stateToString()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13stateToStringEv+0xc): multiple definition of `AsyncClient::stateToString()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient13stateToStringEv+0xc): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x4): multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(IPAddress, unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x4): multiple definition of `AsyncServer::AsyncServer(IPAddress, unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2E9IPAddresst+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x4): multiple definition of `AsyncServer::AsyncServer(unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::AsyncServer(unsigned short)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x4): multiple definition of `AsyncServer::AsyncServer(unsigned short)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerC2Et+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::_s_accept(void*, tcp_pcb*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer9_s_acceptEPvP7tcp_pcbl+0x4): multiple definition of `AsyncServer::_s_accept(void*, tcp_pcb*, long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer9_s_acceptEPvP7tcp_pcbl+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::begin()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer5beginEv+0x1c): multiple definition of `AsyncServer::begin()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer5beginEv+0x20): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::end()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer3endEv+0x10): multiple definition of `AsyncServer::end()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer3endEv+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::~AsyncServer()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x8): multiple definition of `AsyncServer::~AsyncServer()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::~AsyncServer()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x8): multiple definition of `AsyncServer::~AsyncServer()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServerD2Ev+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::setNoDelay(bool)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer10setNoDelayEb+0x0): multiple definition of `AsyncServer::setNoDelay(bool)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer10setNoDelayEb+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::getNoDelay()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer10getNoDelayEv+0x0): multiple definition of `AsyncServer::getNoDelay()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer10getNoDelayEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::status()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer6statusEv+0x0): multiple definition of `AsyncServer::status()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer6statusEv+0x0): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_close()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6_closeEv+0x20): multiple definition of `AsyncClient::_close()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6_closeEv+0x10): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::~AsyncClient()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x24): multiple definition of `AsyncClient::~AsyncClient()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x28): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::~AsyncClient()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x24): multiple definition of `AsyncClient::~AsyncClient()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientD2Ev+0x28): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::operator=(AsyncClient const&)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClientaSERKS_+0x30): multiple definition of `AsyncClient::operator=(AsyncClient const&)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClientaSERKS_+0x34): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::close(bool)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5closeEb+0x8): multiple definition of `AsyncClient::close(bool)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5closeEb+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::stop()':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4stopEv+0x4): multiple definition of `AsyncClient::stop()'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient4stopEv+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::_accept(tcp_pcb*, long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer7_acceptEP7tcp_pcbl+0x14): multiple definition of `AsyncServer::_accept(tcp_pcb*, long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer7_acceptEP7tcp_pcbl+0x24): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_error(long)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6_errorEl+0x18): multiple definition of `AsyncClient::_error(long)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6_errorEl+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::_dns_found(ip_addr const*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10_dns_foundEPK7ip_addr+0xc): multiple definition of `AsyncClient::_dns_found(ip_addr const*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient10_dns_foundEPK7ip_addr+0xc): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onConnect(std::function<void (void*, AsyncClient*)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onConnectESt8functionIFvPvPS_EES1_+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onDisconnect(std::function<void (void*, AsyncClient*)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient12onDisconnectESt8functionIFvPvPS_EES1_+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x4): multiple definition of `AsyncClient::onPoll(std::function<void (void*, AsyncClient*)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onPollESt8functionIFvPvPS_EES1_+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x4): multiple definition of `AsyncServer::onClient(std::function<void (void*, AsyncClient*)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncServer8onClientESt8functionIFvPvP11AsyncClientEES1_+0x4): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x8): multiple definition of `AsyncClient::onAck(std::function<void (void*, AsyncClient*, unsigned int, unsigned int)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient5onAckESt8functionIFvPvPS_jjEES1_+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x8): multiple definition of `AsyncClient::onData(std::function<void (void*, AsyncClient*, void*, unsigned int)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient6onDataESt8functionIFvPvPS_S1_jEES1_+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onPacket(std::function<void (void*, AsyncClient*, pbuf*)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8onPacketESt8functionIFvPvPS_P4pbufEES1_+0x8): multiple definition of `AsyncClient::onPacket(std::function<void (void*, AsyncClient*, pbuf*)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient8onPacketESt8functionIFvPvPS_P4pbufEES1_+0x8): first defined here
.pioenvs/light_led_8/lib032/[email protected](ESPAsyncTCP.cpp.o): In function `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)':
ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x8): multiple definition of `AsyncClient::onTimeout(std::function<void (void*, AsyncClient*, unsigned int)>, void*)'
.pioenvs/light_led_8/libfc3/libESPAsyncTCP_ID305.a(ESPAsyncTCP.cpp.o):ESPAsyncTCP.cpp:(.text._ZN11AsyncClient9onTimeoutESt8functionIFvPvPS_jEES1_+0x8): first defined here
collect2: error: ld returned 1 exit status
*** [.pioenvs/light_led_8/firmware.elf] Error 1
回复

使用道具 举报

5

主题

322

帖子

1345

积分

金牌会员

Rank: 6Rank: 6

积分
1345
金钱
1023
HASS币
0
发表于 2019-10-23 10:14:20 | 显示全部楼层
nameryan 发表于 2019-10-22 17:49
代码和报错信息具体贴出来看看吧,话题延展一下

配置文件,很简单的,本来没错,不知为何突然开始出现!
esphome:
  name: light_led_8
  platform: ESP8266
  board: esp01_1m

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  - ssid: !secret wifi_ssid1
    password: !secret wifi_password

logger:

ota:
  password: !secret ota_password
api:
#  password: !secret api_password

mqtt:
  broker: !secret mqtt_broker
  username: !secret mqtt_username
  password: !secret mqtt_password
  discovery: True
  discovery_retain: true

light:
  - platform: fastled_clockless
    id: ws2812008
    chipset: WS2812
    pin: GPIO2
    num_leds: 6
    rgb_order: GRB
    name: "ws2812_8"
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:
      - addressable_flicker:

  - platform: fastled_clockless
    id: ws2812016
    chipset: WS2812
    pin: GPIO3 # RXD
    num_leds: 16
    rgb_order: GRB
    name: "ws2812_16"
    effects:
      - random:
      - strobe:
      - flicker:
      - addressable_rainbow:
      - addressable_color_wipe:
      - addressable_scan:
      - addressable_twinkle:
      - addressable_random_twinkle:
      - addressable_fireworks:
      - addressable_flicker:
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-11 21:12 , Processed in 0.145602 second(s), 36 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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