mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-01-02 11:37:28 +01:00
Compare commits
14 Commits
d4a45add3e
...
6c79fad79c
| Author | SHA1 | Date | |
|---|---|---|---|
| 6c79fad79c | |||
| 1fb6e50d31 | |||
| 1e38d96c2d | |||
| a0c5bc4a0c | |||
| 7b04a57a08 | |||
| f8d585cb54 | |||
| ec63c86137 | |||
| eb04a6bf28 | |||
| 5ed2f4d75e | |||
| d5cea62123 | |||
| 975978256c | |||
| 53b5e6c634 | |||
| b453e35c98 | |||
| 27d5c17422 |
@@ -2,7 +2,8 @@
|
||||
<<: !include wifi.yaml
|
||||
<<: !include api.yaml
|
||||
<<: !include ota.yaml
|
||||
<<: !include logger.yaml
|
||||
# <<: !include logger.yaml
|
||||
<<: !include logger_debug.yaml
|
||||
|
||||
binary_sensor:
|
||||
- <<: !include binary_sensor/status.yaml
|
||||
@@ -18,7 +19,9 @@ sensor:
|
||||
- <<: !include sensor/wifi_signal.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/debug.yaml
|
||||
- <<: !include text_sensor/version.yaml
|
||||
# - <<: !include text_sensor/uptime.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
network:
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<<: !include wifi_esp8266.yaml
|
||||
<<: !include api.yaml
|
||||
<<: !include ota.yaml
|
||||
<<: !include logger.yaml
|
||||
# <<: !include logger.yaml
|
||||
<<: !include logger_debug.yaml
|
||||
|
||||
binary_sensor:
|
||||
- <<: !include binary_sensor/status.yaml
|
||||
@@ -18,9 +19,9 @@ sensor:
|
||||
- <<: !include sensor/wifi_signal.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/debug.yaml
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
# min_ipv6_addr_count: 2
|
||||
3
common/text_sensor/uptime.yaml
Normal file
3
common/text_sensor/uptime.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
platform: uptime
|
||||
name: ${name} Uptime
|
||||
@@ -13,8 +13,8 @@ esp32:
|
||||
# board: m5stamp-pico
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.2.1
|
||||
# platform_version: 6.6.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -58,7 +58,7 @@ light:
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
# rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: esp32_rmt_led_strip
|
||||
@@ -67,7 +67,7 @@ light:
|
||||
rgb_order: GRB
|
||||
pin: 25
|
||||
num_leds: 7
|
||||
rmt_channel: 1
|
||||
# rmt_channel: 1
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -7,9 +7,9 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
@@ -6,7 +6,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -14,8 +14,8 @@ esp32:
|
||||
type: esp-idf
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
ESP_MAC_IGNORE_MAC_CRC_ERROR: y
|
||||
advanced:
|
||||
ignore_efuse_custom_mac: true
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
external_components:
|
||||
|
||||
@@ -15,6 +15,7 @@ esp32:
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
advanced:
|
||||
ignore_efuse_custom_mac: true
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
external_components:
|
||||
|
||||
115
mcu-c6-test-1.yaml
Normal file
115
mcu-c6-test-1.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
substitutions:
|
||||
device: c6-test-1
|
||||
name: C6 TEST 1
|
||||
comment: "DEV"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
# platformio_options:
|
||||
# board_build.flash_mode: dio
|
||||
on_loop:
|
||||
then:
|
||||
lambda: |-
|
||||
static uint32_t last_state = 0;
|
||||
auto state = App.get_app_state();
|
||||
if (state != last_state) {
|
||||
if (state & STATUS_LED_ERROR) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("ERROR");
|
||||
call.perform();
|
||||
} else if (state & STATUS_LED_WARNING) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BOOT");
|
||||
call.perform();
|
||||
} else {
|
||||
//auto call = id(led).turn_off();
|
||||
//call.perform();
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BEACON");
|
||||
call.perform();
|
||||
}
|
||||
last_state = state;
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.2.1
|
||||
platform_version: 6.6.0
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
logs:
|
||||
component: ERROR
|
||||
|
||||
# web_server:
|
||||
# port: 80
|
||||
# version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 8
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: sk6812 #ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
- strobe:
|
||||
name: "BEACON"
|
||||
colors:
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 200ms
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 10s
|
||||
- lambda:
|
||||
name: "ERROR"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(1, 0, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
- lambda:
|
||||
name: "BOOT"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(0, 1, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
115
mcu-c6-test-2.yaml
Normal file
115
mcu-c6-test-2.yaml
Normal file
@@ -0,0 +1,115 @@
|
||||
substitutions:
|
||||
device: c6-test-2
|
||||
name: C6 TEST 2
|
||||
comment: "DEV"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
# platformio_options:
|
||||
# board_build.flash_mode: dio
|
||||
on_loop:
|
||||
then:
|
||||
lambda: |-
|
||||
static uint32_t last_state = 0;
|
||||
auto state = App.get_app_state();
|
||||
if (state != last_state) {
|
||||
if (state & STATUS_LED_ERROR) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("ERROR");
|
||||
call.perform();
|
||||
} else if (state & STATUS_LED_WARNING) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BOOT");
|
||||
call.perform();
|
||||
} else {
|
||||
//auto call = id(led).turn_off();
|
||||
//call.perform();
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BEACON");
|
||||
call.perform();
|
||||
}
|
||||
last_state = state;
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.2.1
|
||||
platform_version: 6.6.0
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
logs:
|
||||
component: ERROR
|
||||
|
||||
# web_server:
|
||||
# port: 80
|
||||
# version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 8
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: sk6812 #ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
- strobe:
|
||||
name: "BEACON"
|
||||
colors:
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 200ms
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 10s
|
||||
- lambda:
|
||||
name: "ERROR"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(1, 0, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
- lambda:
|
||||
name: "BOOT"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(0, 1, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -10,10 +10,10 @@ esphome:
|
||||
esp32:
|
||||
board: esp32cam
|
||||
framework:
|
||||
type: arduino
|
||||
# type: esp-idf
|
||||
version: 2.0.14
|
||||
platform_version: 6.5.0
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
91
mcu-can-node-1.yaml
Normal file
91
mcu-can-node-1.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
substitutions:
|
||||
device: can-node-1
|
||||
name: CAN Node 1
|
||||
comment: "DEV"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: can_bus
|
||||
rx_pin: 22
|
||||
tx_pin: 23
|
||||
can_id: 0
|
||||
bit_rate: 125kbps
|
||||
|
||||
canopen:
|
||||
id: can_gate
|
||||
canbus_id: can_bus
|
||||
node_id: 1
|
||||
entities:
|
||||
- id: boot
|
||||
index: 1
|
||||
tpdo: 0
|
||||
- id: blue_led
|
||||
index: 2
|
||||
tpdo: 0
|
||||
- id: uptime_sensor
|
||||
index: 3
|
||||
tpdo: 0
|
||||
- id: cover1
|
||||
index: 4
|
||||
tpdo: 1
|
||||
# - id: cover2
|
||||
# index: 5
|
||||
# tpdo: 1
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
id: uptime_sensor
|
||||
name: "${name} Uptime"
|
||||
update_interval: 5sec
|
||||
internal: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Boot"
|
||||
id: boot
|
||||
internal: true
|
||||
pin:
|
||||
number: 0
|
||||
inverted: true
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Led"
|
||||
id: blue_led
|
||||
internal: true
|
||||
pin: 2
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: "${name} Cover"
|
||||
id: cover1
|
||||
internal: true
|
||||
device_class: shutter
|
||||
has_built_in_endstop: true
|
||||
open_action:
|
||||
- logger.log: open_action
|
||||
open_duration: 10s
|
||||
close_action:
|
||||
- logger.log: close_action
|
||||
close_duration: 10s
|
||||
stop_action:
|
||||
- logger.log: stop_action
|
||||
91
mcu-can-node-2.yaml
Normal file
91
mcu-can-node-2.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
substitutions:
|
||||
device: can-node-2
|
||||
name: CAN Node 2
|
||||
comment: "DEV"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: can_bus
|
||||
rx_pin: 22
|
||||
tx_pin: 23
|
||||
can_id: 0
|
||||
bit_rate: 125kbps
|
||||
|
||||
canopen:
|
||||
id: can_gate
|
||||
canbus_id: can_bus
|
||||
node_id: 2
|
||||
entities:
|
||||
- id: boot
|
||||
index: 1
|
||||
tpdo: 0
|
||||
- id: blue_led
|
||||
index: 2
|
||||
tpdo: 0
|
||||
- id: uptime_sensor
|
||||
index: 3
|
||||
tpdo: 0
|
||||
- id: cover1
|
||||
index: 4
|
||||
tpdo: 1
|
||||
# - id: cover2
|
||||
# index: 5
|
||||
# tpdo: 1
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
id: uptime_sensor
|
||||
name: "${name} Uptime"
|
||||
update_interval: 5sec
|
||||
internal: true
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Boot"
|
||||
id: boot
|
||||
internal: true
|
||||
pin:
|
||||
number: 0
|
||||
inverted: true
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Led"
|
||||
id: blue_led
|
||||
internal: true
|
||||
pin: 2
|
||||
|
||||
cover:
|
||||
- platform: time_based
|
||||
name: "${name} Cover"
|
||||
id: cover1
|
||||
internal: true
|
||||
device_class: shutter
|
||||
has_built_in_endstop: true
|
||||
open_action:
|
||||
- logger.log: open_action
|
||||
open_duration: 10s
|
||||
close_action:
|
||||
- logger.log: close_action
|
||||
close_duration: 10s
|
||||
stop_action:
|
||||
- logger.log: stop_action
|
||||
@@ -10,8 +10,8 @@ esphome:
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
# type: esp-idf
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
|
||||
external_components:
|
||||
# - source: github://pr#3017
|
||||
@@ -61,13 +61,14 @@ binary_sensor:
|
||||
inverted: true
|
||||
|
||||
light:
|
||||
- platform: neopixelbus
|
||||
type: GRB
|
||||
pin: 27
|
||||
variant: WS2812
|
||||
num_leds: 1
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
id: neo
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
# Use default parameters:
|
||||
- random:
|
||||
|
||||
@@ -14,8 +14,8 @@ esp32:
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.2.1
|
||||
# platform_version: 6.6.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -11,8 +11,14 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.2.1
|
||||
# platform_version: 6.6.0
|
||||
|
||||
# external_components:
|
||||
# - source: github://pr#7958
|
||||
# refresh: 0s
|
||||
# components:
|
||||
# - rotary_encoder
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -9,9 +9,9 @@ esphome:
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
# framework:
|
||||
framework:
|
||||
# type: arduino
|
||||
# # type: esp-idf
|
||||
type: esp-idf
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -25,12 +25,12 @@ switch:
|
||||
id: sensor_power
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
dallas:
|
||||
- pin: GPIO25
|
||||
update_interval: 10s
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: GPIO25
|
||||
|
||||
sensor:
|
||||
- platform: dallas
|
||||
index: 0
|
||||
- platform: dallas_temp
|
||||
name: $name Dallas
|
||||
id: temp
|
||||
update_interval: 10 s
|
||||
@@ -33,9 +33,8 @@ esp32:
|
||||
# type: arduino
|
||||
# version: 2.0.14
|
||||
type: esp-idf
|
||||
# version: 5.1.2
|
||||
version: 5.2.1
|
||||
platform_version: 6.6.0
|
||||
# version: 5.2.1
|
||||
# platform_version: 6.6.0
|
||||
|
||||
external_components:
|
||||
- source: github://pr#7072
|
||||
@@ -57,7 +56,7 @@ light:
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
# rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -12,8 +12,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
version: 2.0.14
|
||||
platform_version: 6.5.0
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
# type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
@@ -32,7 +32,7 @@ external_components:
|
||||
refresh: 0s
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
common: !include common/common_esp8266.yaml # this profile is without fancy features that are not supported by arduino
|
||||
|
||||
api:
|
||||
services:
|
||||
@@ -45,8 +45,8 @@ api:
|
||||
rtttl: !lambda 'return song;'
|
||||
|
||||
# i2c:
|
||||
# sda: 32
|
||||
# scl: 26
|
||||
# sda: 26
|
||||
# scl: 32
|
||||
# scan: true #false
|
||||
# frequency: 100kHz
|
||||
|
||||
@@ -127,7 +127,7 @@ speaker:
|
||||
i2s_dout_pin:
|
||||
number: 22
|
||||
allow_other_uses: true
|
||||
mode: mono
|
||||
channel: mono
|
||||
|
||||
rtttl:
|
||||
id: my_rtttl
|
||||
@@ -140,10 +140,10 @@ microphone:
|
||||
adc_type: external
|
||||
pdm: true
|
||||
|
||||
# voice_assistant:
|
||||
# microphone: echo_microphone
|
||||
# on_tts_end:
|
||||
# - media_player.play_media:
|
||||
# id: media_out
|
||||
# media_url: !lambda |-
|
||||
# return x;
|
||||
voice_assistant:
|
||||
microphone: echo_microphone
|
||||
on_tts_end:
|
||||
- media_player.play_media:
|
||||
id: media_out
|
||||
media_url: !lambda |-
|
||||
return x;
|
||||
@@ -26,7 +26,7 @@ external_components:
|
||||
# refresh: 0s
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
# api:
|
||||
# services:
|
||||
@@ -39,8 +39,8 @@ packages:
|
||||
# rtttl: !lambda 'return song;'
|
||||
|
||||
i2c:
|
||||
sda: 32
|
||||
scl: 26
|
||||
sda: 26
|
||||
scl: 32
|
||||
scan: true #false
|
||||
frequency: 100kHz
|
||||
|
||||
@@ -133,25 +133,25 @@ media_player:
|
||||
dac_type: external
|
||||
i2s_dout_pin:
|
||||
number: 22
|
||||
# allow_other_uses: true
|
||||
allow_other_uses: true
|
||||
mode: mono
|
||||
on_play:
|
||||
- light.turn_on: led_light
|
||||
on_idle:
|
||||
- light.turn_off: led_light
|
||||
|
||||
# speaker:
|
||||
# - platform: i2s_audio
|
||||
# id: echo_speaker
|
||||
# dac_type: external
|
||||
# i2s_dout_pin:
|
||||
# number: 22
|
||||
# allow_other_uses: true
|
||||
# mode: mono
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: echo_speaker
|
||||
dac_type: external
|
||||
i2s_dout_pin:
|
||||
number: 22
|
||||
allow_other_uses: true
|
||||
channel: mono
|
||||
|
||||
# rtttl:
|
||||
# id: my_rtttl
|
||||
# speaker: echo_speaker
|
||||
rtttl:
|
||||
id: my_rtttl
|
||||
speaker: echo_speaker
|
||||
|
||||
# microphone:
|
||||
# - platform: i2s_audio
|
||||
|
||||
@@ -6,7 +6,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
# wifi:
|
||||
@@ -15,8 +16,9 @@ esphome:
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
dallas:
|
||||
- pin: 4
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: 4
|
||||
|
||||
binary_sensor:
|
||||
- platform: template
|
||||
@@ -29,7 +31,7 @@ binary_sensor:
|
||||
}
|
||||
|
||||
sensor:
|
||||
- platform: dallas
|
||||
- platform: dallas_temp
|
||||
address: 0x6203168B32A7FF28
|
||||
# index: 0
|
||||
name: "${name}"
|
||||
|
||||
@@ -11,8 +11,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
external_components:
|
||||
- source: github://mknjc/esphome@ds248x
|
||||
|
||||
@@ -11,8 +11,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -97,6 +97,7 @@ switch:
|
||||
|
||||
# Bluetooth related stuff
|
||||
esp32_ble_tracker:
|
||||
id: ${name}_ble_tracker
|
||||
scan_parameters:
|
||||
duration: 1min
|
||||
|
||||
|
||||
@@ -10,8 +10,8 @@ esphome:
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
framework:
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
type: esp-idf
|
||||
|
||||
# external_components:
|
||||
@@ -71,6 +71,12 @@ i2c:
|
||||
# gateway: 10.17.240.1
|
||||
# subnet: 255.255.255.0
|
||||
|
||||
|
||||
ethernet:
|
||||
# use_address: 10.17.241.254
|
||||
# use_address: 10.17.241.98
|
||||
use_address: mcu-gateway.local
|
||||
|
||||
uart:
|
||||
id: uart_modbus
|
||||
tx_pin: 4
|
||||
|
||||
307
mcu-heating.yaml
307
mcu-heating.yaml
@@ -12,8 +12,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
external_components:
|
||||
- source: github://mknjc/esphome@ds248x
|
||||
@@ -117,36 +117,6 @@ time:
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
on_time:
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 5
|
||||
# # days_of_week: MON-FRI
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "AUTO"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 6
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "OFF"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 16
|
||||
# # days_of_week: MON-FRI
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "AUTO"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 0
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "OFF"
|
||||
- seconds: 0
|
||||
minutes: /1
|
||||
# hours: 5-23
|
||||
@@ -154,72 +124,16 @@ time:
|
||||
then:
|
||||
lambda: |-
|
||||
if (id(hot_water_heater).state >= 67.0) {
|
||||
id(relay_1).turn_off();
|
||||
}
|
||||
// ## Solar
|
||||
// move to temp sensor?
|
||||
// //ESP_LOGD("main", "(hot_water_solar - current_hot_water_solar_delta) > set_hot_water_solar_temperature [(%.2f - %.2f) > %.2f] == TRUE", id(hot_water_solar).state, id(set_hot_water_solar_delta), id(set_hot_water_solar_temperature));
|
||||
//if ((id(hot_water_solar).state <= id(set_hot_water_solar_temperature)) && ((id(temp_1).state + id(set_hot_water_solar_delta)) >= id(hot_water_solar).state)) {
|
||||
// ESP_LOGD("main", "Water in solar tank is colder AND temperature of solar collector is higher => ON");
|
||||
// id(relay_1).turn_on();
|
||||
//}
|
||||
//if ((id(hot_water_solar).state > id(set_hot_water_solar_temperature)) || ((id(temp_1).state - id(hot_water_solar).state) < (id(set_hot_water_solar_delta) / 2))) {
|
||||
// ESP_LOGD("main", "Water in solar tank is higher OR temperature of solar collector is lower => OFF");
|
||||
// id(relay_1).turn_off();
|
||||
//}
|
||||
|
||||
// ## Hot Water
|
||||
if (!true) {
|
||||
if ((id(ha_time).now().hour >= 5) && (id(ha_time).now().hour <= 23)) {
|
||||
if (id(hot_water_heater).state <= id(set_hot_water_heating_temperature_min)) {
|
||||
ESP_LOGD("main", "Water in heated tank is cold, needs to reheat => ON");
|
||||
id(relay_1).turn_on();
|
||||
//id(relay_3).turn_on();
|
||||
id(relay_4).turn_on();
|
||||
} else {
|
||||
if (id(hot_water_heater).state >= id(set_hot_water_heating_temperature_max)) {
|
||||
ESP_LOGD("main", "Water in heated tank is OK => OFF");
|
||||
id(relay_1).turn_off();
|
||||
//id(relay_3).turn_off();
|
||||
id(relay_4).turn_off();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ESP_LOGD("main", "Night Mode, Hot water heating => OFF");
|
||||
id(relay_1).turn_off();
|
||||
}
|
||||
id(hot_water_demand).turn_off();
|
||||
}
|
||||
|
||||
// ## Heating - TYPE 1: heat water to desired max temperature at specified times
|
||||
// ## Heating - TYPE 2: mantain temperature in min-max range in desired time range
|
||||
//if ( (id(relay_2).state) && (id(heating_climate).mode == 0)) {
|
||||
if (id(heating_climate).mode == 0) {
|
||||
id(relay_2).turn_off();
|
||||
id(heating_demand).turn_off();
|
||||
ESP_LOGD("main", "Climate Heating is OFF => Turn Heating OFF!");
|
||||
} else {
|
||||
ESP_LOGD("main", "Climate Heating state is other than OFFF => dont touch heating");
|
||||
}
|
||||
if (!true) {
|
||||
//if (!id(heating_override).state) { // if not overriden from Thermosta
|
||||
if (id(ha_time).now().hour >= 7 && id(ha_time).now().hour <= 23) { // is between 5:00-23:59
|
||||
if ((id(current_heating_temperature_min).state <= id(set_heating_temperature_min)) && !id(heating_fireplace_status).state) { // temperature LOWER than set AND fireplace is NOT ON
|
||||
ESP_LOGD("main", "Is cold inside, heating => ON DISABLED");
|
||||
id(relay_2).turn_on();
|
||||
} else {
|
||||
if (id(current_heating_temperature_min).state >= id(set_heating_temperature_max)) {
|
||||
ESP_LOGD("main", "Temperature is fine, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
if (id(heating_fireplace_status).state) {
|
||||
ESP_LOGD("main", "Fireplace is ON, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
}
|
||||
} else { // othervise night mode
|
||||
ESP_LOGD("main", "Night Mode, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
//}
|
||||
ESP_LOGD("main", "Climate Heating state is other than OFF => dont touch heating");
|
||||
}
|
||||
|
||||
climate:
|
||||
@@ -235,9 +149,9 @@ climate:
|
||||
default_target_temperature_low: 48 °C
|
||||
default_target_temperature_high: 56 °C
|
||||
heat_action:
|
||||
- switch.turn_on: relay_1
|
||||
- switch.turn_on: hot_water_demand
|
||||
idle_action:
|
||||
- switch.turn_off: relay_1
|
||||
- switch.turn_off: hot_water_demand
|
||||
away_config:
|
||||
default_target_temperature_low: 30 °C
|
||||
default_target_temperature_high: 40 °C
|
||||
@@ -252,22 +166,12 @@ climate:
|
||||
default_target_temperature_low: 19 °C
|
||||
default_target_temperature_high: 20 °C
|
||||
heat_action:
|
||||
- switch.turn_on: relay_2
|
||||
- switch.turn_on: heating_demand
|
||||
idle_action:
|
||||
- switch.turn_off: relay_2
|
||||
- switch.turn_off: heating_demand
|
||||
away_config:
|
||||
default_target_temperature_low: 17 °C
|
||||
default_target_temperature_high: 18 °C
|
||||
# interval:
|
||||
# - interval: 5s
|
||||
# then:
|
||||
# - display.page.show_next: display_1
|
||||
# # - display.page.show_next: display_2
|
||||
# - component.update: display_1
|
||||
# # - component.update: display_2
|
||||
|
||||
# dallas:
|
||||
# - pin: 32
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
@@ -298,113 +202,30 @@ uart:
|
||||
stop_bits: 2
|
||||
# debug:
|
||||
|
||||
# light:
|
||||
# - platform: neopixelbus
|
||||
# type: GRB
|
||||
# pin: 27
|
||||
# variant: WS2812
|
||||
# num_leds: 1
|
||||
# name: "${name} Light"
|
||||
# id: neo
|
||||
# effects:
|
||||
# # Use default parameters:
|
||||
# - random:
|
||||
# # Customize parameters
|
||||
# - random:
|
||||
# name: "My Slow Random Effect"
|
||||
# transition_length: 30s
|
||||
# update_interval: 30s
|
||||
# - random:
|
||||
# name: "My Fast Random Effect"
|
||||
# transition_length: 4s
|
||||
# update_interval: 5s
|
||||
# - strobe:
|
||||
# - strobe:
|
||||
# name: Strobe Effect With Custom Values
|
||||
# colors:
|
||||
# - state: True
|
||||
# brightness: 100%
|
||||
# red: 100%
|
||||
# green: 90%
|
||||
# blue: 0%
|
||||
# duration: 500ms
|
||||
# - state: False
|
||||
# duration: 250ms
|
||||
# - state: True
|
||||
# brightness: 100%
|
||||
# red: 0%
|
||||
# green: 100%
|
||||
# blue: 0%
|
||||
# duration: 500ms
|
||||
# - flicker:
|
||||
# - flicker:
|
||||
# name: Flicker Effect With Custom Values
|
||||
# alpha: 95%
|
||||
# intensity: 1.5%
|
||||
# - addressable_rainbow:
|
||||
# - addressable_rainbow:
|
||||
# name: Rainbow Effect With Custom Values
|
||||
# speed: 10
|
||||
# width: 50
|
||||
# - addressable_scan:
|
||||
# - addressable_scan:
|
||||
# name: Scan Effect With Custom Values
|
||||
# move_interval: 100ms
|
||||
|
||||
pca9554:
|
||||
- id: pca9554_module
|
||||
address: 0x27
|
||||
|
||||
switch:
|
||||
# - platform: gpio
|
||||
# name: "${name} Relay 1" # Solar pump
|
||||
# id: relay_1
|
||||
# pin:
|
||||
# pcf8574: relay_module
|
||||
# number: 0
|
||||
# mode: OUTPUT
|
||||
# inverted: true
|
||||
- platform: gpio
|
||||
name: "${name} Relay 2" # Hot Water Heating Demand (to Heater)
|
||||
id: relay_1
|
||||
name: "Hot Water Demand" # Hot Water Heating Demand (to Heater)
|
||||
id: hot_water_demand
|
||||
pin: 22
|
||||
inverted: true
|
||||
# pin:
|
||||
# mcp23xxx: relay_module
|
||||
# # pcf8574: relay_module
|
||||
# number: 0
|
||||
# mode: OUTPUT
|
||||
# inverted: true
|
||||
# on_turn_on:
|
||||
# - light.addressable_set:
|
||||
# id: neo
|
||||
# range_from: 1
|
||||
# range_to: 2
|
||||
# red: 0%
|
||||
# green: 100%
|
||||
# blue: 0%
|
||||
# on_turn_off:
|
||||
# - light.addressable_set:
|
||||
# id: neo
|
||||
# range_from: 1
|
||||
# range_to: 2
|
||||
# red: 100%
|
||||
# green: 0%
|
||||
# blue: 0%
|
||||
- platform: gpio
|
||||
name: "${name} Relay 3" # Heating Demand (to Heater)
|
||||
id: relay_2
|
||||
name: "Heating Demand" # Heating Demand (to Heater)
|
||||
id: heating_demand
|
||||
pin: 19
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "${name_1} Power Level II"
|
||||
id: relay_3
|
||||
id: heating_power_level_2
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 4
|
||||
- platform: gpio
|
||||
name: "${name_1} Power Level III"
|
||||
id: relay_4
|
||||
id: heating_power_level_3
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 5
|
||||
@@ -432,14 +253,6 @@ sensor:
|
||||
address: 0x5A041750B2C8FF28 # Hot Water Tank - Bottom (Solar)
|
||||
name: "Hot Water - Solar"
|
||||
id: 'hot_water_solar'
|
||||
# - platform: ds248x
|
||||
# address: 0xB2041750CF1AFF28 # Heating Water Feed (OUT from Heater, TO System)
|
||||
# name: "Heating OUT"
|
||||
# id: 'heating_out'
|
||||
# - platform: ds248x
|
||||
# address: 0xDB041750EAE2FF28 # Heating Water Return (OUT from System, TO Heater)
|
||||
# name: "Heating IN"
|
||||
# id: 'heating_in'
|
||||
- platform: ds248x
|
||||
address: 0xF701143E397FAA28 # Heater Tank
|
||||
name: "Heater"
|
||||
@@ -657,85 +470,6 @@ sensor:
|
||||
lambda: |-
|
||||
return id(heater_l1_energy).state + id(heater_l2_energy).state + id(heater_l3_energy).state ;
|
||||
|
||||
# font:
|
||||
# - file: 'slkscr.ttf'
|
||||
# id: font_1
|
||||
# size: 8
|
||||
# - file: 'BebasNeue-Regular.ttf'
|
||||
# id: font_2
|
||||
# size: 48
|
||||
# - file: 'arial.ttf'
|
||||
# id: font_3
|
||||
# size: 14
|
||||
# - file: 'B612Mono-Regular.ttf'
|
||||
# id: font_4
|
||||
# size: 16
|
||||
|
||||
# display:
|
||||
# - platform: ssd1306_i2c
|
||||
# model: "SSD1306 128x64"
|
||||
# address: 0x3C # 0x78
|
||||
# #address: 0x3D # 0x7A
|
||||
# id: display_1
|
||||
# pages:
|
||||
# # - id: page_1
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 1");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_1).state);
|
||||
# # }
|
||||
# # - id: page_2
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 2");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_2).state);
|
||||
# # }
|
||||
# # - id: page_3
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 3");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_3).state);
|
||||
# # }
|
||||
# # - id: page_4
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 4");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_4).state);
|
||||
# # }
|
||||
# # - id: page_5
|
||||
# # lambda: |-
|
||||
# # it.printf(0, 0, id(font_1), TextAlign::TOP_LEFT, "RELAY 1: %s", id(relay_1).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 8, id(font_1), TextAlign::TOP_LEFT, "RELAY 2: %s", id(relay_2).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 16, id(font_1), TextAlign::TOP_LEFT, "RELAY 3: %s", id(relay_3).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 24, id(font_1), TextAlign::TOP_LEFT, "RELAY 4: %s", id(relay_4).state ? "ON" : "OFF");
|
||||
# - id: page_6
|
||||
# lambda: |-
|
||||
# it.print(0, 0, id(font_3), "Hot Water");
|
||||
# it.printf(100, 0, id(font_3), TextAlign::TOP_LEFT, "%s", id(relay_2).state ? "ON" : "OFF");
|
||||
# if (id(hot_water_heater).has_state()) {
|
||||
# it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(hot_water_heater).state);
|
||||
# }
|
||||
|
||||
# - platform: ssd1306_i2c
|
||||
# model: "SSD1306 128x64"
|
||||
# #address: 0x3C # 0x78
|
||||
# address: 0x3D # 0x7A
|
||||
# id: display_2
|
||||
# pages:
|
||||
# - id: page_2_1
|
||||
# lambda: |-
|
||||
# it.print(0, 0, id(font_3), "Heating");
|
||||
# it.printf(100, 0, id(font_3), TextAlign::TOP_LEFT, "%s", id(relay_3).state ? "ON" : "OFF");
|
||||
# it.print(100, 32, id(font_1), TextAlign::BOTTOM_LEFT, "max");
|
||||
# if (id(current_heating_temperature_max).has_state()) {
|
||||
# it.printf(0, 32, id(font_4), TextAlign::BOTTOM_LEFT, "%.1f°", id(current_heating_temperature_max).state);
|
||||
# }
|
||||
# it.print(100, 48, id(font_1), TextAlign::BOTTOM_LEFT, "min");
|
||||
# if (id(current_heating_temperature_min).has_state()) {
|
||||
# it.printf(0, 48, id(font_4), TextAlign::BOTTOM_LEFT, "%.1f°", id(current_heating_temperature_min).state);
|
||||
# }
|
||||
# it.printf(0, 64, id(font_4), TextAlign::BOTTOM_LEFT, "%s", id(off_peak_status).state ? "OFF PEAK POWER" : "Disabled");
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Off Peak" # Off Peak (HDO)
|
||||
@@ -764,15 +498,6 @@ binary_sensor:
|
||||
filters:
|
||||
- delayed_on: 300ms
|
||||
- delayed_off: 300ms
|
||||
- platform: gpio
|
||||
name: "${name} Input 3" # Heating Demand/Override (from Thermostat)
|
||||
id: heating_override
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 3
|
||||
filters:
|
||||
- delayed_on: 300ms
|
||||
- delayed_off: 300ms
|
||||
- platform: template
|
||||
id: heating_fireplace_status
|
||||
lambda: |-
|
||||
@@ -785,7 +510,7 @@ binary_sensor:
|
||||
id: heater_alarm
|
||||
name: "Heater Alarm"
|
||||
lambda: |-
|
||||
if (id(off_peak_status).state && (id(relay_2).state || id(relay_3).state) && !id(heater_on).state) {
|
||||
if (id(off_peak_status).state && (id(heating_demand).state || id(heating_power_level_2).state) && !id(heater_on).state) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
@@ -6,8 +6,6 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
# on_boot:
|
||||
# priority: -10
|
||||
# then:
|
||||
@@ -21,6 +19,9 @@ esphome:
|
||||
# - delay: 2s
|
||||
# - switch.turn_off: relay_5
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -13,8 +13,8 @@ esp32:
|
||||
# board: m5stamp-pico
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
@@ -8,6 +8,7 @@ esphome:
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
includes: ota.h
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
@@ -15,8 +16,8 @@ esp32:
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
# Required to achieve sufficient PSRAM bandwidth
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
||||
@@ -31,13 +32,6 @@ psram:
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/clydebarrow/esphome
|
||||
ref: fd15094c0860df23d532881df36cfd16c7da1091 #previous commit - wont be needed in the future
|
||||
components: [ lvgl ]
|
||||
|
||||
# PINOUTS: ESP32 Cheap Yellow Display, 4.3", IPS, Capacitive
|
||||
## Display
|
||||
# R0 GND
|
||||
@@ -177,8 +171,8 @@ number:
|
||||
step: 1
|
||||
optimistic: True
|
||||
|
||||
debug:
|
||||
update_interval: 5s
|
||||
# debug:
|
||||
# update_interval: 5s
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
@@ -194,15 +188,15 @@ sensor:
|
||||
id: counting_number
|
||||
cycle: True
|
||||
- script.execute: update_display
|
||||
- platform: debug
|
||||
free:
|
||||
name: "${name} Heap Free"
|
||||
block:
|
||||
name: "${name} Heap Max Block"
|
||||
loop_time:
|
||||
name: "${name} Loop Time"
|
||||
psram:
|
||||
name: "${name} Free PSRAM"
|
||||
# - platform: debug
|
||||
# free:
|
||||
# name: "${name} Heap Free"
|
||||
# block:
|
||||
# name: "${name} Heap Max Block"
|
||||
# loop_time:
|
||||
# name: "${name} Loop Time"
|
||||
# psram:
|
||||
# name: "${name} Free PSRAM"
|
||||
- platform: uptime
|
||||
# name: Uptime Sensor
|
||||
internal: True
|
||||
@@ -231,9 +225,9 @@ sensor:
|
||||
script:
|
||||
- id: update_display
|
||||
then:
|
||||
- lvgl.indicator.line.update:
|
||||
id: power_meter_input
|
||||
value: !lambda return id(counting_number).state;
|
||||
# - lvgl.indicator.line.update:
|
||||
# id: power_meter_input
|
||||
# value: !lambda return id(counting_number).state;
|
||||
- lvgl.label.update:
|
||||
id: battery_kw
|
||||
text: !lambda |-
|
||||
@@ -257,15 +251,15 @@ script:
|
||||
static char buf[8];
|
||||
snprintf(buf, sizeof(buf), "%.1fkW", id(counting_number).state);
|
||||
return buf;
|
||||
- lvgl.img.update:
|
||||
id: img_solar_power
|
||||
src: solar_power_icon
|
||||
img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
#img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
- lvgl.indicator.line.update:
|
||||
id: power_meter_input2
|
||||
value: !lambda return id(counting_number).state;
|
||||
# - lvgl.img.update:
|
||||
# id: img_solar_power
|
||||
# src: solar_power_icon
|
||||
# img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
# #img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
# #bg_color: 0xFFFFFF
|
||||
# # - lvgl.indicator.line.update:
|
||||
# # id: power_meter_input2
|
||||
# # value: !lambda return id(counting_number).state;
|
||||
- lvgl.label.update:
|
||||
id: battery_kw2
|
||||
text: !lambda |-
|
||||
@@ -289,12 +283,12 @@ script:
|
||||
static char buf[8];
|
||||
snprintf(buf, sizeof(buf), "%.1fkW", id(counting_number).state);
|
||||
return buf;
|
||||
- lvgl.img.update:
|
||||
id: img_solar_power2
|
||||
src: solar_power_icon
|
||||
img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
#img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
# - lvgl.img.update:
|
||||
# id: img_solar_power2
|
||||
# src: solar_power_icon
|
||||
# img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
# #img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
# #bg_color: 0xFFFFFF
|
||||
|
||||
image:
|
||||
- file: mdi:sun-wireless-outline
|
||||
|
||||
@@ -12,8 +12,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -10,6 +10,11 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +27,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -10,7 +10,12 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
# on_boot:
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
# priority: -100
|
||||
# then:
|
||||
# - wait_until:
|
||||
@@ -35,6 +40,9 @@ external_components:
|
||||
ref: dev
|
||||
refresh: 0s
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -10,6 +10,11 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +27,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -10,6 +10,11 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +27,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -10,6 +10,11 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +27,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -248,7 +256,7 @@ light:
|
||||
rgb_order: GRB
|
||||
pin: 23
|
||||
num_leds: 3
|
||||
rmt_channel: 0
|
||||
# rmt_channel: 0
|
||||
chipset: SK6812
|
||||
effects:
|
||||
- pulse:
|
||||
|
||||
@@ -10,6 +10,11 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +27,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -14,11 +14,9 @@ esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: esp32c3
|
||||
framework:
|
||||
# type: arduino
|
||||
# version: 2.0.14
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -29,8 +29,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
204
mcu-pow-1.yaml
Normal file
204
mcu-pow-1.yaml
Normal file
@@ -0,0 +1,204 @@
|
||||
substitutions:
|
||||
device: pow-1
|
||||
name: POW 1
|
||||
comment: "DEV"
|
||||
update_interval: 10s
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state.
|
||||
priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(v_sensor).state > 10;'
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
else:
|
||||
- switch.turn_off: relay_1
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
interval:
|
||||
- interval: 30s
|
||||
then:
|
||||
if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- light.turn_on: wifi_status_led
|
||||
else:
|
||||
- light.turn_off: wifi_status_led
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
uart:
|
||||
rx_pin: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 0
|
||||
id: reset
|
||||
internal: true
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 10ms
|
||||
on_click:
|
||||
- max_length: 350ms # short press to toggle the relay
|
||||
then:
|
||||
switch.toggle: relay_1
|
||||
- min_length: 360ms # long press to cycle display info
|
||||
max_length: 3s
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: page
|
||||
then:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: OFF
|
||||
else:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: ON
|
||||
- platform: template # this is a fake sensor to tell the screen which info to show on display
|
||||
id: page
|
||||
publish_initial_state: true
|
||||
internal: true
|
||||
- platform: template
|
||||
name: "${name} Load"
|
||||
id: load_on
|
||||
lambda: |-
|
||||
if (isnan(id(w_sensor).state)) {
|
||||
return {};
|
||||
} else if (id(w_sensor).state > 4) {
|
||||
// Running
|
||||
return true;
|
||||
} else {
|
||||
// Not running
|
||||
return false;
|
||||
}
|
||||
|
||||
display:
|
||||
platform: tm1621
|
||||
id: tm1621_display
|
||||
cs_pin: 25
|
||||
data_pin: 14
|
||||
read_pin: 26
|
||||
write_pin: 27
|
||||
lambda: |-
|
||||
if (id(page).state) {
|
||||
it.display_voltage(true);
|
||||
it.display_kwh(false);
|
||||
it.printf(0, "%.1f", id(v_sensor).state);
|
||||
it.printf(1, "%.1f", id(a_sensor).state);
|
||||
} else {
|
||||
it.display_voltage(false);
|
||||
it.display_kwh(true);
|
||||
it.printf(0, "%.1f", id(wh_sensor).state);
|
||||
it.printf(1, "%.1f", id(w_sensor).state);
|
||||
}
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: switch_led
|
||||
output: led
|
||||
internal: True
|
||||
- platform: status_led
|
||||
id: wifi_status_led
|
||||
internal: True
|
||||
pin:
|
||||
number: 5
|
||||
inverted: True
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: led
|
||||
pin:
|
||||
number: 18
|
||||
inverted: True
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
current:
|
||||
name: "${name} Current"
|
||||
id: a_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
voltage:
|
||||
name: "${name} Voltage"
|
||||
id: v_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
power:
|
||||
name: "${name} Power"
|
||||
id: w_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
on_value_range:
|
||||
- above: 4.0
|
||||
then:
|
||||
- light.turn_on: switch_led
|
||||
- below: 3.0
|
||||
then:
|
||||
- light.turn_off: switch_led
|
||||
energy:
|
||||
name: "${name} Energy"
|
||||
id: wh_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${name} Total Daily Energy"
|
||||
power_id: w_sensor
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
|
||||
- platform: template
|
||||
name: "${name} Power Factor"
|
||||
device_class: power_factor
|
||||
id: power_factor
|
||||
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "${name} Relay"
|
||||
optimistic: true
|
||||
id: relay_1
|
||||
turn_off_action:
|
||||
- switch.turn_on: relay_off
|
||||
turn_on_action:
|
||||
- switch.turn_on: relay_on
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_off
|
||||
pin: 4
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
- light.turn_off: switch_led
|
||||
interlock: [relay_on]
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_on
|
||||
pin: 2
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_on # bi-stable relay so no need to keep on
|
||||
- light.turn_on: switch_led
|
||||
interlock: [relay_off]
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
204
mcu-pow-2.yaml
Normal file
204
mcu-pow-2.yaml
Normal file
@@ -0,0 +1,204 @@
|
||||
substitutions:
|
||||
device: pow-2
|
||||
name: POW 2
|
||||
comment: "DEV"
|
||||
update_interval: 10s
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state.
|
||||
priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(v_sensor).state > 10;'
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
else:
|
||||
- switch.turn_off: relay_1
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
interval:
|
||||
- interval: 30s
|
||||
then:
|
||||
if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- light.turn_on: wifi_status_led
|
||||
else:
|
||||
- light.turn_off: wifi_status_led
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
uart:
|
||||
rx_pin: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 0
|
||||
id: reset
|
||||
internal: true
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 10ms
|
||||
on_click:
|
||||
- max_length: 350ms # short press to toggle the relay
|
||||
then:
|
||||
switch.toggle: relay_1
|
||||
- min_length: 360ms # long press to cycle display info
|
||||
max_length: 3s
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: page
|
||||
then:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: OFF
|
||||
else:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: ON
|
||||
- platform: template # this is a fake sensor to tell the screen which info to show on display
|
||||
id: page
|
||||
publish_initial_state: true
|
||||
internal: true
|
||||
- platform: template
|
||||
name: "${name} Load"
|
||||
id: load_on
|
||||
lambda: |-
|
||||
if (isnan(id(w_sensor).state)) {
|
||||
return {};
|
||||
} else if (id(w_sensor).state > 4) {
|
||||
// Running
|
||||
return true;
|
||||
} else {
|
||||
// Not running
|
||||
return false;
|
||||
}
|
||||
|
||||
display:
|
||||
platform: tm1621
|
||||
id: tm1621_display
|
||||
cs_pin: 25
|
||||
data_pin: 14
|
||||
read_pin: 26
|
||||
write_pin: 27
|
||||
lambda: |-
|
||||
if (id(page).state) {
|
||||
it.display_voltage(true);
|
||||
it.display_kwh(false);
|
||||
it.printf(0, "%.1f", id(v_sensor).state);
|
||||
it.printf(1, "%.1f", id(a_sensor).state);
|
||||
} else {
|
||||
it.display_voltage(false);
|
||||
it.display_kwh(true);
|
||||
it.printf(0, "%.1f", id(wh_sensor).state);
|
||||
it.printf(1, "%.1f", id(w_sensor).state);
|
||||
}
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: switch_led
|
||||
output: led
|
||||
internal: True
|
||||
- platform: status_led
|
||||
id: wifi_status_led
|
||||
internal: True
|
||||
pin:
|
||||
number: 5
|
||||
inverted: True
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: led
|
||||
pin:
|
||||
number: 18
|
||||
inverted: True
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
current:
|
||||
name: "${name} Current"
|
||||
id: a_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
voltage:
|
||||
name: "${name} Voltage"
|
||||
id: v_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
power:
|
||||
name: "${name} Power"
|
||||
id: w_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
on_value_range:
|
||||
- above: 4.0
|
||||
then:
|
||||
- light.turn_on: switch_led
|
||||
- below: 3.0
|
||||
then:
|
||||
- light.turn_off: switch_led
|
||||
energy:
|
||||
name: "${name} Energy"
|
||||
id: wh_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: "${name} Total Daily Energy"
|
||||
power_id: w_sensor
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
|
||||
- platform: template
|
||||
name: "${name} Power Factor"
|
||||
device_class: power_factor
|
||||
id: power_factor
|
||||
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "${name} Relay"
|
||||
optimistic: true
|
||||
id: relay_1
|
||||
turn_off_action:
|
||||
- switch.turn_on: relay_off
|
||||
turn_on_action:
|
||||
- switch.turn_on: relay_on
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_off
|
||||
pin: 4
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
- light.turn_off: switch_led
|
||||
interlock: [relay_on]
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_on
|
||||
pin: 2
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_on # bi-stable relay so no need to keep on
|
||||
- light.turn_on: switch_led
|
||||
interlock: [relay_off]
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
@@ -6,7 +6,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -11,8 +11,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -9,7 +9,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -9,7 +9,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -16,7 +16,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -42,7 +42,7 @@ binary_sensor:
|
||||
# - light.turn_off: light_blue
|
||||
- platform: homeassistant
|
||||
id: motion
|
||||
entity_id: binary_sensor.zigbee_staircase_pir_motion
|
||||
entity_id: binary_sensor.zigbee_staircase_pir_occupancy
|
||||
on_state:
|
||||
if:
|
||||
condition:
|
||||
|
||||
@@ -6,19 +6,13 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
# Module type 18 Generic Module type
|
||||
# D2 GPIO4 51 IRRecv IR Remote (optional, view console for debugging!)
|
||||
# D1 GPIO5 38 PWM2 BLUE
|
||||
# D6 GPIO12 37 PWM1 RED
|
||||
# D7 GPIO13 39 PWM3 GREEN
|
||||
# D8 GPIO15 40 PWM4 WHITE
|
||||
|
||||
## H801 LED module
|
||||
# Function Pin Channel
|
||||
# R GPIO15 PWM1
|
||||
@@ -33,15 +27,6 @@ light:
|
||||
- platform: status_led
|
||||
id: status_led_id
|
||||
pin: 5
|
||||
# - platform: rgbww
|
||||
# name: "${name}"
|
||||
# red: pwm_red
|
||||
# green: pwm_green
|
||||
# blue: pwm_blue
|
||||
# cold_white: pwm_cold_white
|
||||
# warm_white: pwm_warm_white
|
||||
# cold_white_color_temperature: 6536 K
|
||||
# warm_white_color_temperature: 2000 K
|
||||
- platform: monochromatic
|
||||
name: "${name}"
|
||||
output: pwm_cold_white
|
||||
|
||||
@@ -34,8 +34,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -43,12 +43,12 @@ external_components:
|
||||
packages:
|
||||
wifi: !include common/wifi.yaml
|
||||
logger: !include common/logger.yaml
|
||||
api: !include common/api.yaml
|
||||
# api: !include common/api.yaml
|
||||
ota: !include common/ota.yaml
|
||||
# common: !include common/common.yaml
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
wifi:
|
||||
reboot_timeout: 0s
|
||||
|
||||
@@ -46,6 +46,7 @@ external_components:
|
||||
|
||||
packages:
|
||||
common: !include common/logger.yaml
|
||||
wifi: !include common/wifi.yaml
|
||||
# common: !include common/common.yaml
|
||||
|
||||
# debug:
|
||||
|
||||
@@ -6,7 +6,8 @@ substitutions:
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -24,8 +24,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
Reference in New Issue
Block a user