Compare commits

...

8 Commits

Author SHA1 Message Date
ba1aea9132 Add archive to git ignore 2025-05-09 21:08:36 +02:00
918b54e5ed Delete old files 2025-05-09 21:08:22 +02:00
a55314dff8 Merge pull request #1 from randybb/friendly_name
Add friendly_name to make HA folks happy
2025-05-09 21:06:16 +02:00
9cc69d7ad2 Add friendly_name to make HA folks happy 2025-05-09 21:01:58 +02:00
f552ea0f97 Start playing with CANopen 2025-05-02 20:34:53 +02:00
e0b76fb95f Fix ethernet 2025-05-02 20:29:19 +02:00
f8ef9d261d Remove API and WIFI from vehicle beacons 2025-05-02 20:24:55 +02:00
f86cb569b0 Switch to pioarduino 2025-05-02 20:23:18 +02:00
87 changed files with 752 additions and 767 deletions

1
.gitignore vendored
View File

@@ -3,4 +3,5 @@
# You can modify this file to suit your needs. # You can modify this file to suit your needs.
/.esphome/ /.esphome/
/secrets.yaml /secrets.yaml
/archive/
/trash/ /trash/

View File

@@ -1,3 +1,3 @@
--- ---
platform: status platform: status
name: "${name} Status" name: Status

View File

@@ -1,3 +1,3 @@
--- ---
platform: factory_reset platform: factory_reset
name: ${name} Factory Defaults name: Factory Defaults

View File

@@ -1,3 +1,3 @@
--- ---
platform: restart platform: restart
name: ${name} Restart name: Restart

View File

@@ -1,3 +1,3 @@
--- ---
platform: safe_mode platform: safe_mode
name: ${name} Restart (Safe Mode) name: Restart (Safe Mode)

View File

@@ -1,3 +1,3 @@
--- ---
platform: shutdown platform: shutdown
name: ${name} Shutdown name: Shutdown

View File

@@ -3,6 +3,7 @@ ethernet:
type: LAN8720 type: LAN8720
mdc_pin: 23 mdc_pin: 23
mdio_pin: 18 mdio_pin: 18
clk_mode: GPIO17_OUT clk_pin: 17
clk_mode: CLK_OUT
phy_addr: 0 phy_addr: 0
power_pin: 12 power_pin: 12

View File

@@ -1,10 +1,10 @@
--- ---
platform: debug platform: debug
free: free:
name: "${name} Heap Free" name: Heap Free
fragmentation: fragmentation:
name: "${name} Heap Fragmentation" name: Heap Fragmentation
block: block:
name: "${name} Heap Max Block" name: Heap Max Block
loop_time: loop_time:
name: "${name} Loop Time" name: Loop Time

View File

@@ -1,6 +1,6 @@
--- ---
platform: template platform: template
name: ${name} Free heap name: Free heap
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL); lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
icon: "mdi:memory" icon: "mdi:memory"
entity_category: diagnostic entity_category: diagnostic

View File

@@ -1,6 +1,6 @@
--- ---
platform: uptime platform: uptime
name: ${name} Uptime name: Uptime
unit_of_measurement: "days" unit_of_measurement: "days"
accuracy_decimals: 2 accuracy_decimals: 2
update_interval: 60s update_interval: 60s

View File

@@ -1,4 +1,4 @@
--- ---
platform: wifi_signal platform: wifi_signal
name: "${name} WiFi Signal" name: WiFi Signal
update_interval: 60s update_interval: 60s

View File

@@ -1,3 +1,3 @@
--- ---
platform: restart platform: restart
name: ${name} Restart name: Restart

View File

@@ -1,3 +1,3 @@
--- ---
platform: safe_mode platform: safe_mode
name: ${name} Restart (Safe Mode) name: Restart (Safe Mode)

View File

@@ -1,3 +1,3 @@
--- ---
platform: shutdown platform: shutdown
name: ${name} Shutdown name: Shutdown

View File

@@ -1,6 +1,6 @@
--- ---
platform: debug platform: debug
device: device:
name: "${name} Device Info" name: Device Info
reset_reason: reset_reason:
name: "${name} Reset Reason" name: Reset Reason

View File

@@ -1,8 +1,8 @@
--- ---
platform: ethernet_info platform: ethernet_info
ip_address: ip_address:
name: ${name} IP Address name: IP Address
address_1: address_1:
name: ${name} IP Address 1 name: IP Address 1
address_2: address_2:
name: ${name} IP Address 2 name: IP Address 2

View File

@@ -1,6 +1,6 @@
--- ---
platform: git_ref platform: git_ref
name: "${name} Git Ref" name: Git Ref
long: true long: true
all: true all: true
abbrev: 16 abbrev: 16

View File

@@ -1,3 +1,3 @@
--- ---
platform: uptime platform: uptime
name: ${name} Uptime name: Uptime

View File

@@ -1,3 +1,3 @@
--- ---
platform: version platform: version
name: "${name} Version" name: Version

View File

@@ -1,17 +1,19 @@
--- ---
platform: wifi_info platform: wifi_info
ip_address: ip_address:
name: ${name} IP Address name: IP Address
icon: mdi:ip-network icon: mdi:ip-network
address_1: address_1:
name: ${name} IP Address 1 name: IP Address 1
icon: mdi:ip-network
address_2: address_2:
name: ${name} IP Address 2 name: IP Address 2
icon: mdi:ip-network
#ssid: #ssid:
# name: ${name} SSID # name: SSID
#bssid: #bssid:
# name: ${name} BSSID # name: BSSID
mac_address: mac_address:
name: ${name} MAC name: MAC
#scan_results: #scan_results:
# name: ${name} Latest Scan Results # name: Latest Scan Results

View File

