config files on 14-12-2023 09:06:28

This commit is contained in:
2023-12-14 09:06:28 +01:00
parent 423d32fada
commit 49c549fbdd
41 changed files with 73157 additions and 37682 deletions

View File

@@ -33,6 +33,8 @@ packages:
co2: !include sensors/scd30.yaml
tvoc: !include sensors/sgp30.yaml
light:
- platform: neopixelbus
type: GRBW

5
esphome/boards/esp32-S3.yaml Executable file
View File

@@ -0,0 +1,5 @@
---
esp32:
board: esp32-s3-devkitc-1
framework:
type: esp-idf

View File

@@ -0,0 +1,2 @@
esp8266:
board: esp01_1m

View File

@@ -0,0 +1,16 @@
ota:
password: ${ota_password}
api:
encryption:
key: ${api_password}
text_sensor:
- platform: ethernet_info
ip_address:
name: ESP IP Address
icon: mdi:ethernet
entity_category: diagnostic

View File

@@ -17,6 +17,7 @@ wifi:
subnet: ${subnet}
dns1: 192.169.2.15
dns2: 1.1.1.1
# use_address: 192.168.2.63 #when changing fixed IP
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:

View File

@@ -0,0 +1,51 @@
# Enable Home Assistant API
api:
encryption:
key: ${api_password}
ota:
password: ${ota_password}
wifi:
ssid: ${wifi_ssid}
password: ${wifi_password}
fast_connect: True
manual_ip:
static_ip: ${ip}
gateway: ${gateway}
subnet: ${subnet}
dns1: 192.169.2.15
dns2: 1.1.1.1
# use_address: 192.168.2.63 #when changing fixed IP
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${device_name}
password: ${wifi_password}
sensor:
- platform: wifi_signal
name: "WiFi Signal "
update_interval: 10s
text_sensor:
- platform: wifi_info
ssid:
name: "Connected SSID"
id: ssid
icon: mdi:wifi-strength-2
entity_category: diagnostic
bssid:
name: "Connected BSSID"
id: bssid
icon: mdi:wifi-strength-2
entity_category: diagnostic
mac_address:
name: "WiFi Mac Address"
id: macaddress
icon: mdi:wifi-strength-2
entity_category: diagnostic

View File

