Ir para conteúdo
3DFinder
Entrar

Você está no 3DFinder

Buscamos em Thingiverse, MakerWorld e Printables ao mesmo tempo para te dar o melhor de cada uma.

Buscar mais como este
Modelo 3D EspHome Sensor Box por SalterFPV no MakerWorld

Descrição

Temperature and Humidity EspHome Sensor box.

 

Parts used:

ESP32 S2 Mini (with PSRAM)

SSD1306 lcd 128x64

AHT20 BMP280 Sensor

 

 

 

##### EspHome Template ######

 

substitutions:

  name: esp-temperature-sensor2

  friendly_name: "ESP Temperature Sensor 2"


 

esphome:

  name: ${name}

  friendly_name: ${friendly_name}

  min_version: 2024.6.0

  name_add_mac_suffix: false

  platformio_options:

    board_build.flash_mode: dio

  project:

    name: esphome.web

    version: dev


 

esp32:

  board: esp32-s2-saola-1

  framework:

    type: arduino

# Enable logging

logger:


 

# Enable Home Assistant API and failsafe mechanisms

api:


 

# Allow Over-The-Air updates

ota:

- platform: esphome


 

# Allow provisioning Wi-Fi via serial

improv_serial:


 

wifi:

  ssid: !secret wifi_ssid

  password: !secret wifi_password

  #fast_connect: true


 

  # Enable fallback hotspot (captive portal) in case wifi connection fails, using your wifi's password

  ap:

    ssid: "EspTempSensor"

    password: !secret wifi_password


 

# In combination with the `ap` this allows the user

# to provision wifi credentials to the device via WiFi AP.

captive_portal:


 

dashboard_import:

  package_import_url: github://esphome/firmware/esphome-web/esp32s2.yaml@main

  import_full_config: true


 

# To have a "next url" for improv serial

web_server:


 

debug:

  update_interval: 5s


 

font:

 - file: 'gfonts://Rubik@300'

   id: font_small

   size: 16

 - file: 'gfonts://Rubik@300'

   id: font_large

   size: 20

 - file: 'materialdesignicons-webfont.ttf'

   id: weather_icons

   size: 20

   glyphs:

     - "\U000F0594" #"clear-night"

     - "\U000F0590" #"cloudy"

     - "\U000F0591" #"fog"

     - "\U000F0592" #"hail"

     - "\U000F0593" #"lightning"

     - "\U000F067E" #"lightning-rainy"

     - "\U000F0595" #"partlycloudy"

     - "\U000F0596" #"pouring"

     - "\U000F0597" #"rainy"

     - "\U000F0598" #"snowy"

     - "\U000F067F" #"snowy-rainy"

     - "\U000F0599" #"sunny"

     - "\U000F059D" #"windy"

     - "\U000F059E" #"windy-variant"

     - "\U000F050F" #"thermometer"

 - file: 'materialdesignicons-webfont.ttf'

   id: sensor_icons

   size: 20

   glyphs:

     - "\U000F050F" #"thermometer"

     - "\U000F058C" #"water"

     - "\U000F07E4" #"CO2"

     - "\U000F005C" #"arrow-top-right"

     - "\U000F0043" #"arrow-bottom-right"

     - "\U000F0054" #"arrow-right"



 

color:

  - id: white

    hex: FFFFFF

  - id: grey

    hex: AAAAAA

  - id: light_grey

    hex: CCCCCC

  - id: yellow

    hex: FFFA72

  - id: orange

    hex: FF9C32

  - id: red

    hex: FF1616

  - id: purple

    hex: FF16e0


 

display:

 - platform: ssd1306_i2c

   i2c_id: i2c_2

   model: "SSD1306 128x64"

   address: 0x3C

   update_interval: 10s

   rotation: 180°

   lambda: |-

     // Display weather condition icon top center

     if (id(weather_condition).has_state()) {

       std::map<std::string, std::string> weather_icon_map

         {

           {"clear-night", "\U000F0594"},

           {"cloudy", "\U000F0590"},

           {"fog", "\U000F0591"},

           {"hail", "\U000F0592"},

           {"lightning", "\U000F0593"},

           {"lightning-rainy", "\U000F067E"},

           {"partlycloudy", "\U000F0595"},

           {"pouring", "\U000F0596"},

           {"rainy", "\U000F0597"},

           {"snowy", "\U000F0598"},

           {"snowy-rainy", "\U000F067F"},

           {"sunny", "\U000F0599"},

           {"windy", "\U000F059D"},

           {"windy-variant", "\U000F059E"},

         };

       it.printf(80, 0, id(weather_icons), TextAlign::TOP_CENTER, weather_icon_map[id(weather_condition).state.c_str()].c_str());

     }


 

     // Print time in HH:MM format top left

     it.strftime(0, 0, id(font_small), TextAlign::TOP_LEFT, "%H:%M", id(esptime).now());


 

     // Print outside temperature top right

     it.printf(it.get_width(), 0, id(font_small), TextAlign::TOP_RIGHT, "%.0f°", id(outside_temperature).state);


 

     // Draw horizontal line

     it.line(0, 20, it.get_width(), 20);

 

     it.printf(0, 25, id(sensor_icons), TextAlign::LEFT, "\U000F050F");

     it.printf(128, 25, id(font_small), TextAlign::RIGHT, "%.1f°C", id(temp_aht20).state);

 

     it.printf(0, 45, id(sensor_icons), TextAlign::LEFT, "\U000F058C");

     it.printf(128, 45, id(font_small), TextAlign::RIGHT, "%.1f%%", id(hum_aht20).state);

     


 

i2c:

  - sda: GPIO08

    scl: GPIO09

    scan: true

    id: i2c_2


 

  - sda: GPIO16

    scl: GPIO17

    scan: true

    id: i2c_main


 

time:

 - platform: homeassistant

   id: esptime


 

text_sensor:

 - platform: homeassistant

   id: weather_condition

   entity_id: weather.forecast_home

   internal: true


 

sensor:

 - platform: homeassistant

   id: outside_temperature

   entity_id: weather.forecast_home

   attribute: temperature

   internal: true


 

 - platform: aht10

   #address: 0x38

   i2c_id: i2c_main

   variant: AHT20

   temperature:

    name: "AHT20 Temperature"

    id: temp_aht20

   humidity:

    name: "AHT20 Humidity"

    id: hum_aht20

   update_interval: 10s

 

MakerWorld

EspHome Sensor Box

Publicado em 3 de fev de 2025

42
Curtidas
94
Downloads
118
Coleções
41
Impressões
Categoria Other Hobby & DIY
Tags
sensor temperature humidity esphome arduino homeassistant lcd display box esp32 ssd1306 aht20
Licença Standard Digital File License
Ver no MakerWorld (abre em nova aba)

Gostou deste modelo? Crie uma conta grátis para salvar seus favoritos e voltar a eles depois.

Criar conta