@@ -1,12 +1,13 @@
substitutions: substitutions:
device: air-office-r device: air-office-r
name: Office R Air Quality Monitor name: Office R Air
name_short: Office R name_short: Office R
area: Office R area: Office R
comment: "${area} | AirQ Monitoring" comment: "${area} | AirQ Monitoring"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -15,11 +16,13 @@ esp32:
# board: m5stamp-pico # board: m5stamp-pico
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.12
# version: 5.3.1
# platform_version: 6.9.0
external_components: # external_components:
- source: components # - source: components
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -50,21 +53,19 @@ uart:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
# name: "${name} LED" # name: LED
id: neo id: neo
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
num_leds: 1 num_leds: 1
# rmt_channel: 0
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} NEO" name: NEO
id: neo_strip id: neo_strip
rgb_order: GRB rgb_order: GRB
pin: 25 pin: 25
num_leds: 7 num_leds: 7
# rmt_channel: 1
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
effects: effects:
@@ -116,4 +117,4 @@ sensor:
uart_id: particle_uart uart_id: particle_uart
update_interval: 20s update_interval: 20s
pm_2_5: pm_2_5:
name: "${name_short} Particulate Matter 2.5µm Concentration" name: Particulate Matter 2.5µm Concentration

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -27,8 +28,8 @@ esp32:
# version: dev # version: dev
# version: 5.1.2 # version: 5.1.2
# platform_version: 6.6.0 # platform_version: 6.6.0
version: 5.3.1 version: 5.3.3
platform_version: 6.9.0 platform_version: 53.03.12
# type: arduino # type: arduino
pcf8574: pcf8574:
@@ -56,7 +57,7 @@ web_server:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: neo id: neo
rgb_order: GRB rgb_order: GRB
pin: 2 pin: 2
@@ -67,12 +68,12 @@ light:
text: text:
- platform: template - platform: template
name: "${name} Test Text" name: Test Text
# id: "it_2" # id: "it_2"
icon: "mdi:text" icon: "mdi:text"
optimistic: true optimistic: true
internal: false internal: false
initial_value: "Welcome ESPHOME" initial_value: "Welcome ESPHOME - #{name}"
restore_value: true restore_value: true
mode: text mode: text
# max_restore_data_length: 24 # max_restore_data_length: 24
@@ -206,27 +207,27 @@ m5stack_4relay:
switch: switch:
- platform: m5stack_4relay - platform: m5stack_4relay
name: ${name} Relay 1 name: Relay 1
id: relay_1 id: relay_1
channel: 1 channel: 1
# interlock: &interlock_group_1 [relay_1, relay_2] # interlock: &interlock_group_1 [relay_1, relay_2]
# interlock_wait_time: 1s # interlock_wait_time: 1s
m5stack_4relay_id: m5stack_relay_1 m5stack_4relay_id: m5stack_relay_1
- platform: m5stack_4relay - platform: m5stack_4relay
name: ${name} Relay 2 name: Relay 2
id: relay_2 id: relay_2
channel: 2 channel: 2
# interlock: *interlock_group_1 # interlock: *interlock_group_1
# interlock_wait_time: 1s # interlock_wait_time: 1s
m5stack_4relay_id: m5stack_relay_1 m5stack_4relay_id: m5stack_relay_1
- platform: m5stack_4relay - platform: m5stack_4relay
name: ${name} Relay 3 name: elay 3
id: relay_3 id: relay_3
channel: 3 channel: 3
# interlock: &interlock_group_2 [relay_3, relay_4] # interlock: &interlock_group_2 [relay_3, relay_4]
m5stack_4relay_id: m5stack_relay_1 m5stack_4relay_id: m5stack_relay_1
- platform: m5stack_4relay - platform: m5stack_4relay
name: ${name} Relay 4 name: Relay 4
id: relay_4 id: relay_4
channel: 4 channel: 4
# interlock: *interlock_group_2 # interlock: *interlock_group_2
@@ -246,7 +247,7 @@ spi:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Button name: Button
pin: pin:
number: 41 number: 41
inverted: true inverted: true
@@ -394,9 +395,9 @@ sensor:
i2c_id: i2c_main i2c_id: i2c_main
address: 0x44 address: 0x44
temperature: temperature:
name: "TEST Temperature" name: TEST Temperature
humidity: humidity:
name: "TEST Humidity" name: TEST Humidity
update_interval: 10s update_interval: 10s
- platform: mpu6886 - platform: mpu6886
address: 0x68 address: 0x68
@@ -414,7 +415,7 @@ sensor:
# gyro_z: # gyro_z:
# name: "${name} MPU6886 Gyro z" # name: "${name} MPU6886 Gyro z"
temperature: temperature:
name: "${name} Temperature" name: Temperature
id: blabla id: blabla
- platform: homeassistant - platform: homeassistant
id: test_humidity id: test_humidity
@@ -437,22 +438,22 @@ sensor:
# resolution: 12 # resolution: 12
- platform: dallas_temp - platform: dallas_temp
address: 0xdb041750eae2ff28 address: 0xdb041750eae2ff28
name: "${name} Dallas Temp 1" name: Dallas Temp 1
one_wire_id: hub_1 one_wire_id: hub_1
update_interval: 10s update_interval: 10s
- platform: dallas_temp - platform: dallas_temp
address: 0xb2041750cf1aff28 address: 0xb2041750cf1aff28
name: "${name} Dallas Temp 2" name: Dallas Temp 2
one_wire_id: hub_1 one_wire_id: hub_1
update_interval: 30s update_interval: 30s
- platform: dallas_temp - platform: dallas_temp
address: 0xcd01191eb8b07128 address: 0xcd01191eb8b07128
name: "${name} Dallas Temp 3" name: Dallas Temp 3
one_wire_id: hub_1 one_wire_id: hub_1
update_interval: 45s update_interval: 45s
- platform: dallas_temp - platform: dallas_temp
address: 0x5a01191ef3375b28 address: 0x5a01191ef3375b28
name: "${name} Dallas Temp 4" name: Dallas Temp 4
one_wire_id: hub_1 one_wire_id: hub_1
time: time:

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -31,12 +32,12 @@ status_led:
light: light:
- platform: binary - platform: binary
name: "${name_short} Light" name: Light
id: light_1 id: light_1
output: relay_1 output: relay_1
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
- platform: binary - platform: binary
name: "${name_short} Workbench Light" name: Workbench Light
id: light_2 id: light_2
output: relay_2 output: relay_2
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -36,7 +37,7 @@ binary_sensor:
number: 0 number: 0
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: True inverted: True
name: ${name} Light Switch name: Light Switch
device_class: light device_class: light
on_click: on_click:
- min_length: 50ms - min_length: 50ms
@@ -45,7 +46,7 @@ binary_sensor:
- homeassistant.service: - homeassistant.service:
service: light.toggle service: light.toggle
data: data:
entity_id: light.basement_light entity_id: light.mcu_basement_2_light
- min_length: 351ms - min_length: 351ms
max_length: 1000ms max_length: 1000ms
then: then:
@@ -73,7 +74,7 @@ binary_sensor:
number: 10 number: 10
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: true inverted: true
name: ${name} Socket 1 Switch name: Socket 1 Switch
on_press: on_press:
- switch.toggle: relay_2 - switch.toggle: relay_2
- platform: gpio - platform: gpio
@@ -81,7 +82,7 @@ binary_sensor:
number: 9 number: 9
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: true inverted: true
name: ${name} Door name: Door
device_class: door device_class: door
filters: filters:
invert: invert:
@@ -89,11 +90,11 @@ binary_sensor:
- homeassistant.service: - homeassistant.service:
service: light.turn_on service: light.turn_on
data: data:
entity_id: light.basement_light entity_id: light.mcu_basement_2_light
select: select:
- platform: template - platform: template
name: "Sewage Treatment Blower" name: Sewage Treatment Blower
icon: mdi:hair-dryer-outline icon: mdi:hair-dryer-outline
optimistic: true optimistic: true
options: options:
@@ -125,13 +126,13 @@ status_led:
switch: switch:
- platform: gpio - platform: gpio
name: "Sewage Treatment Blower" name: Sewage Treatment Blower
icon: mdi:hair-dryer-outline icon: mdi:hair-dryer-outline
pin: 12 pin: 12
id: relay_1 id: relay_1
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
- platform: gpio - platform: gpio
name: ${name} Socket 1 name: Socket 1
icon: mdi:power-socket-fr icon: mdi:power-socket-fr
pin: 5 pin: 5
id: relay_2 id: relay_2

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -14,8 +15,8 @@ esp32:
board: esp32doit-devkit-v1 board: esp32doit-devkit-v1
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
sdkconfig_options: sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y CONFIG_FREERTOS_UNICORE: y
advanced: advanced:
@@ -172,7 +173,7 @@ ota:
light: light:
- platform: xiaomi_bslamp2 - platform: xiaomi_bslamp2
id: my_light id: my_light
name: ${name} name: Light
default_transition_length: ${default_transition_length} default_transition_length: ${default_transition_length}
# When the brightness changes, update the front panel illumination. # When the brightness changes, update the front panel illumination.
@@ -291,7 +292,7 @@ sensor:
# The possible light modes are: "off", "rgb", "white" and "night". # The possible light modes are: "off", "rgb", "white" and "night".
text_sensor: text_sensor:
- platform: xiaomi_bslamp2 - platform: xiaomi_bslamp2
# name: ${name} Light Mode # name: Light Mode
id: my_light_mode id: my_light_mode
output: output:

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -14,8 +15,8 @@ esp32:
board: esp32doit-devkit-v1 board: esp32doit-devkit-v1
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
sdkconfig_options: sdkconfig_options:
CONFIG_FREERTOS_UNICORE: y CONFIG_FREERTOS_UNICORE: y
advanced: advanced:
@@ -169,7 +170,7 @@ ota:
light: light:
- platform: xiaomi_bslamp2 - platform: xiaomi_bslamp2
id: my_light id: my_light
name: ${name} name: Light
default_transition_length: ${default_transition_length} default_transition_length: ${default_transition_length}
# When the brightness changes, update the front panel illumination. # When the brightness changes, update the front panel illumination.
@@ -272,7 +273,7 @@ sensor:
# The possible light modes are: "off", "rgb", "white" and "night". # The possible light modes are: "off", "rgb", "white" and "night".
text_sensor: text_sensor:
- platform: xiaomi_bslamp2 - platform: xiaomi_bslamp2
# name: ${name} Light Mode # name: Light Mode
id: my_light_mode id: my_light_mode
output: output:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
# platformio_options: # platformio_options:
@@ -40,8 +41,8 @@ esp32:
flash_size: 16MB flash_size: 16MB
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
logger: logger:
hardware_uart: USB_SERIAL_JTAG hardware_uart: USB_SERIAL_JTAG
@@ -54,7 +55,7 @@ logger:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 8 pin: 8

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
# platformio_options: # platformio_options:
@@ -40,8 +41,8 @@ esp32:
flash_size: 16MB flash_size: 16MB
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
logger: logger:
hardware_uart: USB_SERIAL_JTAG hardware_uart: USB_SERIAL_JTAG
@@ -54,7 +55,7 @@ logger:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 8 pin: 8

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -27,7 +28,7 @@ packages:
# components: [ esp32_camera ] # components: [ esp32_camera ]
esp32_camera: esp32_camera:
name: My Camera name: Camera
external_clock: external_clock:
pin: 0 pin: 0
frequency: 20MHz frequency: 20MHz
@@ -45,7 +46,7 @@ switch:
pin: 32 pin: 32
# restore_mode: ALWAYS_ON # restore_mode: ALWAYS_ON
# id: "cam_power_down" # id: "cam_power_down"
name: "${name} Enable CAM" name: Enable
# esp32_camera_web_server: # esp32_camera_web_server:
# - port: 8080 # - port: 8080

View File

@@ -2,10 +2,11 @@ substitutions:
device: can-node-1 device: can-node-1
name: CAN Node 1 name: CAN Node 1
area: DEV area: DEV
comment: "${area} | CANOpen" comment: "${area} | CANopen"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,12 +14,14 @@ esp32:
board: esp32dev board: esp32dev
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 # version: 5.3.2
platform_version: 6.9.0 # platform_version: 53.03.11
external_components: external_components:
- source: github://mrk-its/esphome-canopen@dev - source: github://mrk-its/esphome-canopen@dev
refresh: 1h refresh: 1h
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
refresh: 1h
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -28,65 +31,94 @@ canbus:
id: can_bus id: can_bus
rx_pin: 22 rx_pin: 22
tx_pin: 23 tx_pin: 23
can_id: 0 can_id: 1
bit_rate: 125kbps bit_rate: 500kbps
canopen: canopen:
id: can_gate id: can_open
canbus_id: can_bus canbus_id: can_bus
node_id: 1 node_id: 1
entities: entities:
- id: boot - index: 1
index: 1 id: light1_state
tpdo: 0 rpdo:
- id: blue_led - node_id: 2
index: 2 tpdo: 0
tpdo: 0 offset: 0
- id: uptime_sensor cmd: 0
index: 3
tpdo: 0
- id: cover1
index: 4
tpdo: 1
# - id: cover2
# index: 5
# tpdo: 1
sensor: - index: 2
- platform: uptime id: light1_brightness
id: uptime_sensor size: 1
name: "${name} Uptime" min_value: 0.0
update_interval: 5sec max_value: 1.0
internal: true rpdo:
- node_id: 2
tpdo: 0
offset: 1
cmd: 0
- index: 3
id: light2_state
rpdo:
- node_id: 2
tpdo: 0
offset: 3
cmd: 0
- index: 4
id: light2_brightness
size: 1
min_value: 0.0
max_value: 1.0
rpdo:
- node_id: 2
tpdo: 0
offset: 4
cmd: 0
binary_sensor: binary_sensor:
- platform: template
id: light1_state
name: Light 1 State
- platform: template
id: light2_state
name: Light 2 State
- platform: template
id: light1_state_cmd
- platform: gpio - platform: gpio
name: "${name} Boot" name: Boot
id: boot id: boot_button
internal: true
pin: pin:
number: 0 number: 0
inverted: true inverted: true
mode:
input: true
pullup: true
on_press:
then:
- lambda: |-
bool state = id(light1_state).state || id(light2_state).state;
// send command to entity #1 (light) on node #2
id(can_open).send_entity_cmd(2, 1, !state);
// send command to entity #2 (light2) on node #2
id(can_open).send_entity_cmd(2, 2, !state);
sensor:
- platform: template
id: light1_brightness
name: Light 1 Brightness
- platform: template
id: light2_brightness
name: Light 2 Brightness
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Led" name: LED
id: blue_led id: blue_led
internal: true internal: true
pin: 2 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

View File

