weather station esphome and others
This commit is contained in:
@@ -1,82 +1,115 @@
|
||||
#############################################
|
||||
# Common
|
||||
#############################################
|
||||
substitutions:
|
||||
devicename: esp-attobat
|
||||
nice_devicename: "Atto Battery Monitor"
|
||||
#############################################
|
||||
# BYD ATTO3 12V Battery Monitor
|
||||
# Monitoring the status of a vehicle 12V battery with
|
||||
# an esp8266 (D1 Mini). It will obviously only
|
||||
# transmit when the vehicle is within wifi range.
|
||||
# Voltage is measured with a resistor voltage divider
|
||||
# into the analogue GPIO on the esp8266.
|
||||
# https://zorruno.com/2022/vehicle-12v-battery-monitoring/
|
||||
##############################################
|
||||
#############################################
|
||||
|
||||
#############################################
|
||||
# Variable Substitutions
|
||||
#############################################
|
||||
substitutions:
|
||||
devicename: "esp-attobat"
|
||||
friendly_name: "Atto3 12V Battery Monitor"
|
||||
description_comment: "Atto3 12V Battery Monitor (when home)"
|
||||
api_key: !secret esp-attobat_api_key #unfortunately you can't use substitutions in secrets names
|
||||
ota_pass: !secret esp-attobat_ota_pass #unfortunately you can't use substitutions in secrets names
|
||||
mqtt_topic: "esphome" #main topic for the mqtt server, call it what you like
|
||||
update_time: 30s #update time for for temp sensors etc
|
||||
#Add these if we are giving it a static ip, or remove them in the Wifi section
|
||||
static_ip_address: !secret esp-attobat_static_ip
|
||||
static_ip_gateway: !secret esp-attobat_gateway
|
||||
static_ip_subnet: !secret esp-attobat_subnet
|
||||
|
||||
#############################################
|
||||
# ESPHome
|
||||
#############################################
|
||||
esphome:
|
||||
name: $devicename
|
||||
comment: ${description_comment} #appears on the esphome page in HA
|
||||
|
||||
########################################
|
||||
# Specific board for ESPHome device
|
||||
########################################
|
||||
#############################################
|
||||
# ESP Platform and Framework
|
||||
# https://esphome.io/components/esp8266.html
|
||||
# https://esphome.io/components/esp32.html
|
||||
#############################################
|
||||
esp8266:
|
||||
board: d1_mini
|
||||
framework:
|
||||
version: latest #recommended, latest or dev
|
||||
|
||||
#############################################
|
||||
# ESPHome Logging Enable
|
||||
#############################################
|
||||
# https://esphome.io/components/logger.html
|
||||
#############################################
|
||||
logger:
|
||||
level: INFO #INFO Level suggested, or DEBUG for testing
|
||||
#baud_rate: 0 #set to 0 for no logging via UART, needed if you are using it for other serial things (eg PZEM)
|
||||
#esp8266_store_log_strings_in_flash: false
|
||||
#tx_buffer_size: 64
|
||||
|
||||
########################################
|
||||
#############################################
|
||||
# Enable the Home Assistant API
|
||||
########################################
|
||||
# https://esphome.io/components/api.html
|
||||
#############################################
|
||||
api:
|
||||
encryption:
|
||||
key: !secret esp-attobat_api_key
|
||||
key: ${api_key}
|
||||
|
||||
########################################
|
||||
#############################################
|
||||
# Enable Over the Air Update Capability
|
||||
# Safe mode will detect boot loops
|
||||
########################################
|
||||
# https://esphome.io/components/ota.html?highlight=ota
|
||||
#############################################
|
||||
ota:
|
||||
safe_mode: true
|
||||
password: !secret esp-attobat_ota_pass
|
||||
safe_mode: true #Safe mode will detect boot loops
|
||||
password: ${ota_pass}
|
||||
|
||||
########################################
|
||||
# Use Wifi
|
||||
# (credentials are in secrets file)
|
||||
########################################
|
||||
#############################################
|
||||
# Wifi Settings
|
||||
# https://esphome.io/components/wifi.html
|
||||
#############################################
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
# Details for fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Esp-attobat2 Fallback Hotspot"
|
||||
password: !secret fallback_ap_password
|
||||
#power_save_mode: LIGHT #https://esphome.io/components/wifi.html#wifi-power-save-mode
|
||||
# Static IP (for lower power/quicker on time)
|
||||
manual_ip:
|
||||
static_ip: !secret esp-attobat_static_ip
|
||||
gateway: !secret esp-attobat_gateway
|
||||
subnet: !secret esp-attobat_subnet
|
||||
static_ip: ${static_ip_address}
|
||||
gateway: ${static_ip_gateway}
|
||||
subnet: ${static_ip_subnet}
|
||||
ap: #Details for fallback hotspot (captive portal) in case wifi connection fails https://esphome.io/components/wifi.html#access-point-mode
|
||||
ssid: ${devicename} fallback AP
|
||||
password: !secret fallback_ap_password
|
||||
ap_timeout: 5min #default is 1min
|
||||
captive_portal: # Fallback captive portal https://esphome.io/components/captive_portal.html
|
||||
|
||||
#############################################
|
||||
# Fallback captive portal
|
||||
#############################################
|
||||
captive_portal:
|
||||
|
||||
########################################
|
||||
# Web Portal for display and monitoring
|
||||
########################################
|
||||
#############################################
|
||||
web_server:
|
||||
port: 80
|
||||
version: 2
|
||||
include_internal: true
|
||||
ota: false
|
||||
auth:
|
||||
username: !secret web_server_username
|
||||
password: !secret web_server_password
|
||||
|
||||
########################################
|
||||
#############################################
|
||||
# MQTT Monitoring
|
||||
########################################
|
||||
# https://esphome.io/components/mqtt.html?highlight=mqtt
|
||||
# MUST also have api enabled if you enable MQTT
|
||||
#############################################
|
||||
mqtt:
|
||||
broker: !secret mqtt_server
|
||||
topic_prefix: esphome/esp-attobat
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
topic_prefix: ${mqtt_topic}/${devicename}
|
||||
#username: !secret mqtt_username
|
||||
#password: !secret mqtt_password
|
||||
#
|
||||
# Availability Topic
|
||||
#birth_message:
|
||||
@@ -98,6 +131,7 @@ mqtt:
|
||||
|
||||
########################################
|
||||
# Deep Sleep
|
||||
# https://esphome.io/components/deep_sleep.html
|
||||
########################################
|
||||
deep_sleep:
|
||||
run_duration: 20s
|
||||
|
Reference in New Issue
Block a user