This commit is contained in:
2024-04-10 14:49:07 +02:00
parent 956236ca8d
commit 523d1143f3
111 changed files with 41255 additions and 98061 deletions

View File

@@ -0,0 +1,34 @@
substitutions:
device_name: "esp32-aqs1"
friendly_name: "AQS-woonkamer_oud"
comment: "esp32, pm, co2, display, btprox"
location: "prullenbak"
api_password: !secret air_quality_woonkamer_oud_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 air_quality_woonkamer_oud_ip
pin_pm_rx: GPIO19
pin_pm_tx: GPIO26
pin_sda: GPIO21
pin_scl: GPIO22
packages:
board: !include boards/esp32_wroom_arduino.yaml
i2c: !include interfaces/i2c_a.yaml
device_base: !include common/common.yaml
connection: !include common/wifi.yaml
logger: !include templates/logger.yaml
bt_proxy: !include templates/ble_proxy.yaml
pmsc: !include sensors/pmsx0003.yaml
co2: !include sensors/scd30.yaml
tvoc: !include sensors/sgp30.yaml
#display pins
# spi:
# clk_pin: GPIO18
# mosi_pin: GPIO23
# miso_pin: GPIO12

View File

@@ -0,0 +1,120 @@
substitutions:
esp_name: "esp32-atom-matrix"
esphome:
name: ${esp_name}
comment: ${esp_name}
esp32:
board: m5stack-atom
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret esp32-atom-matrix_api
ota:
password: !secret ota_password
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${esp_name} fallback
password: !secret fallback_password
captive_portal:
globals:
- id: display_index
type: int
restore_value: no
initial_value: '7'
- id: display_index_def
type: int
restore_value: no
initial_value: '17'
# Define I2C interface
i2c:
sda: 25
scl: 21
scan: true
#frequency: 200kHz
font:
- file: "fonts/5x5.ttf"
id: matrix_font
size: 10
binary_sensor:
- platform: gpio # btn
id: button
pin:
number: 39
inverted: true
# --- End if binary_sensor: --- #
light:
- platform: fastled_clockless
chipset: WS2812B
pin: GPIO27
num_leds: 25
rgb_order: GRB
name: "led_matrix"
id: led_matrix_light
default_transition_length: 0s
color_correct: [50%, 50%, 50%]
restore_mode: ALWAYS_ON
display:
- platform: addressable_light
id: led_matrix_display
addressable_light_id: led_matrix_light
width: 5
height: 5
rotation: 90°
update_interval: 200ms
lambda: |-
// Draw a bulls-eye pattern
Color red = Color(0xFF0000);
Color green = Color(0x00FF00);
Color blue = Color(0x0000FF);
it.printf(id(display_index), -4, id(matrix_font), blue, TextAlign::TOP_LEFT, "Tim");
if(id(display_index) <= id(display_index_def)*-1)
{
id(display_index) = 7;
}
else
{
id(display_index) -= 1;
}
# --- End of light: --- #
# sensor:
# - platform: mpu6886
# address: 0x68
# update_interval: 1s # Defaults to 60s, but seems to work fine up to at least 300ms
# accel_x:
# name: "MPU6886 Accel X"
# accel_y:
# name: "MPU6886 Accel Y"
# accel_z:
# name: "MPU6886 Accel z"
# gyro_x:
# name: "MPU6886 Gyro X"
# gyro_y:
# name: "MPU6886 Gyro Y"
# gyro_z:
# name: "MPU6886 Gyro z"
# temperature:
# name: "MPU6886 Temperature"

View File

@@ -0,0 +1,92 @@
substitutions:
esp_name: "ir-004-c3"
external_components:
- source: github://Jorre05/remote_receiver
components: [ remote_receiver ]
esphome:
name: ${esp_name}
comment: ${esp_name}
esp32:
variant: ESP32C3
board: esp32dev
framework:
type: esp-idf
sdkconfig_options:
CONFIG_BT_BLE_50_FEATURES_SUPPORTED: y
CONFIG_BT_BLE_42_FEATURES_SUPPORTED: y
CONFIG_ESP_TASK_WDT_TIMEOUT_S: "10"
# Enable logging
logger:
baud_rate: 0
# uart:
# rx_pin: GPIO3
# tx_pin: GPIO1
# baud_rate: 9600
# Enable Home Assistant API
api:
encryption:
key: !secret hvac_woonkamer_api
ota:
password: !secret hvac_woonkamer_ota
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${esp_name} fallback
password: !secret fallback_password
#bluetooth_proxy:
time:
- platform: homeassistant
id: homeassistant_time
remote_transmitter:
pin: GPIO3
carrier_duty_percent: 50%
status_led:
pin: GPIO18
remote_receiver:
id: rcvr
pin:
number: GPIO19 #ESP32-C3 #GPIO5 ESP8266
inverted: true
# mode:
# input: true
# pullup: true
tolerance: 55%
dump: all
climate:
- platform: fujitsu_general
name: "Airco"
receiver_id: rcvr
# binary_sensor:
# - platform: gpio
# name: "Button"
# id: button
# pin:
# number: GPIO5
# mode: INPUT_PULLUP
# inverted: True
#GPIO4 - status (ESP32-C3 = GPIO18)
#GPIO5 - IR rcvr. (ESP32-C3 = GPIO19)
#GPIO14 - IR tx (ESP32-C3 = GPIO3)
#GPIO13 - button. (ESP32-C3 = GPIO5)
#GPIO2 - strapping to 3v3 (ESP32-C3 specific)

View File

@@ -0,0 +1,95 @@
substitutions:
esp_name: "vw-bus"
esphome:
name: ${esp_name}
comment: ${esp_name}
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret vw_bus_api
ota:
password: !secret vw_bus_ota
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: ${esp_name} fallback
password: !secret fallback_password
captive_portal:
output:
- platform: ledc
pin: GPIO5
id: INTERIOUR
- platform: ledc
pin: GPIO18
id: DIM_FL
- platform: ledc
pin: GPIO27
id: DIM_FR
- platform: ledc
pin: GPIO4
id: BLINK_FL
- platform: ledc
pin: GPIO17
id: BLINK_FR
- platform: ledc
pin: GPIO14
id: DIM_RL
- platform: ledc
pin: GPIO26
id: DIM_RR
light:
- platform: monochromatic
output: INTERIOUR
name: "Interiour lights"
- platform: monochromatic
output: DIM_FL
name: "Dim FL"
- platform: monochromatic
output: DIM_FR
name: "Dim FR"
- platform: monochromatic
output: DIM_RL
name: "Dim RL"
effects:
- pulse:
transition_length: 0.3s
update_interval: 0.5s
- platform: monochromatic
output: DIM_RR
name: "Dim RR"
effects:
- pulse:
transition_length: 0.3s
update_interval: 0.5s
- platform: monochromatic
output: BLINK_FL
name: "Blink FL"
effects:
- pulse:
transition_length: 0.3s
update_interval: 0.5s
- platform: monochromatic
output: BLINK_FR
name: "Blink FR"
effects:
- pulse:
transition_length: 0.3s
update_interval: 0.5s