@@ -2,10 +2,11 @@ substitutions:
device: can-node-2 device: can-node-2
name: CAN Node 2 name: CAN Node 2
area: DEV area: DEV
comment: "${area} | CANOpen" comment: "${area} | CANopen"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,12 +14,14 @@ esp32:
board: esp32dev board: esp32dev
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 # version: 5.3.2
platform_version: 6.9.0 # platform_version: 53.03.11
external_components: external_components:
- source: github://mrk-its/esphome-canopen@dev - source: github://mrk-its/esphome-canopen@dev
refresh: 1h refresh: 1h
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
refresh: 1h
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -28,65 +31,108 @@ canbus:
id: can_bus id: can_bus
rx_pin: 22 rx_pin: 22
tx_pin: 23 tx_pin: 23
can_id: 0 can_id: 2
bit_rate: 125kbps bit_rate: 500kbps
canopen: canopen:
id: can_gate id: can_open
canbus_id: can_bus canbus_id: can_bus
node_id: 2 node_id: 2
entities: entities:
- id: boot - index: 1
index: 1 id: light1
tpdo: 0 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: - index: 2
- platform: uptime id: light2
id: uptime_sensor tpdo: 0
name: "${name} Uptime"
update_interval: 5sec - index: 3
internal: true id: light3
tpdo: 0
output:
- platform: template
id: cw_output1
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
- platform: template
id: ww_output1
type: float
write_action:
- logger.log:
format: "output2: %f"
args: ['state']
- platform: template
id: output2
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
- platform: template
id: output3
type: float
write_action:
- logger.log:
format: "output1: %f"
args: ['state']
light:
- platform: cwww
id: light1
name: Light 1
cold_white: cw_output1
warm_white: ww_output1
cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K
constant_brightness: false
default_transition_length: 0s
- platform: monochromatic
id: light2
name: Light 2
output: output2
default_transition_length: 0s
- platform: binary
id: light3
name: Light 3
output: output3
## LIGHTENING
i2c:
sda: 17
scl: 18
scan: true
# frequency: 100kHz
as3935_i2c:
irq_pin: 19
spike_rejection: 4
binary_sensor: binary_sensor:
- platform: gpio - platform: as3935
name: "${name} Boot" name: Storm Alert
id: boot
internal: true
pin:
number: 0
inverted: true
switch: sensor:
- platform: gpio - platform: as3935
name: "${name} Led" lightning_energy:
id: blue_led name: Energy
internal: true distance:
pin: 2 name: Storm Distance
cover: # logger:
- platform: time_based # level: VERY_VERBOSE
name: "${name} Cover" # logs:
id: cover1 # canbus: DEBUG
internal: true # canopen: DEBUG
device_class: shutter # can_driver: DEBUG
has_built_in_endstop: true # timer_driver: DEBUG
open_action:
- logger.log: open_action
open_duration: 10s
close_action:
- logger.log: close_action
close_duration: 10s
stop_action:
- logger.log: stop_action

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -14,8 +15,8 @@ esp32:
framework: framework:
# type: arduino # type: arduino
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
# - source: github://pr#3017 # - source: github://pr#3017
@@ -66,7 +67,7 @@ binary_sensor:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -16,8 +17,8 @@ esp32:
variant: esp32c3 variant: esp32c3
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.3
platform_version: 6.9.0 platform_version: 53.03.12
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -155,7 +156,7 @@ sensor:
switch: switch:
- platform: template - platform: template
name: "${name} Alarm" name: Alarm
optimistic: true optimistic: true
turn_on_action: turn_on_action:
- globals.set: - globals.set:

173
mcu-clock-living-room.yaml Normal file
View File

@@ -0,0 +1,173 @@
substitutions:
device: clock-living-room
name: Living room Clock
area: Living Room / Kitchen
comment: "${area}: TV Rack Clock"
esphome:
name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment}
esp32:
board: m5stack-atom
framework:
type: esp-idf
# version: 5.3.2
# platform_version: 53.03.12
external_components:
- source:
type: git
url: https://github.com/trip5/esphome-tm1650
ref: main
refresh: 60s
components: [ tm1650 ]
packages:
common: !include common/common.yaml
# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
api:
services:
- service: play_rtttl
variables:
song: string
then:
- rtttl.play:
rtttl: !lambda 'return song;'
i2c:
id: i2c_main
sda: 32
scl: 33
scan: true #false
frequency: 100kHz
globals:
- id: alarm_id
type: bool
restore_value: no
initial_value: "false"
time:
- platform: homeassistant
id: ha_time
timezone: Europe/Bratislava
binary_sensor:
- platform: gpio
name: Button
pin:
number: 39
inverted: true
display:
- platform: tm1650
id: tm1650_display
i2c_id: i2c_main
# clk_pin: 4
# dio_pin: 5
update_interval: 500ms
# intensity: 0
lambda: |-
static int i = 0;
i++;
if (id(alarm_id)) {
if ((i % 2) == 0)
it.print("8 8 ");
else
it.print(" 8 8");
} else {
if (((i / 10) % 2) == 0) {
//it.set_intensity(7);
if ((i % 2) == 0)
it.strftime("%H.%M", id(ha_time).now());
else
it.strftime("%H%M", id(ha_time).now());
} else {
//it.set_intensity(1);
it.printf("%.0f~C", id(temperature).state);
}
}
light:
- platform: esp32_rmt_led_strip
name: LED
id: led
rgb_order: GRB
pin: 27
num_leds: 1
chipset: ws2812
restore_mode: ALWAYS_OFF
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
output:
- platform: ledc
pin: 25
id: rtttl_out
rtttl:
output: rtttl_out
sensor:
- platform: homeassistant
id: temperature
entity_id: sensor.zigbee_outside_temperature
switch:
- platform: template
name: Alarm
optimistic: true
turn_on_action:
- globals.set:
id: alarm_id
value: 'true'
turn_off_action:
- globals.set:
id: alarm_id
value: 'false'

View File

@@ -1,11 +1,12 @@
substitutions: substitutions:
device: desk-lamp device: desk-lamp
name: Mi Desk Lamp name: Desk Lamp
area: Room area: Room
comment: "${area} | Desk lamp" comment: "${area} | Desk lamp"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,8 +14,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
# external_components: # external_components:
# - source: github://pr#7958 # - source: github://pr#7958
@@ -49,7 +50,7 @@ binary_sensor:
light: light:
- platform: cwww - platform: cwww
name: "${name} Light" name: Light
id: mi_desk_light id: mi_desk_light
gamma_correct: 1 gamma_correct: 1
default_transition_length: 100ms default_transition_length: 100ms

View File

@@ -1,36 +0,0 @@
substitutions:
device: dev-temp
name: Dev Temp
comment: "DEV"
esphome:
name: mcu-${device}
comment: ${comment}
esp32:
board: esp32doit-devkit-v1
framework:
# type: arduino
type: esp-idf
external_components:
- source: components
packages:
common: !include common/common.yaml
switch:
- platform: gpio
pin: GPIO27
id: sensor_power
restore_mode: ALWAYS_ON
one_wire:
- platform: gpio
pin: GPIO25
sensor:
- platform: dallas_temp
name: $name Dallas
id: temp
update_interval: 10 s

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_loop: on_loop:
@@ -33,8 +34,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.12
external_components: external_components:
- source: github://pr#7072 - source: github://pr#7072
@@ -51,7 +52,7 @@ light:
name: Exercise Room Fan name: Exercise Room Fan
default_transition_length: 10s default_transition_length: 10s
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -60,7 +61,7 @@ api:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Button name: Button
pin: pin:
number: 39 number: 39
inverted: true inverted: true
@@ -77,7 +78,7 @@ light:
# id: status_led_id # id: status_led_id
# output: status_led_output # output: status_led_output
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: neo_buildin id: neo_buildin
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -15,8 +16,8 @@ esp32:
framework: framework:
# type: arduino # type: arduino
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
- source: components - source: components
@@ -48,13 +49,13 @@ i2c:
binary_sensor: binary_sensor:
# - platform: gpio # - platform: gpio
# name: ${name} On-Board Button # name: On-Board Button
# id: button_buildin # id: button_buildin
# pin: # pin:
# number: 39 # number: 39
# inverted: true # inverted: true
- platform: gpio - platform: gpio
name: ${name} Button name: Button
id: button_ext id: button_ext
pin: pin:
number: 12 number: 12
@@ -72,10 +73,10 @@ light:
# pin: 27 # pin: 27
# variant: WS2812 # variant: WS2812
# num_leds: 1 # num_leds: 1
# name: "${name} On-Board LED" # name: On-Board LED"
# id: neo_buildin # id: neo_buildin
- platform: rgb - platform: rgb
name: "${name} Light" name: Light
id: led_light id: led_light
red: led_red red: led_red
green: led_green green: led_green
@@ -130,7 +131,7 @@ speaker:
media_player: media_player:
- platform: speaker - platform: speaker
id: media_out id: media_out
name: ${name} Player name: Player
media_pipeline: media_pipeline:
speaker: media_spk_resampling_input speaker: media_spk_resampling_input
announcement_pipeline: announcement_pipeline:

View File

@@ -5,6 +5,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
board_build.flash_mode: dio board_build.flash_mode: dio
@@ -14,8 +15,8 @@ esp32:
variant: esp32c3 variant: esp32c3
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml

View File

