Add configurations for new ESP32 camera and sensors, including home energy monitor
This commit is contained in:
18
.gitignore
vendored
18
.gitignore
vendored
@@ -1,2 +1,20 @@
|
|||||||
.vscode/extensions.json
|
.vscode/extensions.json
|
||||||
Cameras/.DS_Store
|
Cameras/.DS_Store
|
||||||
|
# Gitignore settings for ESPHome
|
||||||
|
# This is an example and may include too much for your use-case.
|
||||||
|
# You can modify this file to suit your needs.
|
||||||
|
/.esphome/
|
||||||
|
/secrets.yaml
|
||||||
|
# Ignore compiled Python files
|
||||||
|
*.pyc
|
||||||
|
__pycache__/
|
||||||
|
# Ignore log files
|
||||||
|
*.log
|
||||||
|
# Ignore virtual environment directories
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
# Ignore build directories
|
||||||
|
build/
|
||||||
|
dist/
|
||||||
|
# Ignore IDE-specific files
|
||||||
|
.idea/
|
||||||
91
Cameras/esp32-saturn4-camera.yaml
Normal file
91
Cameras/esp32-saturn4-camera.yaml
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
esphome:
|
||||||
|
name: esp32-saturn4-cam
|
||||||
|
friendly_name: esp32-saturn4-cam
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32dev
|
||||||
|
framework:
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
substitutions:
|
||||||
|
devicename: "esp32-saturn4-cam"
|
||||||
|
hostname: "esp32-saturn4-cam"
|
||||||
|
#friendly_name:
|
||||||
|
device_description: ESP32-CAM module in Saturn 4 Ultra Resin printer.
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "3Zxo91fAfA7wpZ4DAYFxGarCRIGQr+0rUJH2taJo7ds="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "d2e50b2ad36ed7de4ecbfd90725765e3"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Esp32-Saturn4-Cam"
|
||||||
|
password: "klRzTYuqPJXm"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
# Example configuration entry
|
||||||
|
i2c:
|
||||||
|
- id: camera_i2c
|
||||||
|
sda: GPIO26
|
||||||
|
scl: GPIO27
|
||||||
|
|
||||||
|
psram:
|
||||||
|
mode: quad
|
||||||
|
speed: 80MHz
|
||||||
|
|
||||||
|
# Flashlight # you can control this flashlight within Homeassistant or mqtt to shine on the birds. use it with an timer!
|
||||||
|
output:
|
||||||
|
- platform: ledc
|
||||||
|
pin: GPIO4
|
||||||
|
id: gpio_4
|
||||||
|
channel: 2
|
||||||
|
|
||||||
|
## GPIO_4 is the flash light pin
|
||||||
|
light:
|
||||||
|
- platform: monochromatic
|
||||||
|
output: gpio_4
|
||||||
|
name: $hostname light
|
||||||
|
restore_mode: RESTORE_AND_OFF
|
||||||
|
icon: mdi:flash
|
||||||
|
|
||||||
|
esp32_camera:
|
||||||
|
external_clock:
|
||||||
|
pin: GPIO0
|
||||||
|
frequency: 20MHz
|
||||||
|
i2c_id: camera_i2c
|
||||||
|
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
|
||||||
|
vsync_pin: GPIO25
|
||||||
|
href_pin: GPIO23
|
||||||
|
pixel_clock_pin: GPIO22
|
||||||
|
power_down_pin: GPIO32
|
||||||
|
resolution: 640x480 # you can use: [1600x1200 , 1280x1024 , 1024x768 , 800x600, 640x480 ] for best performance (FPS) use 1024 of lower resolution.
|
||||||
|
jpeg_quality: 12 #The JPEG quality that the camera should encode images with. From 10 (best) to 63 (worst)
|
||||||
|
aec2: true
|
||||||
|
ae_level: 2
|
||||||
|
brightness: 2 #The brightness to apply to the picture, default 0
|
||||||
|
contrast: 2
|
||||||
|
saturation: -2
|
||||||
|
vertical_flip: False
|
||||||
|
|
||||||
|
# Image settings
|
||||||
|
name: $devicename
|
||||||
|
# ...
|
||||||
|
|
||||||
|
esp32_camera_web_server:
|
||||||
|
- port: 80
|
||||||
|
mode: STREAM
|
||||||
|
- port: 8080
|
||||||
|
mode: SNAPSHOT
|
||||||
107
Sensors/esphome-web-0fdcf4.yaml
Normal file
107
Sensors/esphome-web-0fdcf4.yaml
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
esphome:
|
||||||
|
name: salt-sensor
|
||||||
|
friendly_name: Salt-Sensor
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
board: esp32-c3-devkitm-1
|
||||||
|
framework:
|
||||||
|
type: arduino
|
||||||
|
|
||||||
|
# Enable logging
|
||||||
|
logger:
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
encryption:
|
||||||
|
key: "EaifDkFuB9N+qDKHW6B4k/n495FWLVmcp6DBODKzK10="
|
||||||
|
|
||||||
|
ota:
|
||||||
|
- platform: esphome
|
||||||
|
password: "7ce613915c51252c2810c07c889b4a5e"
|
||||||
|
|
||||||
|
wifi:
|
||||||
|
ssid: !secret wifi_ssid
|
||||||
|
password: !secret wifi_password
|
||||||
|
|
||||||
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||||
|
ap:
|
||||||
|
ssid: "Salt-Sensor Fallback Hotspot"
|
||||||
|
password: "ZoBRDcj54rwW"
|
||||||
|
|
||||||
|
captive_portal:
|
||||||
|
|
||||||
|
# Enable Web server.
|
||||||
|
web_server:
|
||||||
|
port: 80
|
||||||
|
# Sync time with Home Assistant.
|
||||||
|
time:
|
||||||
|
- platform: homeassistant
|
||||||
|
id: homeassistant_time
|
||||||
|
|
||||||
|
# Text sensors with general information.
|
||||||
|
text_sensor:
|
||||||
|
# Expose ESPHome version as sensor.
|
||||||
|
- platform: version
|
||||||
|
name: salt_level_sensor ESPHome Version
|
||||||
|
# Expose WiFi information as sensors.
|
||||||
|
- platform: wifi_info
|
||||||
|
ip_address:
|
||||||
|
name: salt_level_sensor IP
|
||||||
|
ssid:
|
||||||
|
name: salt_level_sensor SSID
|
||||||
|
bssid:
|
||||||
|
name: salt_level_sensor BSSID
|
||||||
|
sensor:
|
||||||
|
# Uptime sensor.
|
||||||
|
- platform: uptime
|
||||||
|
name: salt_level_sensor Uptime
|
||||||
|
|
||||||
|
# WiFi Signal sensor.
|
||||||
|
- platform: wifi_signal
|
||||||
|
name: salt_level_sensor WiFi Signal
|
||||||
|
update_interval: 60s
|
||||||
|
|
||||||
|
# Ultrasonic sensor to measure salt level.
|
||||||
|
# - platform: ultrasonic
|
||||||
|
# trigger_pin: GPIO6
|
||||||
|
# echo_pin: GPIO7
|
||||||
|
# name: "Salt level in percent"
|
||||||
|
# update_interval: 1h
|
||||||
|
# unit_of_measurement: "%"
|
||||||
|
# # pulse_time: 20us
|
||||||
|
# # accuracy_decimals: 4
|
||||||
|
# filters:
|
||||||
|
# - lambda: return(0.42-x)*(100/0.42);
|
||||||
|
# # - multiply: 100
|
||||||
|
# - exponential_moving_average:
|
||||||
|
# alpha: 0.001
|
||||||
|
# send_every: 1
|
||||||
|
# - clamp:
|
||||||
|
# min_value: 20
|
||||||
|
# max_value: 100
|
||||||
|
# on_value_range:
|
||||||
|
# above: 200
|
||||||
|
# then:
|
||||||
|
# - homeassistant.service:
|
||||||
|
# service: notify.mailgun
|
||||||
|
# data:
|
||||||
|
# target:
|
||||||
|
# -"joshua@cnjmail.com"
|
||||||
|
# title: "Add Salt"
|
||||||
|
# message: "Add Salt to the Water Softener Tank"
|
||||||
|
# - homeassistant.service:
|
||||||
|
# service: notify.mobile_app_joshuas_iphone_of_pain
|
||||||
|
# data:
|
||||||
|
# message: Water softener is low on salt, please add salt.
|
||||||
|
|
||||||
|
# Ultrasonic sensor to measure salt level.
|
||||||
|
- platform: ultrasonic
|
||||||
|
trigger_pin: GPIO6
|
||||||
|
echo_pin: GPIO7
|
||||||
|
name: "Salt level in cm"
|
||||||
|
update_interval: .5h
|
||||||
|
unit_of_measurement: "cm"
|
||||||
|
# pulse_time: 20us
|
||||||
|
# accuracy_decimals: 4
|
||||||
|
filters:
|
||||||
|
- lambda: return(0.83-x)*(100/0.83);
|
||||||
Reference in New Issue
Block a user