shom 发表于 2019-4-20 16:05:45

esphome配置文件分享(以及一些坑的解决办法)04-27更新

本帖最后由 shom 于 2019-4-27 19:07 编辑

踩过的坑:
1.mDNS错误,设备离线
**** Hidden Message *****
2.esp01s relay v1.0 无法启动

这个模块加上esp-01 1m无法启动,esp-01s手里没有没法测试;这个国产的继电器貌似坑遍了全球
https://www.youtube.com/watch?v=Uq7ZfutOSSg
https://www.youtube.com/watch?v=H5y24KRT3oM
https://community.blynk.cc/t/help-with-esp-01-relay-module-possibly-non-blynk-related/21731
https://www.youtube.com/watch?v=INGsM76i_D8
结合自己和他们的研究,把ch_pd引到vcc,gpio0改到gpio2,gpio2加3.3k电阻,都没有搞定,另外就是改10k电阻为4.7k
因为手里没有现成的,也折腾了好久,所以放弃了,如果你有解决办法请帮帮忙

===========================================================
硬件为:nodemcu esp32
传感器:SH1106显示屏
            apds9960 (只用到了手势)
            bme280 温度,湿度,气压
            bh1750 光强传感器



esphome:
name: sensor_01
platform: ESP32
board: nodemcu-32s

wifi:
ssid: "youssid"
password: "youpassword"

# Enable logging
logger:

# Enable Home Assistant API
api:
password: 'youpassword'

ota:
password: 'youpassword'

esp32_ble_beacon:
type: iBeacon
uuid: '03bfb94d-816f-6e94-66f6-5e4780240424'
major: 234
minor: 138

time:
- platform: homeassistant
    id: time
   
mqtt:
broker: 10.0.0.7
username: youusername
password: youpassword

i2c:
sda: GPIO25
scl: GPIO26
scan: True

status_led:
pin:
    number: GPIO2

display:
- platform: ssd1306_i2c
    model: "SH1106 128x64"
    address: 0x3C
    id: display
    lambda: |-
      it.strftime(0, 51, id(font1), "%H:%M", id(time).now());
      it.printf(0, 14, id(font1), "Temp:%.1f°C Lux:%.1f", id(temperature).state, id(illuminance).state);
      it.printf(0, 24, id(font1), "H:%.1f%% P:%.1fPha", id(humidity).state, id(pressure).state);

apds9960:
address: 0x39
update_interval: 60s
      
sensor:
- platform: bme280
    temperature:
      id: temperature
      name: "Temperature"
    pressure:
      id: pressure
      name: "Pressure"
    humidity:
      id: humidity
      name: "Humidity"
    address: 0x76
    update_interval: 300s
- platform: bh1750
    id: illuminance
    name: "Illuminance"
    address: 0x23
    update_interval: 300s

binary_sensor:
- platform: apds9960
    direction: RIGHT
    name: "Right Movement"
- platform: apds9960
    direction: LEFT
    name: "LEFT Movement"

font:
- file: 'consola.ttf'
    id: font1
    size: 10

ESP-01S + RGB灯带(ws2812)
rgb_order: GRB 可能颜色和手机上调的色不对,可以在这里改

**** Hidden Message *****

shom 发表于 2019-4-27 19:02:37

本帖最后由 shom 于 2019-4-27 19:07 编辑

nodemcu esp8266 继电器模块的灯(GPIO5),机械开关(GPIO13)
快速开关4次重启设备
**** Hidden Message *****

情非殇 发表于 2019-4-20 16:27:03

前排围观一下,最近esphome帖子很多呀

发表于 2019-4-20 16:32:23

最近esphome有点热啊~

xuyang 发表于 2019-4-20 17:09:44

学习并收藏

yuxiaoheia 发表于 2019-4-20 18:51:39

谢谢分享

star_liu 发表于 2019-4-20 19:25:01

学习学习

pidong_ 发表于 2019-4-20 19:29:14

感谢分享

zhongjiafa 发表于 2019-4-20 19:34:10

谢谢分享,来学习一下,准备弄一个玩玩。

gzh 发表于 2019-4-20 20:46:11

正需要esphome教程,学习一下

nice2943 发表于 2019-4-20 20:55:22

感謝樓主分享
页: [1] 2 3 4 5 6 7 8 9 10
查看完整版本: esphome配置文件分享(以及一些坑的解决办法)04-27更新