@@ -1,48 +0,0 @@
substitutions:
device: fireplace-old
name: Heating Fireplace
comment: "OBSOLETE | Ground floor, Kitchen: Fireplace monitoring for heating"
esphome:
name: mcu-${device}
comment: ${comment}
esp8266:
board: esp01_1m
# wifi:
# use_address: mcu-fireplace.local
packages:
common: !include common/common_esp8266.yaml
one_wire:
- platform: gpio
pin: 4
binary_sensor:
- platform: template
name: "${name} Fire"
lambda: |-
if (id(heating_fireplace_temperature).state > 37.5) {
return true;
} else {
return false;
}
sensor:
- platform: dallas_temp
address: 0x6203168B32A7FF28
# index: 0
name: "${name}"
id: 'heating_fireplace_temperature'
- platform: dht
pin: 14
temperature:
name: "Kitchen Temperature"
id: 'kitchen_temperature'
humidity:
name: "Kitchen Humidity"
id: 'kitchen_humidity'
update_interval: 60s
model: si7021

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,8 +14,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
- source: github://mknjc/esphome@ds248x - source: github://mknjc/esphome@ds248x
@@ -78,12 +79,12 @@ pca9554:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: "${name} Status Button" name: Status Button
filters: filters:
- invert: - invert:
pin: 39 pin: 39
- platform: template - platform: template
name: "${name} Fire" name: Fire
lambda: |- lambda: |-
if (id(heating_fireplace_temperature).state > 37.5) { if (id(heating_fireplace_temperature).state > 37.5) {
return true; return true;
@@ -91,7 +92,7 @@ binary_sensor:
return false; return false;
} }
- platform: gpio - platform: gpio
name: "${name} Pump" name: Pump
id: off_peak_status id: off_peak_status
pin: pin:
pca9554: pca9554_module pca9554: pca9554_module
@@ -104,7 +105,7 @@ sensor:
- platform: ds248x - platform: ds248x
address: 0x6203168B32A7FF28 address: 0x6203168B32A7FF28
# index: 0 # index: 0
name: "${name}" name: Temperature
id: 'heating_fireplace_temperature' id: 'heating_fireplace_temperature'
# - platform: dht # - platform: dht
# pin: 14 # pin: 14

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,8 +14,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
- source: components - source: components
@@ -39,12 +40,12 @@ packages:
button: button:
- platform: output - platform: output
name: "${name} Open" name: Open
id: gate_open id: gate_open
output: relay_1 output: relay_1
duration: 200ms duration: 200ms
- platform: output - platform: output
name: "${name} Close" name: Close
id: gate_close id: gate_close
output: relay_2 output: relay_2
duration: 200ms duration: 200ms
@@ -59,40 +60,40 @@ output:
switch: switch:
- platform: template - platform: template
name: "${name} Open" name: Open
turn_on_action: turn_on_action:
- button.press: gate_open - button.press: gate_open
- platform: template - platform: template
name: "${name} Close" name: Close
turn_on_action: turn_on_action:
- button.press: gate_close - button.press: gate_close
- platform: template - platform: template
name: "${name} Auto Open" name: Auto Open
id: auto_open id: auto_open
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
- platform: template - platform: template
name: "${name} Auto Close" name: Auto Close
id: auto_close id: auto_close
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
- platform: template - platform: template
name: "${name} Enable Auris" name: Enable Auris
id: enable_auris id: enable_auris
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
- platform: template - platform: template
name: "${name} Enable Yaris" name: Enable Yaris
id: enable_yaris id: enable_yaris
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
- platform: template - platform: template
name: "${name} Enable Honda PCX125" name: Enable Honda PCX125
id: enable_pcx125 id: enable_pcx125
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
- platform: template - platform: template
name: "${name} Enable Suzuki DL650" name: Enable Suzuki DL650
id: enable_dl650 id: enable_dl650
optimistic: true optimistic: true
restore_mode: RESTORE_DEFAULT_ON restore_mode: RESTORE_DEFAULT_ON
@@ -275,7 +276,7 @@ binary_sensor:
select: select:
- platform: template - platform: template
name: Gate name: State
id: gate_state id: gate_state
options: options:
- Open - Open

View File

@@ -1,22 +1,25 @@
substitutions: substitutions:
device: gateway device: gateway
name: Gateway name: Gateway
comment: "DEV | BLE Proxy, Modbus" area: DEV
comment: "${area} | BLE Proxy, Modbus"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area}
comment: ${comment} comment: ${comment}
esp32: esp32:
board: esp32doit-devkit-v1 board: esp32doit-devkit-v1
framework: framework:
# version: 5.1.2 version: 5.3.2
# platform_version: 6.6.0 platform_version: 53.03.11
type: esp-idf type: esp-idf
# external_components: external_components:
# - source: github://pr#4062 - source: github://pr#8457
# components: ethernet components: ethernet
# - source: github://pr#4080 # - source: github://pr#4080
# components: [lcd_pcf8574, lcd_base] # components: [lcd_pcf8574, lcd_base]
# - source: github://pr#3564 # - source: github://pr#3564
@@ -72,10 +75,10 @@ i2c:
# subnet: 255.255.255.0 # subnet: 255.255.255.0
ethernet: # ethernet:
# use_address: 10.17.241.254 # use_address: 10.17.241.254
# use_address: 10.17.241.98 # use_address: 10.17.241.98
use_address: mcu-gateway.local # use_address: mcu-gateway.local
uart: uart:
id: uart_modbus id: uart_modbus
@@ -108,7 +111,7 @@ sensor:
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_temp_1 modbus_controller_id: modbus_temp_1
id: temp_1 id: temp_1
name: "${name} Temperature 1" name: Temperature 1
address: 0 address: 0
unit_of_measurement: "°C" unit_of_measurement: "°C"
register_type: read register_type: read
@@ -120,7 +123,7 @@ sensor:
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_temp_1 modbus_controller_id: modbus_temp_1
id: hum_1 id: hum_1
name: "${name} Humidity 1" name: Humidity 1
address: 1 address: 1
unit_of_measurement: "%" unit_of_measurement: "%"
register_type: read register_type: read
@@ -131,7 +134,7 @@ sensor:
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_temp_2 modbus_controller_id: modbus_temp_2
id: temp_2 id: temp_2
name: "${name} Temperature 2" name: Temperature 2
address: 0 address: 0
unit_of_measurement: "°C" unit_of_measurement: "°C"
register_type: read register_type: read
@@ -143,7 +146,7 @@ sensor:
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_temp_2 modbus_controller_id: modbus_temp_2
id: hum_2 id: hum_2
name: "${name} Humidity 2" name: Humidity 2
address: 1 address: 1
unit_of_measurement: "%" unit_of_measurement: "%"
register_type: read register_type: read
@@ -153,25 +156,25 @@ sensor:
- multiply: 0.1 - multiply: 0.1
# - platform: bmp085 # - platform: bmp085
# temperature: # temperature:
# name: "BMP180 Temperature" # name: BMP180 Temperature
# pressure: # pressure:
# name: "BMP180 Pressure" # name: BMP180 Pressure
# address: 0x77 # address: 0x77
# update_interval: 60s # update_interval: 60s
# - platform: bme280 # - platform: bme280
# temperature: # temperature:
# name: "BME280 Temperature" # name: BME280 Temperature
# oversampling: 16x # oversampling: 16x
# pressure: # pressure:
# name: "BME280 Pressure" # name: BME280 Pressure
# humidity: # humidity:
# name: "BME280 Humidity" # name: BME280 Humidity
# address: 0x76 # address: 0x76
# update_interval: 60s # update_interval: 60s
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_adc_1 modbus_controller_id: modbus_adc_1
id: adc_1_1 id: adc_1_1
name: "Solar Pressure" name: Solar Pressure
address: 0 address: 0
unit_of_measurement: "MPa" unit_of_measurement: "MPa"
register_type: holding register_type: holding
@@ -186,7 +189,7 @@ sensor:
switch: switch:
- platform: modbus_controller - platform: modbus_controller
modbus_controller_id: modbus_adc_1 modbus_controller_id: modbus_adc_1
name: "Readress MODBUS" name: Readress MODBUS
register_type: holding register_type: holding
address: 0x00FD address: 0x00FD
entity_category: config entity_category: config

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -14,8 +15,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
- source: github://mknjc/esphome@ds248x - source: github://mknjc/esphome@ds248x

View File

