mpg28
Published © GPL3+

Weather Station (Home Assistant)

Transmit and record outdoor sensor readings to view on Home assistant.

IntermediateWork in progress8,646
Weather Station (Home Assistant)

Things used in this project

Hardware components

Wemos D1 Mini
Espressif Wemos D1 Mini
×1
SparkFun Atmospheric Sensor Breakout - BME280
SparkFun Atmospheric Sensor Breakout - BME280
×1
BH1750 Light Sensor
×1
TP4056 Lithium battery charger
×1
DS18B20 Temperature Sensor 1m
HARDWARIO DS18B20 Temperature Sensor 1m
×1
Lithium battery 18650
×1
solar panel 5.5v 50mA
×3

Software apps and online services

Home Assistant
Home Assistant
ESP Home Flasher

Story

Read more

Schematics

weather_station_wiring_uxnPRmicwQ.jpg

Code

WeMos board YAML

YAML
esphome:
  name: bob2
  platform: ESP8266
  board: esp01_1m

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
  password: "........"

wifi:
  ssid: "............"
  password: "............"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Bob2 Fallback Hotspot"
    password: ".............."

captive_portal:


i2c:
  sda: 4
  scl: 5
  scan: True
  id: bus_a

sensor:

  - platform: bh1750
    name: "BH1750 Illuminance"
    address: 0x23
    measurement_duration: 31
    update_interval: 5s

  - platform: bme280
    temperature:
      name: "BME280 Temperature"
      oversampling: 16x
    pressure:
      name: "BME280 Pressure"
    humidity:
      name: "BME280 Humidity"
    address: 0x76
    update_interval: 5s  

  - platform: adc
    filters:
      - multiply: 4.2
    pin: A0
    name: "VCC Voltage" 
    update_interval: 5s

  - platform: dallas
    address: 0x7A3C01D0759D5B28
    name: "Outside Temp2"

dallas:
  - pin: GPIO13

    
deep_sleep:
  run_duration: 1min
  sleep_duration: 10min    
    

Example Mini Graph YAML

YAML
type: custom:mini-graph-card
name: Outside Temperature
icon: mdi:thermometer
entities:
  - entity: sensor.bme280_temperature
    name: Temperature
show:
  extrema: false
  labels: true
  points: false
height: 300
align_state: left
color_thresholds:
  - value: 3
    color: '#BE1CEA'
  - value: 15
    color: '#0066AF'
  - value: 20
    color: '#d35400'
  - value: 22
    color: '#c0392b'
hours_to_show: 72
points_per_hour: 4

Credits

mpg28

mpg28

7 projects • 2 followers

Comments