@@ -9,7 +9,7 @@ class ACS712Sensor : public PollingComponent {
ACS712Sensor() : PollingComponent(15000) {}
void setup() override {
ACS->autoMidPoint();
//ACS->autoMidPoint();
ESP_LOGD("acs712", "MidPoint: %d", ACS->getMidPoint());
ACS->setNoisemV(43);
ESP_LOGD("acs712", "Noise mV: %d", ACS->getNoisemV());

View File

@@ -14,6 +14,7 @@ substitutions:
pin_led1: GPIO3
pin_led2: GPIO4
pin_led3: GPIO1
ledc_freq: "19531Hz"
packages:
board: !include boards/esp32-C3.yaml
@@ -28,16 +29,21 @@ light:
id: ledString1
output: led1
name: "led string 1"
restore_mode: Restore_and_on
- platform: monochromatic
id: ledString2
output: led2
name: "led string 2"
restore_mode: Restore_and_on
- platform: monochromatic
id: ledString3
output: led3
name: "led string 3"
restore_mode: Restore_and_on
- platform: partition
id: master
@@ -49,19 +55,23 @@ light:
- single_light_id: ledString3
# Example output entry
#https://www.esphome.io/components/output/ledc
output:
- platform: ledc
pin: ${pin_led1}
id: led1
frequency: ${ledc_freq}
- platform: ledc
pin: ${pin_led2}
id: led2
frequency: ${ledc_freq}
- platform: ledc
pin: ${pin_led3}
id: led3
frequency: ${ledc_freq}
esphome:
libraries:

53
esphome/kersthuis01.yaml Normal file
View File

@@ -0,0 +1,53 @@
substitutions:
device_name: "kersthuis-01"
friendly_name: "kersthuis-01"
comment: "esp32-c3"
location: "woonkamer"
api_password: !secret kersthuis-01_api
ip: !secret kersthuis-01_ip
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
pin_led1: GPIO3
pin_button: GPIO4
packages:
board: !include boards/esp32-C3.yaml
device_base: !include common/common.yaml
connection: !include common/wifi.yaml
# status: !include templates/status.yaml
logger: !include templates/logger.yaml
light:
- platform: monochromatic
id: led_lights
restore_mode: RESTORE_DEFAULT_ON
output: leds
name: "led string 1"
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%
output:
- platform: ledc
pin: ${pin_led1}
id: leds
# binary_sensor:
# - platform: gpio
# name: "Button"
# pin: ${pin_button}
# filters:
# - delayed_on: 20ms
# on_click:
# min_length: 50ms
# max_length: 1000ms
# then:
# - light.toggle:
# id: led_lights

40
esphome/kersthuis02.yaml Normal file
View File

@@ -0,0 +1,40 @@
substitutions:
device_name: "kersthuis-02"
friendly_name: "kersthuis-02"
comment: "esp32-c3"
location: "woonkamer"
api_password: !secret kersthuis-02_api
ip: !secret kersthuis-02_ip
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
pin_led1: GPIO3
packages:
board: !include boards/esp32-C3.yaml
device_base: !include common/common.yaml
connection: !include common/wifi.yaml
# status: !include templates/status.yaml
logger: !include templates/logger.yaml
light:
- platform: esp32_rmt_led_strip
rmt_channel: 0
is_rgbw: true
id: led_lights
restore_mode: RESTORE_DEFAULT_ON
name: "kersthuisje2"
chipset: SK6812
rgb_order: GRB
num_leds: 1
pin: ${pin_led1}
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%

101
esphome/kersthuis03.yaml Normal file
View File

@@ -0,0 +1,101 @@
substitutions:
device_name: "kersthuis-03"
friendly_name: "kersthuis-03-candyshop"
comment: "esp32-c3"
location: "woonkamer"
api_password: !secret kersthuis-03_api
ip: !secret kersthuis-03_ip
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
pin_led1: GPIO3
pin_led2: GPIO4
pin_led3: GPIO6
pin_button: GPIO7
packages:
board: !include boards/esp32-C3.yaml
device_base: !include common/common.yaml
connection: !include common/wifi.yaml
# status: !include templates/status.yaml
logger: !include templates/logger.yaml
light:
- platform: monochromatic
id: led_light1
restore_mode: RESTORE_DEFAULT_ON
output: led1
name: led_light1
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%
on_turn_on:
- light.turn_on:
id: led_light1
effect: flicker
brightness: 75%
- platform: monochromatic
id: led_light2
restore_mode: RESTORE_DEFAULT_ON
output: led2
name: led_light2
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%
on_turn_on:
- light.turn_on:
id: led_light2
effect: flicker
brightness: 75%
- platform: monochromatic
id: led_light3
restore_mode: RESTORE_DEFAULT_ON
output: led3
name: led_light3
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%
on_turn_on:
- light.turn_on:
id: led_light3
effect: flicker
brightness: 75%
output:
- platform: ledc
pin: ${pin_led1}
id: led1
- platform: ledc
pin: ${pin_led2}
id: led2
- platform: ledc
pin: ${pin_led3}
id: led3
binary_sensor:
- platform: gpio
pin:
number: ${pin_button}
mode:
input: true
pullup: true
name: "button"
on_click:
then:
- light.toggle: led_light1
- light.toggle: led_light2
- light.toggle: led_light3

22
esphome/kerstlantern.yaml Normal file
View File

@@ -0,0 +1,22 @@
substitutions:
device_name: "kerstlantern"
friendly_name: "kerstlantern"
comment: "esp32-c3"
location: "woonkamer"
api_password: !secret kerstlantern_api
ip: !secret kerstlatern_ip
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
chipset: SK6812
num_leds: "3"
pin_led1: GPIO3
packages:
board: !include boards/esp32-C3.yaml
device_base: !include common/common.yaml
connection: !include common/wifi.yaml
logger: !include templates/logger.yaml
leds: !include templates/light_rgbw_rmt.yaml

View File

@@ -0,0 +1,66 @@
substitutions:
device_name: "sonofbasic-01"
friendly_name: "sonofbasic-01"
comment: "esp8266"
location: "Tuin"
api_password: !secret SonofBasic-01_api
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
ip: !secret SonofBasic-01_ip
pin_status: GPIO13
pin_relay: GPIO12
pin_button: GPIO0
# GPIO0 Button (inverted)
# GPIO1 TX pin (C1 Pin 2)
# GPIO3 RX pin (C1 Pin 3)
# GPIO12 Relay
# GPIO13 Green LED (inverted)
# GPIO14 Optional Sensor (C1 Pin 5)
packages:
board: !include boards/esp8266_sonofBasic.yaml
device_base: !include common/common.yaml
connection: !include common/wifi_noportal.yaml
status: !include templates/status.yaml
logger: !include templates/logger.yaml
binary_sensor:
- platform: gpio
pin:
number: ${pin_button}
mode:
input: true
pullup: true
inverted: true
name: "Sonoff Basic Button"
on_press:
- light.toggle: lamp_relay
# switch:
# - platform: gpio
# name: "Sonoff Basic Relay"
# pin: ${pin_relay}
# id: relay
# device_class: light
output:
- platform: gpio
pin: ${pin_relay}
id: relay
light:
- platform: binary
name: "Sonoff Basic"
output: relay
id: lamp_relay
restore_mode: RESTORE_DEFAULT_ON
status_led:
pin:
number: ${pin_status}
inverted: yes

View File

@@ -0,0 +1,83 @@
substitutions:
device_name: "sonofbasic-02"
friendly_name: "sonofbasic-02"
comment: "esp8266"
location: "Tuin"
api_password: !secret SonofBasic-02_api
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
ip: !secret SonofBasic-02_ip
pin_status: GPIO13
pin_relay: GPIO12
pin_button: GPIO0
# GPIO0 Button (inverted)
# GPIO1 TX pin (C1 Pin 2)
# GPIO3 RX pin (C1 Pin 3)
# GPIO12 Relay
# GPIO13 Green LED (inverted)
# GPIO14 Optional Sensor (C1 Pin 5)
packages:
board: !include boards/esp8266_sonofBasic.yaml
device_base: !include common/common.yaml
connection: !include common/wifi_noportal.yaml
status: !include templates/status.yaml
logger: !include templates/logger.yaml
binary_sensor:
- platform: gpio
pin:
number: ${pin_button}
mode:
input: true
pullup: true
inverted: true
name: "Sonoff Basic Button"
on_press:
- switch.toggle: relay
switch:
- platform: gpio
name: "Sonoff Basic Relay"
pin: ${pin_relay}
id: relay
status_led:
pin:
number: ${pin_status}
inverted: yes
# esphome:
# name: sonofbasic-02
# friendly_name: sonofbasic-02
# esp8266:
# board: esp01_1m
# # Enable logging
# logger:
# # Enable Home Assistant API
# api:
# encryption:
# key: "48SvU7npQIluo9PR6xGOmOsXoAKyr7kX1YYjLEXful8="
# ota:
# password: "1900b4474c00a32b76ddc2c550857eff"
# wifi:
# ssid: !secret wifi_ssid
# password: !secret wifi_password
# # Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "Sonofbasic-02 Fallback Hotspot"
# password: "aUsjAjSOix4j"
# captive_portal:

View File

@@ -0,0 +1,47 @@
substitutions:
device_name: "t-eth-lite-poe"
friendly_name: "t-eth-lite-poe"
comment: "esp32-S3"
location: "zolder"
api_password: !secret T-eth-poe-lite_api
ip: !secret T-eth-poe-lite_ip
ota_password: !secret ota_password
wifi_ssid: !secret wifi_ssid
wifi_password: !secret wifi_password
gateway: !secret ip_gateway
subnet: !secret ip_subnet
packages:
board: !include boards/esp32-S3.yaml
device_base: !include common/common.yaml
# status: !include templates/status.yaml
ota: !include common/ota.yaml
logger: !include templates/logger.yaml
external_components:
- source: github://fightforlife/esphome-components
components: [ ethernet ]
refresh: 0s
spi:
clk_pin: 10
mosi_pin: 12
miso_pin: 11
ethernet:
type: W5500
cs_pin: 9
clk_pin: 10
mosi_pin: 12
miso_pin: 11
interrupt_pin: 13
clock_speed: 25
manual_ip:
static_ip: ${ip}
gateway: ${gateway}
subnet: ${subnet}
dns1: 192.169.2.15
dns2: 1.1.1.1

View File

@@ -0,0 +1,17 @@
---
light:
- platform: esp32_rmt_led_strip
rmt_channel: 0
is_rgbw: True
id: led_lights
restore_mode: RESTORE_DEFAULT_ON
name: ${device_name}_leds
chipset: ${chipset}
rgb_order: GRB
num_leds: 2 #${num_leds}
pin: ${pin_led1}
effects:
- flicker:
name: "Flicker"
alpha: 95%
intensity: 1.5%

View File

@@ -1,2 +1,3 @@
# logging
logger:
logger:
baud_rate: 115200