@@ -1,226 +0,0 @@
substitutions:
device: irrigation-1
name: Irrigation A
comment: "OBSOLETE | Outside, Well: Irrigation system"
esphome:
name: mcu-${device}
comment: ${comment}
# on_boot:
# priority: -10
# then:
# - switch.turn_off: relay_1
# - delay: 2s
# - switch.turn_off: relay_2
# - delay: 2s
# - switch.turn_off: relay_3
# - delay: 2s
# - switch.turn_off: relay_4
# - delay: 2s
# - switch.turn_off: relay_5
esp8266:
board: esp01_1m
packages:
common: !include common/common_esp8266.yaml
# api:
# services:
# - service: program_morning
# then:
# - switch.turn_on: relay_1
# - delay: 10minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 10minutes
# - switch.turn_off: relay_2
# - delay: 1minutes
# - switch.turn_on: relay_3
# - delay: 5minutes
# # - switch.turn_on: relay_4
# # - delay: 40minutes
# - switch.turn_off: relay_3
# - delay: 1minutes
# - switch.turn_on: relay_1
# - delay: 10minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 10minutes
# - switch.turn_off: relay_2
# - delay: 1minutes
# - switch.turn_on: relay_3
# - delay: 5minutes
# # - switch.turn_on: relay_4
# # - delay: 40minutes
# - switch.turn_off: relay_3
# - service: program_grass
# then:
# - switch.turn_on: relay_1
# - delay: 5minutes
# - switch.turn_off: relay_1
# - delay: 1minutes
# - switch.turn_on: relay_2
# - delay: 5minutes
# - switch.turn_off: relay_2
# - service: patio
# then:
# - switch.turn_on: relay_5
# - delay: 30sec
# - switch.turn_off: relay_5
i2c:
sda: 3
scl: 1
scan: true #false
# mcp23017:
# - id: 'mcp23017_hub'
# address: 0x20
pcf8574:
- id: 'relay_module'
address: 0x20
pcf8575: false
# SONOFF 4ch Pro! Not R2!
# GPIO_KEY1, // GPIO00 Button 1
# GPIO_USER, // GPIO01 Serial RXD and Optional sensor
# GPIO_USER, // GPIO02 Optional sensor
# GPIO_USER, // GPIO03 Serial TXD and Optional sensor
# GPIO_REL3, // GPIO04 Sonoff 4CH Red Led and Relay 3 (0 = Off, 1 = On)
# GPIO_REL2, // GPIO05 Sonoff 4CH Red Led and Relay 2 (0 = Off, 1 = On)
# // GPIO06 (SD_CLK Flash)
# // GPIO07 (SD_DATA0 Flash QIO/DIO/DOUT)
# // GPIO08 (SD_DATA1 Flash QIO/DIO/DOUT)
# GPIO_KEY2, // GPIO09 Button 2
# GPIO_KEY3, // GPIO10 Button 3
# // GPIO11 (SD_CMD Flash)
# GPIO_REL1, // GPIO12 Red Led and Relay 1 (0 = Off, 1 = On)
# GPIO_LED1_INV, // GPIO13 Blue Led (0 = On, 1 = Off) - Link and Power status
# GPIO_KEY4, // GPIO14 Button 4
# GPIO_REL4, // GPIO15 Red Led and Relay 4 (0 = Off, 1 = On)
# binary_sensor:
# - platform: gpio
# pin:
# number: GPIO0
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A1"
# id: button_1
# on_press:
# - switch.toggle: relay_1
# - platform: gpio
# pin:
# number: GPIO9
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A2"
# id: button_2
# on_press:
# - switch.toggle: relay_2
# - platform: gpio
# pin:
# number: GPIO10
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A3"
# id: button_3
# on_press:
# - switch.toggle: relay_3
# - platform: gpio
# pin:
# number: GPIO14
# mode: INPUT_PULLUP
# inverted: True
# name: "Irrigation Button A4"
# id: button_4
# on_press:
# - switch.toggle: relay_4
# sensor:
# - platform: dht
# pin: GPIO2
# temperature:
# name: "Well Shaft Temperature"
# id: 'well_temperature'
# humidity:
# name: "Well Shaft Humidity"
# id: 'well_humidity'
# model: 'DHT22'
# update_interval: 60s
# switch:
# - platform: gpio
# name: "Irrigation Valve A1"
# pin: GPIO12
# id: relay_1
# interlock: &interlock_group [relay_1, relay_2, relay_3, relay_4, relay_5, relay_6, relay_7, relay_8]
# - platform: gpio
# name: "Irrigation Valve A2"
# pin: GPIO5
# id: relay_2
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A3"
# pin: GPIO4
# id: relay_3
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A4"
# pin: GPIO15
# id: relay_4
# interlock: *interlock_group
# - platform: gpio
# name: "Irrigation Valve A5"
# id: relay_5
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 0
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A6"
# id: relay_6
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 1
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A7"
# id: relay_7
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 2
# mode: OUTPUT
# inverted: true
# - platform: gpio
# name: "Irrigation Valve A8"
# id: relay_8
# interlock: *interlock_group
# pin:
# pcf8574: relay_module
# number: 3
# mode: OUTPUT
# inverted: true
# output:
# - platform: esp8266_pwm
# id: led_blue
# pin: GPIO13
# inverted: True
# light:
# - platform: monochromatic
# name: "Irrigation A Blue LED"
# output: led_blue
time:
- !include common/time/homeassistant.yaml

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -31,8 +32,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -85,14 +86,14 @@ pca9685:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: "${name} Status Button" name: Status Button
filters: filters:
- invert: - invert:
pin: 39 pin: 39
light: light:
# - platform: esp32_rmt_led_strip # - platform: esp32_rmt_led_strip
# name: "${name} Status Light" # name: Status Light
# id: neo # id: neo
# rgb_order: GRB # rgb_order: GRB
# pin: 27 # pin: 27
@@ -101,7 +102,7 @@ light:
# chipset: ws2812 # chipset: ws2812
# restore_mode: ALWAYS_OFF # restore_mode: ALWAYS_OFF
- platform: cwww - platform: cwww
name: "${name} Worktop Left" name: Worktop Left
id: light_1 id: light_1
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -110,7 +111,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
- platform: cwww - platform: cwww
name: "${name} Stove" name: Stove
id: light_2 id: light_2
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -119,7 +120,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
- platform: cwww - platform: cwww
name: "${name} Worktop Right" name: Worktop Right
id: light_3 id: light_3
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -128,7 +129,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
# - platform: cwww # - platform: cwww
# name: "${name} Light Spare" # name: Light Spare
# id: light_4 # id: light_4
# default_transition_length: 200ms # default_transition_length: 200ms
# restore_mode: ALWAYS_ON # restore_mode: ALWAYS_ON

View File

@@ -7,6 +7,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -41,7 +42,7 @@ as3935_i2c:
binary_sensor: binary_sensor:
# - platform: gpio # - platform: gpio
# # name: ${name} Button # # name: Button
# pin: # pin:
# number: 39 # number: 39
# inverted: true # inverted: true
@@ -50,7 +51,7 @@ binary_sensor:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
# name: "${name} LED" # name: LED
id: neo id: neo
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
@@ -61,7 +62,7 @@ light:
sensor: sensor:
- platform: as3935 - platform: as3935
lightning_energy: lightning_energy:
name: Lightning Energy name: Energy
distance: distance:
name: Storm Distance name: Storm Distance

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -20,8 +21,8 @@ esp32:
flash_size: 16MB flash_size: 16MB
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
sdkconfig_options: sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
CONFIG_ESP32S3_DATA_CACHE_64KB: y CONFIG_ESP32S3_DATA_CACHE_64KB: y
@@ -46,7 +47,7 @@ i2c:
psram: psram:
mode: octal mode: octal
speed: 120MHz speed: 40MHz
spi: spi:
id: display_qspi id: display_qspi

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -18,8 +19,8 @@ esp32:
flash_size: 16MB flash_size: 16MB
framework: framework:
type: esp-idf type: esp-idf
# version: 5.1.2 version: 5.3.2
# platform_version: 6.5.0 platform_version: 53.03.11
# Required to achieve sufficient PSRAM bandwidth # Required to achieve sufficient PSRAM bandwidth
sdkconfig_options: sdkconfig_options:
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
@@ -301,10 +302,12 @@ image:
# mdi:battery-arrow-down-outline # mdi:battery-arrow-down-outline
id: solar_power_icon id: solar_power_icon
resize: 50x50 resize: 50x50
type: BINARY
- file: mdi:battery-arrow-down-outline - file: mdi:battery-arrow-down-outline
id: home_battery_icon id: home_battery_icon
resize: 30x30 resize: 30x30
type: BINARY
lvgl: lvgl:
log_level: INFO log_level: INFO
@@ -374,8 +377,8 @@ lvgl:
color: 0xFFFFFF color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50 value: 50
- img: # - image:
id: power_meter_input_img # id: power_meter_input_img
- arc: - arc:
color: 0xFF3000 color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius r_mod: 10 #radius difference from the scale default radius
@@ -439,12 +442,12 @@ lvgl:
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
#y: -35 #y: -35
#x: -60 #x: -60
- img: - image:
src: solar_power_icon src: solar_power_icon
id: img_solar_power id: img_solar_power
align: center align: center
img_recolor: 0xFFFF00 image_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
y: 50 y: 50
#x: -60 #x: -60
@@ -482,8 +485,8 @@ lvgl:
color: 0xFFFFFF color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50 value: 50
- img: # - image:
id: power_meter_input_img2 # id: power_meter_input_img2
- arc: - arc:
color: 0xFF3000 color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius r_mod: 10 #radius difference from the scale default radius
@@ -547,12 +550,12 @@ lvgl:
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
#y: -35 #y: -35
#x: -60 #x: -60
- img: - image:
src: solar_power_icon src: solar_power_icon
id: img_solar_power2 id: img_solar_power2
align: center align: center
img_recolor: 0xFFFF00 image_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
y: 50 y: 50
#x: -60 #x: -60
@@ -590,8 +593,8 @@ lvgl:
color: 0xFFFFFF color: 0xFFFFFF
r_mod: 12 #sets line length by this much difference from the scale default radius r_mod: 12 #sets line length by this much difference from the scale default radius
value: 50 value: 50
- img: # - image:
id: power_meter_input_img3 # id: power_meter_input_img3
- arc: - arc:
color: 0xFF3000 color: 0xFF3000
r_mod: 10 #radius difference from the scale default radius r_mod: 10 #radius difference from the scale default radius
@@ -655,12 +658,12 @@ lvgl:
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
#y: -35 #y: -35
#x: -60 #x: -60
- img: - image:
src: solar_power_icon src: solar_power_icon
id: img_solar_power3 id: img_solar_power3
align: center align: center
img_recolor: 0xFFFF00 image_recolor: 0xFFFF00
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
#bg_color: 0xFFFFFF #bg_color: 0xFFFFFF
y: 50 y: 50
#x: -60 #x: -60

View File

@@ -14,8 +14,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml

View File

@@ -11,6 +11,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -185,7 +186,7 @@ time:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -197,14 +198,13 @@ binary_sensor:
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
# on_click: # on_click:
# - switch.toggle: relay_2 # - switch.toggle: relay_2
on_click: on_click:
- homeassistant.service: - homeassistant.service:
service: light.toggle service: light.toggle
data: data:
@@ -216,7 +216,7 @@ binary_sensor:
light: light:
- platform: binary - platform: binary
name: ${name_short} Light name: Light
id: light_1 id: light_1
output: relay_1 output: relay_1
@@ -236,7 +236,7 @@ output:
switch: switch:
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -268,7 +268,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 25°C reference_temperature: 25°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "${name_short} Temperature" name: Temperature
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id

View File

@@ -1,7 +1,6 @@
substitutions: substitutions:
device: nspanel-dev device: nspanel-dev
name: NSPanel DEV name: NSPanel DEV
name_short: DevPanel
area: DEV area: DEV
comment: "${area} | NSPanel" comment: "${area} | NSPanel"
panel_recv_topic: "tele/${device}/RESULT" panel_recv_topic: "tele/${device}/RESULT"
@@ -10,6 +9,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -34,8 +34,8 @@ esp32:
board: nodemcu-32s board: nodemcu-32s
framework: framework:
type: esp-idf type: esp-idf
# version: 5.1.2 version: 5.3.2
# platform_version: 6.6.0 platform_version: 53.03.11
external_components: external_components:
# - source: # - source:
@@ -424,7 +424,7 @@ time:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -436,7 +436,7 @@ binary_sensor:
# entity_id: switch.gate_open # entity_id: switch.gate_open
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
@@ -455,7 +455,7 @@ output:
switch: switch:
- platform: gpio - platform: gpio
name: ${name} Relay 1 name: Relay 1
id: relay_1 id: relay_1
pin: pin:
number: 22 number: 22
@@ -470,7 +470,7 @@ switch:
# payload: '{"CustomRecv":"event,sleepReached,cardGrid"}' # payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
- platform: gpio - platform: gpio
name: ${name} Relay 2 name: Relay 2
id: relay_2 id: relay_2
pin: pin:
number: 19 number: 19
@@ -485,7 +485,7 @@ switch:
# Turn screen power on/off. Easy way to configure the screen power control, but this should not be used from HA, as all components must be re-initialized afterwards. For lights, names of lights etc. this practically means that the state must change once to happen. # Turn screen power on/off. Easy way to configure the screen power control, but this should not be used from HA, as all components must be re-initialized afterwards. For lights, names of lights etc. this practically means that the state must change once to happen.
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -517,7 +517,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 25°C reference_temperature: 25°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "Living Room Temperature Entry" name: Living Room Temperature Entry
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id

View File

@@ -1,7 +1,6 @@
substitutions: substitutions:
device: nspanel-fireplace device: nspanel-fireplace
name: Fireplace NSPanel name: Fireplace NSPanel
name_short: Fireplace
area: Living Room / Kitchen area: Living Room / Kitchen
comment: "${area}, Fireplace | NSPanel" comment: "${area}, Fireplace | NSPanel"
panel_recv_topic: "tele/${device}/RESULT" panel_recv_topic: "tele/${device}/RESULT"
@@ -10,6 +9,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -184,7 +184,7 @@ time:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -200,7 +200,7 @@ binary_sensor:
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
@@ -236,7 +236,7 @@ switch:
number: 19 number: 19
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -268,7 +268,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 25°C reference_temperature: 25°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "Living Room Temperature Fireplace" name: "Living Room Temperature"
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id

View File

@@ -1,7 +1,6 @@
substitutions: substitutions:
device: nspanel-office-j device: nspanel-office-j
name: Office J NSPanel name: Office J NSPanel
name_short: Office J
area: Office J area: Office J
comment: "${area} | NSPanel" comment: "${area} | NSPanel"
panel_recv_topic: "tele/${device}/RESULT" panel_recv_topic: "tele/${device}/RESULT"
@@ -11,6 +10,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -190,7 +190,7 @@ time:
binary_sensor: binary_sensor:
# - platform: gpio # - platform: gpio
# name: ${name} Left Button # name: Left Button
# pin: # pin:
# number: 14 # number: 14
# inverted: true # inverted: true
@@ -198,7 +198,7 @@ binary_sensor:
# - switch.toggle: relay_1 # - switch.toggle: relay_1
# - platform: gpio # - platform: gpio
# name: ${name} Right Button # name: Right Button
# pin: # pin:
# number: 27 # number: 27
# inverted: true # inverted: true
@@ -210,7 +210,7 @@ binary_sensor:
# data: # data:
# entity_id: light.office_r_desk_strip # entity_id: light.office_r_desk_strip
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -222,7 +222,7 @@ binary_sensor:
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
@@ -252,16 +252,16 @@ output:
light: light:
- platform: binary - platform: binary
name: ${name_short} Light name: Light
id: light_1 id: light_1
output: relay_1 output: relay_1
# # - platform: binary # # - platform: binary
# # name: ${name_full} Relay 2 # # name: Relay 2
# # output: relay_2 # # output: relay_2
switch: switch:
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -291,7 +291,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 22°C reference_temperature: 22°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "${name_short} Temperature" name: Temperature
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id
@@ -299,7 +299,7 @@ sensor:
# text_sensor: # text_sensor:
# - platform: ble_scanner # - platform: ble_scanner
# name: "${name_short} BLE Scanner" # name: BLE Scanner
# esp32_ble_beacon: # esp32_ble_beacon:
# type: iBeacon # type: iBeacon

View File

@@ -1,7 +1,6 @@
substitutions: substitutions:
device: nspanel-office-r device: nspanel-office-r
name: Office R NSPanel name: Office R NSPanel
name_short: Office R
area: Office R area: Office R
comment: "${area} | NSPanel" comment: "${area} | NSPanel"
panel_recv_topic: "tele/${device}/RESULT" panel_recv_topic: "tele/${device}/RESULT"
@@ -11,6 +10,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -196,7 +196,7 @@ time:
binary_sensor: binary_sensor:
# - platform: gpio # - platform: gpio
# name: ${name} Left Button # name: Left Button
# pin: # pin:
# number: 14 # number: 14
# inverted: true # inverted: true
@@ -204,7 +204,7 @@ binary_sensor:
# - switch.toggle: relay_1 # - switch.toggle: relay_1
# - platform: gpio # - platform: gpio
# name: ${name} Right Button # name: Right Button
# pin: # pin:
# number: 27 # number: 27
# inverted: true # inverted: true
@@ -216,7 +216,7 @@ binary_sensor:
# data: # data:
# entity_id: light.office_r_desk_strip # entity_id: light.office_r_desk_strip
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -232,7 +232,7 @@ binary_sensor:
# - lambda: 'id(nspanel_id).send_custom_command("event,buttonPress1,navigate.cardGrid_main,button");' # - lambda: 'id(nspanel_id).send_custom_command("event,buttonPress1,navigate.cardGrid_main,button");'
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
@@ -260,7 +260,7 @@ output:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name_short} Presence Light" name: Presence Light
id: neo id: neo
rgb_order: GRB rgb_order: GRB
pin: 23 pin: 23
@@ -278,26 +278,26 @@ light:
transition_length: 2s # defaults to 1s transition_length: 2s # defaults to 1s
update_interval: 2s update_interval: 2s
- platform: binary - platform: binary
name: ${name_short} Light name: Light
id: light_1 id: light_1
output: relay_1 output: relay_1
# # - platform: binary # # - platform: binary
# # name: ${name_full} Relay 2 # # name: Relay 2
# # output: relay_2 # # output: relay_2
switch: switch:
# - platform: gpio # - platform: gpio
# name: ${name_short} Light # name: Light
# id: relay_1 # id: relay_1
# pin: # pin:
# number: 22 # number: 22
- platform: gpio - platform: gpio
# name: ${name_full} Relay 2 # name: Relay 2
id: relay_2 id: relay_2
pin: pin:
number: 19 number: 19
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -327,7 +327,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 22°C reference_temperature: 22°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "${name_short} Temperature" name: Temperature
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id
@@ -335,7 +335,7 @@ sensor:
# text_sensor: # text_sensor:
# - platform: ble_scanner # - platform: ble_scanner
# name: "${name_short} BLE Scanner" # name: BLE Scanner
# esp32_ble_beacon: # esp32_ble_beacon:
# type: iBeacon # type: iBeacon

View File

@@ -1,7 +1,6 @@
substitutions: substitutions:
device: nspanel-patio device: nspanel-patio
name: Patio NSPanel name: Patio NSPanel
name_short: Patio
area: Living Room / Kitchen area: Living Room / Kitchen
comment: "${area}, Patio | NSPanel" comment: "${area}, Patio | NSPanel"
panel_recv_topic: "tele/${device}/RESULT" panel_recv_topic: "tele/${device}/RESULT"
@@ -10,6 +9,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -184,7 +184,7 @@ time:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: ${name} Left Button name: Left Button
pin: pin:
number: 14 number: 14
inverted: true inverted: true
@@ -196,7 +196,7 @@ binary_sensor:
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button"; root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
- platform: gpio - platform: gpio
name: ${name} Right Button name: Right Button
pin: pin:
number: 27 number: 27
inverted: true inverted: true
@@ -208,7 +208,7 @@ binary_sensor:
- homeassistant.service: - homeassistant.service:
service: light.toggle service: light.toggle
data: data:
entity_id: light.patio_light entity_id: light.patio_lights
- mqtt.publish_json: - mqtt.publish_json:
topic: $panel_recv_topic topic: $panel_recv_topic
payload: |- payload: |-
@@ -230,7 +230,7 @@ switch:
number: 22 number: 22
- platform: gpio - platform: gpio
name: ${name_short} Light MAIN name: Light MAIN
id: relay_2 id: relay_2
restore_mode: always_on restore_mode: always_on
entity_category: config entity_category: config
@@ -238,7 +238,7 @@ switch:
number: 19 number: 19
- platform: gpio - platform: gpio
name: ${name} Screen Power name: Screen Power
id: screen_power id: screen_power
entity_category: config entity_category: config
pin: pin:
@@ -270,7 +270,7 @@ sensor:
b_constant: 3950 b_constant: 3950
reference_temperature: 25°C reference_temperature: 25°C
reference_resistance: 10kOhm reference_resistance: 10kOhm
name: "Living Room Temperature" name: Living Room Temperature
- platform: template - platform: template
id: room_temperature_id id: room_temperature_id

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -17,8 +18,8 @@ esp32:
variant: esp32c3 variant: esp32c3
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
@@ -85,14 +86,14 @@ pca9685:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
name: "${name} Status Button" name: Status Button
filters: filters:
- invert: - invert:
pin: 39 pin: 39
light: light:
# - platform: esp32_rmt_led_strip # - platform: esp32_rmt_led_strip
# name: "${name} Status Light" # name: Status Light
# id: neo # id: neo
# rgb_order: GRB # rgb_order: GRB
# pin: 27 # pin: 27
@@ -101,7 +102,7 @@ light:
# chipset: ws2812 # chipset: ws2812
# restore_mode: ALWAYS_OFF # restore_mode: ALWAYS_OFF
- platform: cwww - platform: cwww
name: "${name} Light 1" name: Light 1
id: light_1 id: light_1
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -110,7 +111,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
- platform: cwww - platform: cwww
name: "${name} Light 2" name: Light 2
id: light_2 id: light_2
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -119,7 +120,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
- platform: cwww - platform: cwww
name: "${name} Light 3" name: Light 3
id: light_3 id: light_3
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -128,7 +129,7 @@ light:
cold_white_color_temperature: 6536 K cold_white_color_temperature: 6536 K
warm_white_color_temperature: 2000 K warm_white_color_temperature: 2000 K
- platform: cwww - platform: cwww
name: "${name} Light 4" name: Light 4
id: light_4 id: light_4
default_transition_length: 200ms default_transition_length: 200ms
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON
@@ -201,6 +202,6 @@ power_supply:
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Relay" name: Relay
id: relay_2 id: relay_2
pin: 19 pin: 19

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
comment: ${comment} comment: ${comment}
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state. 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 priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
@@ -73,7 +74,7 @@ binary_sensor:
publish_initial_state: true publish_initial_state: true
internal: true internal: true
- platform: template - platform: template
name: "${name} Load" name: Load
id: load_on id: load_on
lambda: |- lambda: |-
if (isnan(id(w_sensor).state)) { if (isnan(id(w_sensor).state)) {
@@ -128,17 +129,17 @@ output:
sensor: sensor:
- platform: cse7766 - platform: cse7766
current: current:
name: "${name} Current" name: Current
id: a_sensor id: a_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
voltage: voltage:
name: "${name} Voltage" name: Voltage
id: v_sensor id: v_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
power: power:
name: "${name} Power" name: Power
id: w_sensor id: w_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
@@ -150,27 +151,27 @@ sensor:
then: then:
- light.turn_off: switch_led - light.turn_off: switch_led
energy: energy:
name: "${name} Energy" name: Energy
id: wh_sensor id: wh_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
- platform: total_daily_energy - platform: total_daily_energy
name: "${name} Total Daily Energy" name: Total Daily Energy
power_id: w_sensor power_id: w_sensor
filters: filters:
- multiply: 0.001 - multiply: 0.001
unit_of_measurement: kWh unit_of_measurement: kWh
- platform: template - platform: template
name: "${name} Power Factor" name: Power Factor
device_class: power_factor device_class: power_factor
id: power_factor id: power_factor
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
switch: switch:
- platform: template - platform: template
name: "${name} Relay" name: Relay
optimistic: true optimistic: true
id: relay_1 id: relay_1
turn_off_action: turn_off_action:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
comment: ${comment} comment: ${comment}
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state. 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 priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
@@ -73,7 +74,7 @@ binary_sensor:
publish_initial_state: true publish_initial_state: true
internal: true internal: true
- platform: template - platform: template
name: "${name} Load" name: Load
id: load_on id: load_on
lambda: |- lambda: |-
if (isnan(id(w_sensor).state)) { if (isnan(id(w_sensor).state)) {
@@ -128,17 +129,17 @@ output:
sensor: sensor:
- platform: cse7766 - platform: cse7766
current: current:
name: "${name} Current" name: Current
id: a_sensor id: a_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
voltage: voltage:
name: "${name} Voltage" name: Voltage
id: v_sensor id: v_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
power: power:
name: "${name} Power" name: Power
id: w_sensor id: w_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
@@ -150,27 +151,27 @@ sensor:
then: then:
- light.turn_off: switch_led - light.turn_off: switch_led
energy: energy:
name: "${name} Energy" name: Energy"
id: wh_sensor id: wh_sensor
filters: filters:
- throttle_average: ${update_interval} - throttle_average: ${update_interval}
- platform: total_daily_energy - platform: total_daily_energy
name: "${name} Total Daily Energy" name: Total Daily Energy
power_id: w_sensor power_id: w_sensor
filters: filters:
- multiply: 0.001 - multiply: 0.001
unit_of_measurement: kWh unit_of_measurement: kWh
- platform: template - platform: template
name: "${name} Power Factor" name: Power Factor
device_class: power_factor device_class: power_factor
id: power_factor id: power_factor
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state; lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
switch: switch:
- platform: template - platform: template
name: "${name} Relay" name: Relay
optimistic: true optimistic: true
id: relay_1 id: relay_1
turn_off_action: turn_off_action:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -13,8 +14,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml
@@ -87,20 +88,20 @@ switch:
mode: OUTPUT mode: OUTPUT
inverted: true inverted: true
- platform: gpio - platform: gpio
name: "${name} Socket" name: Socket
id: socket_relay id: socket_relay
pin: pin:
pca9554: pca9554_module pca9554: pca9554_module
number: 4 number: 4
mode: OUTPUT mode: OUTPUT
- platform: gpio - platform: gpio
name: "Garden Light" name: Garden Light
id: garden_light_relay id: garden_light_relay
pin: pin:
number: 22 number: 22
mode: OUTPUT mode: OUTPUT
- platform: gpio - platform: gpio
name: "${name} Light" name: Light
id: shed_light_relay id: shed_light_relay
pin: pin:
number: 19 number: 19

View File

@@ -1,6 +1,5 @@
substitutions: substitutions:
device: socket-01 device: socket-01
device_id: socket_01
name: Socket 01 name: Socket 01
area: Bedroom area: Bedroom
comment: "${area} | TV Socket" comment: "${area} | TV Socket"
@@ -9,6 +8,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -36,7 +36,7 @@ binary_sensor:
number: GPIO13 number: GPIO13
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: yes inverted: yes
name: "${name} Button" name: Button
# filters: # filters:
# invert: # invert:
on_press: on_press:
@@ -65,11 +65,11 @@ output:
light: light:
- platform: binary - platform: binary
name: "${name} Red LED" name: Red LED
id: light_red id: light_red
output: led_red output: led_red
- platform: binary - platform: binary
name: "${name} Blue LED" name: Blue LED
id: light_blue id: light_blue
output: led_blue output: led_blue
@@ -83,21 +83,21 @@ sensor:
current_resistor: ${current_res} current_resistor: ${current_res}
voltage_divider: ${voltage_div} voltage_divider: ${voltage_div}
current: current:
name: "${name} Current" name: Current
icon: mdi:flash-circle icon: mdi:flash-circle
accuracy_decimals: 3 accuracy_decimals: 3
voltage: voltage:
name: "${name} Voltage" name: Voltage
icon: mdi:current-ac icon: mdi:current-ac
power: power:
name: "${name} Power" name: Power
id: "${device_id}_power" id: power
icon: mdi:flash-outline icon: mdi:flash-outline
update_interval: 30s update_interval: 30s
change_mode_every: 4 change_mode_every: 4
- platform: total_daily_energy - platform: total_daily_energy
name: "${name} Total Daily Power" name: Total Daily Power"
power_id: "${device_id}_power" power_id: power
filters: filters:
# Multiplication factor from W to kW is 0.001 # Multiplication factor from W to kW is 0.001
- multiply: 0.001 - multiply: 0.001
@@ -106,7 +106,7 @@ sensor:
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Relay" name: Relay
# icon: mdi:power-socket-eu # icon: mdi:power-socket-eu
pin: GPIO15 pin: GPIO15
id: relay id: relay

View File

@@ -9,6 +9,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -36,7 +37,7 @@ binary_sensor:
number: GPIO13 number: GPIO13
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: yes inverted: yes
name: "${name} Button" name: Button
# filters: # filters:
# invert: # invert:
on_press: on_press:
@@ -56,11 +57,11 @@ binary_sensor:
light: light:
- platform: binary - platform: binary
name: "${name} Red LED" name: Red LED
id: light_red id: light_red
output: led_red output: led_red
- platform: binary - platform: binary
name: "${name} Blue LED" name: Blue LED
id: light_blue id: light_blue
output: led_blue output: led_blue
@@ -84,21 +85,21 @@ sensor:
current_resistor: ${current_res} current_resistor: ${current_res}
voltage_divider: ${voltage_div} voltage_divider: ${voltage_div}
current: current:
name: "${name} Current" name: Current
icon: mdi:flash-circle icon: mdi:flash-circle
accuracy_decimals: 3 accuracy_decimals: 3
voltage: voltage:
name: "${name} Voltage" name: Voltage
icon: mdi:current-ac icon: mdi:current-ac
power: power:
name: "${name} Power" name: Power
id: "${device_id}_power" id: power
icon: mdi:flash-outline icon: mdi:flash-outline
update_interval: 30s update_interval: 30s
change_mode_every: 4 change_mode_every: 4
- platform: total_daily_energy - platform: total_daily_energy
name: "${name} Total Daily Power" name: Total Daily Power
power_id: "${device_id}_power" power_id: power
filters: filters:
# Multiplication factor from W to kW is 0.001 # Multiplication factor from W to kW is 0.001
- multiply: 0.001 - multiply: 0.001
@@ -112,7 +113,7 @@ sensor:
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Relay" name: Relay
# icon: mdi:power-socket-eu # icon: mdi:power-socket-eu
pin: GPIO15 pin: GPIO15
id: relay id: relay

View File

@@ -1,6 +1,5 @@
substitutions: substitutions:
device: socket-03 device: socket-03
device_id: socket_03
name: Socket 03 name: Socket 03
area: Bedroom area: Bedroom
comment: "${area} | SPARE Socket" comment: "${area} | SPARE Socket"
@@ -16,6 +15,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
esp8266: esp8266:
@@ -42,7 +42,7 @@ binary_sensor:
number: GPIO13 number: GPIO13
mode: INPUT_PULLUP mode: INPUT_PULLUP
inverted: yes inverted: yes
name: "${name} Button" name: Button
# filters: # filters:
# invert: # invert:
on_press: on_press:
@@ -72,11 +72,11 @@ output:
light: light:
- platform: binary - platform: binary
name: "${name} Red LED" name: Red LED
id: light_red id: light_red
output: led_red output: led_red
- platform: binary - platform: binary
name: "${name} Blue LED" name: Blue LED
id: light_blue id: light_blue
output: led_blue output: led_blue
@@ -90,15 +90,15 @@ sensor:
current_resistor: ${current_res} current_resistor: ${current_res}
voltage_divider: ${voltage_div} voltage_divider: ${voltage_div}
current: current:
name: "${name} Current" name: Current
icon: mdi:flash-circle icon: mdi:flash-circle
accuracy_decimals: 3 accuracy_decimals: 3
voltage: voltage:
name: "${name} Voltage" name: Voltage
icon: mdi:current-ac icon: mdi:current-ac
power: power:
name: "${name} Power" name: Power
id: "${device_id}_power" id: power
icon: mdi:flash-outline icon: mdi:flash-outline
on_value_range: on_value_range:
- above: ${max_power} - above: ${max_power}
@@ -112,14 +112,14 @@ sensor:
data_template: data_template:
message: Switch turned off because power exceeded ${max_power} W message: Switch turned off because power exceeded ${max_power} W
energy: energy:
name: "${name} Energy" name: Energy
unit_of_measurement: "Wh" unit_of_measurement: "Wh"
icon: mdi:flash-outline icon: mdi:flash-outline
update_interval: 30s update_interval: 30s
change_mode_every: 4 change_mode_every: 4
- platform: total_daily_energy - platform: total_daily_energy
name: "${name} Total Daily Power" name: Total Daily Power
power_id: "${device_id}_power" power_id: power
accuracy_decimals: 5 accuracy_decimals: 5
filters: filters:
# Multiplication factor from W to kW is 0.001 # Multiplication factor from W to kW is 0.001
@@ -129,7 +129,7 @@ sensor:
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Relay" name: Relay
# icon: mdi:power-socket-eu # icon: mdi:power-socket-eu
pin: GPIO15 pin: GPIO15
id: relay id: relay

View File

@@ -1,11 +1,12 @@
substitutions: substitutions:
device: staircase-light device: staircase-light
name: Staircase Light name: Staircase
area: Staircase area: Staircase
comment: "${area} | Light" comment: "${area} | Light"
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -63,7 +64,7 @@ output:
light: light:
- platform: binary - platform: binary
name: "${name}" name: Light
id: light_relay id: light_relay
output: relay output: relay
restore_mode: ALWAYS_ON restore_mode: ALWAYS_ON

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
platformio_options: platformio_options:
@@ -17,8 +18,8 @@ esp32:
variant: ESP32C3 variant: ESP32C3
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml

View File

@@ -5,7 +5,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: mcu-${device} friendly_name: ${device}
comment: ${comment} comment: ${comment}
on_boot: on_boot:
# priority: -10 # priority: -10
@@ -88,8 +88,8 @@ esp32:
# platform_version: 6.5.0 # platform_version: 6.5.0
framework: framework:
type: esp-idf type: esp-idf
version: 5.1.2 version: 5.3.2
platform_version: 6.5.0 platform_version: 53.03.11
## TESTING ## TESTING
@@ -117,13 +117,13 @@ i2c:
modem: modem:
id: atmodem id: atmodem
ready: modem_ready # ready: modem_ready
rx_pin: 26 rx_pin: 26
tx_pin: 27 tx_pin: 27
model: SIM7600 model: SIM7600
apn: o2internet apn: o2internet
username: "" # username: ""
password: "" # password: ""
pin_code: "" pin_code: ""
init_at: init_at:
- AT+CGNSSMODE=15,1 # GNSS all navigation systems - AT+CGNSSMODE=15,1 # GNSS all navigation systems
@@ -144,40 +144,40 @@ axp192:
binary_sensor: binary_sensor:
- platform: gpio - platform: gpio
id: modem_dtr id: modem_dtr
# name: "${name} Cellular DTR" # name: Cellular DTR
pin: 32 pin: 32
- platform: gpio - platform: gpio
id: modem_ri id: modem_ri
# name: "${name} Cellular RI" # name: ellular RI
pin: 33 pin: 33
- platform: gpio - platform: gpio
id: modem_status id: modem_status
# name: "${name} Cellular Status" # name: Cellular Status
pin: 36 pin: 36
- platform: template - platform: template
id: modem_ready id: modem_ready
# name: "${name} Cellular Ready" # name: Cellular Ready
sensor: sensor:
switch: switch:
- platform: gpio - platform: gpio
id: modem_powerkey id: modem_powerkey
# name: "${name} Cellular PowerKey" # name: Cellular PowerKey
pin: 4 pin: 4
# inverted: true # inverted: true
- platform: gpio - platform: gpio
id: led id: led
# name: "${name} LED" # name: LED
pin: 12 pin: 12
inverted: true inverted: true
- platform: gpio - platform: gpio
id: modem_enable id: modem_enable
# name: "${name} Cellular Enable" # name: Cellular Enable
pin: 25 pin: 25
- platform: axp192 - platform: axp192
id: gnss_enable id: gnss_enable
# name: "${name} GNSS Enable" # name: GNSS Enable
port: LDO3 port: LDO3
text_sensor: text_sensor:
@@ -403,30 +403,30 @@ text_sensor:
# binary_sensor: # binary_sensor:
# - platform: sim7600 # - platform: sim7600
# registered: # registered:
# name: "${name} Cellular" # name: Cellular
# - platform: gpio # - platform: gpio
# id: modem_status # id: modem_status
# name: "${name} Cellular Status" # name: Cellular Status
# pin: 36 # pin: 36
# sensor: # sensor:
# - platform: sim7600 # - platform: sim7600
# rssi: # rssi:
# name: "${name} Cellular RSSI" # name: Cellular RSSI
# switch: # switch:
# - platform: gpio # - platform: gpio
# id: modem_powerkey # id: modem_powerkey
# # name: "${name} Modem Powerkey" # # name: Modem Powerkey
# pin: 4 # pin: 4
# - platform: gpio # - platform: gpio
# id: led # id: led
# # name: "${name} LED" # # name: LED
# pin: 12 # pin: 12
# inverted: true # inverted: true
# - platform: gpio # - platform: gpio
# id: modem_enable # id: modem_enable
# # name: "${name} Modem Enable" # # name: Modem Enable
# pin: 25 # pin: 25
# - platform: axp192 # - platform: axp192
# id: gnss_enable # id: gnss_enable
@@ -445,16 +445,16 @@ text_sensor:
# text_sensor: # text_sensor:
# - platform: template # - platform: template
# id: sms_sender # id: sms_sender
# name: "${name} SMS Sender" # name: SMS Sender
# - platform: template # - platform: template
# id: sms_message # id: sms_message
# name: "${name} SMS Message" # name: SMS Message
# - platform: template # - platform: template
# id: caller_id_text_sensor # id: caller_id_text_sensor
# name: "${name} Caller ID" # name: Caller ID
# - platform: template # - platform: template
# id: ussd_message # id: ussd_message
# name: "${name} USSD Code" # name: USSD Code
# - platform: serial # - platform: serial
# uart_id: modem_uart # uart_id: modem_uart
# id: modem_read # id: modem_read

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -30,7 +31,7 @@ light:
id: status_led_id id: status_led_id
pin: 5 pin: 5
- platform: monochromatic - platform: monochromatic
name: "${name}" name: Strip
output: pwm_cold_white output: pwm_cold_white
effects: effects:
- flicker: - flicker:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_loop: on_loop:
@@ -37,11 +38,11 @@ esp32:
framework: framework:
type: esp-idf type: esp-idf
api: # api:
reboot_timeout: 0s # reboot_timeout: 0s
wifi: # wifi:
reboot_timeout: 0s # reboot_timeout: 0s
external_components: external_components:
- source: components - source: components
@@ -75,12 +76,11 @@ esp32_ble_beacon:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
num_leds: 1 num_leds: 1
rmt_channel: 0
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
effects: effects:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_loop: on_loop:
@@ -37,17 +38,17 @@ esp32:
framework: framework:
type: esp-idf type: esp-idf
api: # api:
reboot_timeout: 0s # reboot_timeout: 0s
wifi: # wifi:
reboot_timeout: 0s # reboot_timeout: 0s
external_components: external_components:
- source: components - source: components
packages: packages:
common: !include common/logger.yaml common: !include common/logger.yaml
# common: !include common/common.yaml # common: !include common/common.yaml
# debug: # debug:
@@ -75,12 +76,11 @@ esp32_ble_beacon:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
num_leds: 1 num_leds: 1
rmt_channel: 0
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
effects: effects:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_loop: on_loop:
@@ -36,24 +37,24 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
external_components: external_components:
- source: components - source: components
packages: packages:
wifi: !include common/wifi.yaml # wifi: !include common/wifi.yaml
logger: !include common/logger.yaml logger: !include common/logger.yaml
# api: !include common/api.yaml # api: !include common/api.yaml
ota: !include common/ota.yaml # ota: !include common/ota.yaml
# common: !include common/common.yaml # common: !include common/common.yaml
# api: # api:
# reboot_timeout: 0s # reboot_timeout: 0s
wifi: # wifi:
reboot_timeout: 0s # reboot_timeout: 0s
# debug: # debug:
@@ -80,12 +81,11 @@ esp32_ble_beacon:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
num_leds: 1 num_leds: 1
rmt_channel: 0
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
effects: effects:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
on_loop: on_loop:
@@ -37,18 +38,18 @@ esp32:
framework: framework:
type: esp-idf type: esp-idf
api: # api:
reboot_timeout: 0s # reboot_timeout: 0s
wifi: # wifi:
reboot_timeout: 0s # reboot_timeout: 0s
external_components: external_components:
- source: components - source: components
packages: packages:
common: !include common/logger.yaml common: !include common/logger.yaml
wifi: !include common/wifi.yaml # wifi: !include common/wifi.yaml
# common: !include common/common.yaml # common: !include common/common.yaml
# debug: # debug:
@@ -76,12 +77,11 @@ esp32_ble_beacon:
light: light:
- platform: esp32_rmt_led_strip - platform: esp32_rmt_led_strip
name: "${name} LED" name: LED
id: led id: led
rgb_order: GRB rgb_order: GRB
pin: 27 pin: 27
num_leds: 1 num_leds: 1
rmt_channel: 0
chipset: ws2812 chipset: ws2812
restore_mode: ALWAYS_OFF restore_mode: ALWAYS_OFF
effects: effects:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
@@ -28,7 +29,7 @@ binary_sensor:
number: GPIO0 number: GPIO0
mode: INPUT mode: INPUT
inverted: True inverted: True
name: "${name} Button" name: Button
on_press: on_press:
- switch.toggle: relay - switch.toggle: relay
@@ -46,7 +47,7 @@ output:
switch: switch:
- platform: gpio - platform: gpio
name: "${name} Relay" name: Relay
pin: GPIO12 pin: GPIO12
id: relay id: relay
on_turn_on: on_turn_on:

View File

@@ -6,6 +6,7 @@ substitutions:
esphome: esphome:
name: mcu-${device} name: mcu-${device}
friendly_name: ${name}
area: ${area} area: ${area}
comment: ${comment} comment: ${comment}
# friendly_name: mcu-well # friendly_name: mcu-well
@@ -26,8 +27,8 @@ esp32:
board: m5stack-atom board: m5stack-atom
framework: framework:
type: esp-idf type: esp-idf
version: 5.3.1 version: 5.3.2
platform_version: 6.9.0 platform_version: 53.03.11
packages: packages:
common: !include common/common.yaml common: !include common/common.yaml