mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-01-02 19:47:29 +01:00
Compare commits
24 Commits
d4a45add3e
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ba1aea9132 | |||
| 918b54e5ed | |||
| a55314dff8 | |||
| 9cc69d7ad2 | |||
| f552ea0f97 | |||
| e0b76fb95f | |||
| f8ef9d261d | |||
| f86cb569b0 | |||
| e77ab50d02 | |||
| 5b913cecf0 | |||
| 6c79fad79c | |||
| 1fb6e50d31 | |||
| 1e38d96c2d | |||
| a0c5bc4a0c | |||
| 7b04a57a08 | |||
| f8d585cb54 | |||
| ec63c86137 | |||
| eb04a6bf28 | |||
| 5ed2f4d75e | |||
| d5cea62123 | |||
| 975978256c | |||
| 53b5e6c634 | |||
| b453e35c98 | |||
| 27d5c17422 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -3,4 +3,5 @@
|
||||
# You can modify this file to suit your needs.
|
||||
/.esphome/
|
||||
/secrets.yaml
|
||||
/archive/
|
||||
/trash/
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: status
|
||||
name: "${name} Status"
|
||||
name: Status
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: factory_reset
|
||||
name: ${name} Factory Defaults
|
||||
name: Factory Defaults
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: restart
|
||||
name: ${name} Restart
|
||||
name: Restart
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: safe_mode
|
||||
name: ${name} Restart (Safe Mode)
|
||||
name: Restart (Safe Mode)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: shutdown
|
||||
name: ${name} Shutdown
|
||||
name: Shutdown
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<<: !include wifi.yaml
|
||||
<<: !include api.yaml
|
||||
<<: !include ota.yaml
|
||||
<<: !include logger.yaml
|
||||
# <<: !include logger.yaml
|
||||
<<: !include logger_debug.yaml
|
||||
|
||||
binary_sensor:
|
||||
- <<: !include binary_sensor/status.yaml
|
||||
@@ -18,7 +19,9 @@ sensor:
|
||||
- <<: !include sensor/wifi_signal.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/debug.yaml
|
||||
- <<: !include text_sensor/version.yaml
|
||||
# - <<: !include text_sensor/uptime.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
network:
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
<<: !include wifi_esp8266.yaml
|
||||
<<: !include api.yaml
|
||||
<<: !include ota.yaml
|
||||
<<: !include logger.yaml
|
||||
# <<: !include logger.yaml
|
||||
<<: !include logger_debug.yaml
|
||||
|
||||
binary_sensor:
|
||||
- <<: !include binary_sensor/status.yaml
|
||||
@@ -18,9 +19,9 @@ sensor:
|
||||
- <<: !include sensor/wifi_signal.yaml
|
||||
|
||||
text_sensor:
|
||||
- <<: !include text_sensor/debug.yaml
|
||||
- <<: !include text_sensor/version.yaml
|
||||
- <<: !include text_sensor/wifi_info.yaml
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
# min_ipv6_addr_count: 2
|
||||
@@ -3,6 +3,7 @@ ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin: 23
|
||||
mdio_pin: 18
|
||||
clk_mode: GPIO17_OUT
|
||||
clk_pin: 17
|
||||
clk_mode: CLK_OUT
|
||||
phy_addr: 0
|
||||
power_pin: 12
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
---
|
||||
platform: debug
|
||||
free:
|
||||
name: "${name} Heap Free"
|
||||
name: Heap Free
|
||||
fragmentation:
|
||||
name: "${name} Heap Fragmentation"
|
||||
name: Heap Fragmentation
|
||||
block:
|
||||
name: "${name} Heap Max Block"
|
||||
name: Heap Max Block
|
||||
loop_time:
|
||||
name: "${name} Loop Time"
|
||||
name: Loop Time
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
platform: template
|
||||
name: ${name} Free heap
|
||||
name: Free heap
|
||||
lambda: return heap_caps_get_free_size(MALLOC_CAP_INTERNAL);
|
||||
icon: "mdi:memory"
|
||||
entity_category: diagnostic
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
platform: uptime
|
||||
name: ${name} Uptime
|
||||
name: Uptime
|
||||
unit_of_measurement: "days"
|
||||
accuracy_decimals: 2
|
||||
update_interval: 60s
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
platform: wifi_signal
|
||||
name: "${name} WiFi Signal"
|
||||
name: WiFi Signal
|
||||
update_interval: 60s
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: restart
|
||||
name: ${name} Restart
|
||||
name: Restart
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: safe_mode
|
||||
name: ${name} Restart (Safe Mode)
|
||||
name: Restart (Safe Mode)
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: shutdown
|
||||
name: ${name} Shutdown
|
||||
name: Shutdown
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
platform: debug
|
||||
device:
|
||||
name: "${name} Device Info"
|
||||
name: Device Info
|
||||
reset_reason:
|
||||
name: "${name} Reset Reason"
|
||||
name: Reset Reason
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
---
|
||||
platform: ethernet_info
|
||||
ip_address:
|
||||
name: ${name} IP Address
|
||||
name: IP Address
|
||||
address_1:
|
||||
name: ${name} IP Address 1
|
||||
name: IP Address 1
|
||||
address_2:
|
||||
name: ${name} IP Address 2
|
||||
name: IP Address 2
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
platform: git_ref
|
||||
name: "${name} Git Ref"
|
||||
name: Git Ref
|
||||
long: true
|
||||
all: true
|
||||
abbrev: 16
|
||||
|
||||
3
common/text_sensor/uptime.yaml
Normal file
3
common/text_sensor/uptime.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
---
|
||||
platform: uptime
|
||||
name: Uptime
|
||||
@@ -1,3 +1,3 @@
|
||||
---
|
||||
platform: version
|
||||
name: "${name} Version"
|
||||
name: Version
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
---
|
||||
platform: wifi_info
|
||||
ip_address:
|
||||
name: ${name} IP Address
|
||||
name: IP Address
|
||||
icon: mdi:ip-network
|
||||
address_1:
|
||||
name: ${name} IP Address 1
|
||||
name: IP Address 1
|
||||
icon: mdi:ip-network
|
||||
address_2:
|
||||
name: ${name} IP Address 2
|
||||
name: IP Address 2
|
||||
icon: mdi:ip-network
|
||||
#ssid:
|
||||
# name: ${name} SSID
|
||||
# name: SSID
|
||||
#bssid:
|
||||
# name: ${name} BSSID
|
||||
# name: BSSID
|
||||
mac_address:
|
||||
name: ${name} MAC
|
||||
name: MAC
|
||||
#scan_results:
|
||||
# name: ${name} Latest Scan Results
|
||||
# name: Latest Scan Results
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,11 +1,14 @@
|
||||
substitutions:
|
||||
device: air-office-r
|
||||
name: Office R Air Quality Monitor
|
||||
name: Office R Air
|
||||
name_short: Office R
|
||||
comment: "DEV"
|
||||
area: Office R
|
||||
comment: "${area} | AirQ Monitoring"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
@@ -13,20 +16,17 @@ esp32:
|
||||
# board: m5stamp-pico
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.12
|
||||
# version: 5.3.1
|
||||
# platform_version: 6.9.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
# external_components:
|
||||
# - source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
sda: 32
|
||||
@@ -53,21 +53,19 @@ uart:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
# name: "${name} LED"
|
||||
# name: LED
|
||||
id: neo
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} NEO"
|
||||
name: NEO
|
||||
id: neo_strip
|
||||
rgb_order: GRB
|
||||
pin: 25
|
||||
num_leds: 7
|
||||
rmt_channel: 1
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
@@ -119,4 +117,4 @@ sensor:
|
||||
uart_id: particle_uart
|
||||
update_interval: 20s
|
||||
pm_2_5:
|
||||
name: "${name_short} Particulate Matter 2.5µm Concentration"
|
||||
name: Particulate Matter 2.5µm Concentration
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: atoms3
|
||||
name: AtomS3
|
||||
comment: "DEV"
|
||||
area: DEV
|
||||
comment: "${area} | --"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
@@ -25,17 +28,24 @@ esp32:
|
||||
# version: dev
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
version: 5.2.1
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.3
|
||||
platform_version: 53.03.12
|
||||
# type: arduino
|
||||
|
||||
pcf8574:
|
||||
- id: 'pcf8574_hub'
|
||||
address: 0x21
|
||||
pcf8575: true
|
||||
|
||||
animation:
|
||||
- file: "blinky.gif"
|
||||
id: blinky
|
||||
resize: 128x128
|
||||
type: RGB565
|
||||
- file: "vault_boy_walking.gif"
|
||||
id: vaultboy
|
||||
resize: 168x121
|
||||
type: RGB565
|
||||
|
||||
logger:
|
||||
logs:
|
||||
@@ -45,14 +55,25 @@ web_server:
|
||||
port: 80
|
||||
version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: LED
|
||||
id: neo
|
||||
rgb_order: GRB
|
||||
pin: 2
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
text:
|
||||
- platform: template
|
||||
name: "${name} Test Text"
|
||||
name: Test Text
|
||||
# id: "it_2"
|
||||
icon: "mdi:text"
|
||||
optimistic: true
|
||||
internal: false
|
||||
initial_value: "Welcome ESPHOME"
|
||||
initial_value: "Welcome ESPHOME - #{name}"
|
||||
restore_value: true
|
||||
mode: text
|
||||
# max_restore_data_length: 24
|
||||
@@ -66,12 +87,6 @@ external_components:
|
||||
refresh: 0s
|
||||
# - source: github://pr#5586
|
||||
# components: [ http_request ]
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/ssieb/esphome
|
||||
ref: onewire
|
||||
components: [ gpio ]
|
||||
refresh: 1min
|
||||
# - source: github://mknjc/esphome@ds248x
|
||||
# components: ds248x
|
||||
# - source: github://bekriebel/esphome@sh1107_fix
|
||||
@@ -192,39 +207,47 @@ m5stack_4relay:
|
||||
|
||||
switch:
|
||||
- platform: m5stack_4relay
|
||||
name: ${name} Relay 1
|
||||
name: Relay 1
|
||||
id: relay_1
|
||||
channel: 1
|
||||
# interlock: &interlock_group_1 [relay_1, relay_2]
|
||||
# interlock_wait_time: 1s
|
||||
m5stack_4relay_id: m5stack_relay_1
|
||||
- platform: m5stack_4relay
|
||||
name: ${name} Relay 2
|
||||
name: Relay 2
|
||||
id: relay_2
|
||||
channel: 2
|
||||
# interlock: *interlock_group_1
|
||||
# interlock_wait_time: 1s
|
||||
m5stack_4relay_id: m5stack_relay_1
|
||||
- platform: m5stack_4relay
|
||||
name: ${name} Relay 3
|
||||
name: elay 3
|
||||
id: relay_3
|
||||
channel: 3
|
||||
# interlock: &interlock_group_2 [relay_3, relay_4]
|
||||
m5stack_4relay_id: m5stack_relay_1
|
||||
- platform: m5stack_4relay
|
||||
name: ${name} Relay 4
|
||||
name: Relay 4
|
||||
id: relay_4
|
||||
channel: 4
|
||||
# interlock: *interlock_group_2
|
||||
m5stack_4relay_id: m5stack_relay_1
|
||||
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #8"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 17
|
||||
# One of INPUT or OUTPUT
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
spi:
|
||||
clk_pin: 17
|
||||
mosi_pin: 21
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Button
|
||||
name: Button
|
||||
pin:
|
||||
number: 41
|
||||
inverted: true
|
||||
@@ -372,9 +395,9 @@ sensor:
|
||||
i2c_id: i2c_main
|
||||
address: 0x44
|
||||
temperature:
|
||||
name: "TEST Temperature"
|
||||
name: TEST Temperature
|
||||
humidity:
|
||||
name: "TEST Humidity"
|
||||
name: TEST Humidity
|
||||
update_interval: 10s
|
||||
- platform: mpu6886
|
||||
address: 0x68
|
||||
@@ -392,7 +415,7 @@ sensor:
|
||||
# gyro_z:
|
||||
# name: "${name} MPU6886 Gyro z"
|
||||
temperature:
|
||||
name: "${name} Temperature"
|
||||
name: Temperature
|
||||
id: blabla
|
||||
- platform: homeassistant
|
||||
id: test_humidity
|
||||
@@ -415,22 +438,22 @@ sensor:
|
||||
# resolution: 12
|
||||
- platform: dallas_temp
|
||||
address: 0xdb041750eae2ff28
|
||||
name: "${name} Dallas Temp 1"
|
||||
name: Dallas Temp 1
|
||||
one_wire_id: hub_1
|
||||
update_interval: 10s
|
||||
- platform: dallas_temp
|
||||
address: 0xb2041750cf1aff28
|
||||
name: "${name} Dallas Temp 2"
|
||||
name: Dallas Temp 2
|
||||
one_wire_id: hub_1
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
address: 0xcd01191eb8b07128
|
||||
name: "${name} Dallas Temp 3"
|
||||
name: Dallas Temp 3
|
||||
one_wire_id: hub_1
|
||||
update_interval: 45s
|
||||
- platform: dallas_temp
|
||||
address: 0x5a01191ef3375b28
|
||||
name: "${name} Dallas Temp 4"
|
||||
name: Dallas Temp 4
|
||||
one_wire_id: hub_1
|
||||
|
||||
time:
|
||||
@@ -443,11 +466,12 @@ time:
|
||||
# - 1.pool.ntp.org
|
||||
# - 2.pool.ntp.org
|
||||
|
||||
esp32_ble_tracker:
|
||||
# esp32_ble_tracker:
|
||||
# scan_parameters:
|
||||
# interval: 1100ms
|
||||
# window: 1100ms
|
||||
# active: true
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
# bluetooth_proxy:
|
||||
# active: true
|
||||
|
||||
# esp32_improv:
|
||||
# authorizer: none
|
||||
@@ -2,14 +2,17 @@ substitutions:
|
||||
device: basement-2
|
||||
name_short: Basement
|
||||
name: Basement 2
|
||||
comment: "Basement: Lights"
|
||||
area: Basement
|
||||
comment: "${area} | Lights"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
@@ -29,12 +32,12 @@ status_led:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "${name_short} Light"
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
restore_mode: ALWAYS_ON
|
||||
- platform: binary
|
||||
name: "${name_short} Workbench Light"
|
||||
name: Workbench Light
|
||||
id: light_2
|
||||
output: relay_2
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
substitutions:
|
||||
device: basement
|
||||
name: Basement
|
||||
comment: "Basement: Sockets"
|
||||
area: Basement
|
||||
comment: "${area} | Sockets"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
@@ -33,7 +37,7 @@ binary_sensor:
|
||||
number: 0
|
||||
mode: INPUT_PULLUP
|
||||
inverted: True
|
||||
name: ${name} Light Switch
|
||||
name: Light Switch
|
||||
device_class: light
|
||||
on_click:
|
||||
- min_length: 50ms
|
||||
@@ -42,7 +46,7 @@ binary_sensor:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.basement_light
|
||||
entity_id: light.mcu_basement_2_light
|
||||
- min_length: 351ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
@@ -70,7 +74,7 @@ binary_sensor:
|
||||
number: 10
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: ${name} Socket 1 Switch
|
||||
name: Socket 1 Switch
|
||||
on_press:
|
||||
- switch.toggle: relay_2
|
||||
- platform: gpio
|
||||
@@ -78,7 +82,7 @@ binary_sensor:
|
||||
number: 9
|
||||
mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
name: ${name} Door
|
||||
name: Door
|
||||
device_class: door
|
||||
filters:
|
||||
invert:
|
||||
@@ -86,11 +90,11 @@ binary_sensor:
|
||||
- homeassistant.service:
|
||||
service: light.turn_on
|
||||
data:
|
||||
entity_id: light.basement_light
|
||||
entity_id: light.mcu_basement_2_light
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: "Sewage Treatment Blower"
|
||||
name: Sewage Treatment Blower
|
||||
icon: mdi:hair-dryer-outline
|
||||
optimistic: true
|
||||
options:
|
||||
@@ -122,13 +126,13 @@ status_led:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "Sewage Treatment Blower"
|
||||
name: Sewage Treatment Blower
|
||||
icon: mdi:hair-dryer-outline
|
||||
pin: 12
|
||||
id: relay_1
|
||||
restore_mode: ALWAYS_ON
|
||||
- platform: gpio
|
||||
name: ${name} Socket 1
|
||||
name: Socket 1
|
||||
icon: mdi:power-socket-fr
|
||||
pin: 5
|
||||
id: relay_2
|
||||
|
||||
@@ -1,21 +1,26 @@
|
||||
substitutions:
|
||||
device: bedroom-lamp-left
|
||||
name: Bedroom Lamp Left
|
||||
comment: ""
|
||||
area: Bedroom
|
||||
comment: "${area} | Left Lamp"
|
||||
default_transition_length: 800ms
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
ESP_MAC_IGNORE_MAC_CRC_ERROR: y
|
||||
advanced:
|
||||
ignore_efuse_custom_mac: true
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
external_components:
|
||||
@@ -168,7 +173,7 @@ ota:
|
||||
light:
|
||||
- platform: xiaomi_bslamp2
|
||||
id: my_light
|
||||
name: ${name}
|
||||
name: Light
|
||||
default_transition_length: ${default_transition_length}
|
||||
|
||||
# When the brightness changes, update the front panel illumination.
|
||||
@@ -287,7 +292,7 @@ sensor:
|
||||
# The possible light modes are: "off", "rgb", "white" and "night".
|
||||
text_sensor:
|
||||
- platform: xiaomi_bslamp2
|
||||
# name: ${name} Light Mode
|
||||
# name: Light Mode
|
||||
id: my_light_mode
|
||||
|
||||
output:
|
||||
|
||||
@@ -1,20 +1,26 @@
|
||||
substitutions:
|
||||
device: bedroom-lamp-right
|
||||
name: Bedroom Lamp Right
|
||||
comment: ""
|
||||
area: Bedroom
|
||||
comment: "${area} | Right Lamp"
|
||||
default_transition_length: 800ms
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
advanced:
|
||||
ignore_efuse_custom_mac: true
|
||||
ignore_efuse_mac_crc: true
|
||||
|
||||
external_components:
|
||||
@@ -164,7 +170,7 @@ ota:
|
||||
light:
|
||||
- platform: xiaomi_bslamp2
|
||||
id: my_light
|
||||
name: ${name}
|
||||
name: Light
|
||||
default_transition_length: ${default_transition_length}
|
||||
|
||||
# When the brightness changes, update the front panel illumination.
|
||||
@@ -267,7 +273,7 @@ sensor:
|
||||
# The possible light modes are: "off", "rgb", "white" and "night".
|
||||
text_sensor:
|
||||
- platform: xiaomi_bslamp2
|
||||
# name: ${name} Light Mode
|
||||
# name: Light Mode
|
||||
id: my_light_mode
|
||||
|
||||
output:
|
||||
|
||||
118
mcu-c6-test-1.yaml
Normal file
118
mcu-c6-test-1.yaml
Normal file
@@ -0,0 +1,118 @@
|
||||
substitutions:
|
||||
device: c6-test-1
|
||||
name: C6 TEST 1
|
||||
area: DEV
|
||||
comment: "${area} | C6"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
# platformio_options:
|
||||
# board_build.flash_mode: dio
|
||||
on_loop:
|
||||
then:
|
||||
lambda: |-
|
||||
static uint32_t last_state = 0;
|
||||
auto state = App.get_app_state();
|
||||
if (state != last_state) {
|
||||
if (state & STATUS_LED_ERROR) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("ERROR");
|
||||
call.perform();
|
||||
} else if (state & STATUS_LED_WARNING) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BOOT");
|
||||
call.perform();
|
||||
} else {
|
||||
//auto call = id(led).turn_off();
|
||||
//call.perform();
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BEACON");
|
||||
call.perform();
|
||||
}
|
||||
last_state = state;
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
logs:
|
||||
component: ERROR
|
||||
|
||||
# web_server:
|
||||
# port: 80
|
||||
# version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 8
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: sk6812 #ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
- strobe:
|
||||
name: "BEACON"
|
||||
colors:
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 200ms
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 10s
|
||||
- lambda:
|
||||
name: "ERROR"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(1, 0, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
- lambda:
|
||||
name: "BOOT"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(0, 1, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
118
mcu-c6-test-2.yaml
Normal file
118
mcu-c6-test-2.yaml
Normal file
@@ -0,0 +1,118 @@
|
||||
substitutions:
|
||||
device: c6-test-2
|
||||
name: C6 TEST 2
|
||||
area: DEV
|
||||
comment: "${area} | C6"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
# platformio_options:
|
||||
# board_build.flash_mode: dio
|
||||
on_loop:
|
||||
then:
|
||||
lambda: |-
|
||||
static uint32_t last_state = 0;
|
||||
auto state = App.get_app_state();
|
||||
if (state != last_state) {
|
||||
if (state & STATUS_LED_ERROR) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("ERROR");
|
||||
call.perform();
|
||||
} else if (state & STATUS_LED_WARNING) {
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BOOT");
|
||||
call.perform();
|
||||
} else {
|
||||
//auto call = id(led).turn_off();
|
||||
//call.perform();
|
||||
auto call = id(led).turn_on();
|
||||
call.set_effect("BEACON");
|
||||
call.perform();
|
||||
}
|
||||
last_state = state;
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
logs:
|
||||
component: ERROR
|
||||
|
||||
# web_server:
|
||||
# port: 80
|
||||
# version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 8
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: sk6812 #ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
- strobe:
|
||||
name: "BEACON"
|
||||
colors:
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 200ms
|
||||
- state: true
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 50%
|
||||
duration: 200ms
|
||||
- state: false
|
||||
duration: 10s
|
||||
- lambda:
|
||||
name: "ERROR"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(1, 0, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
- lambda:
|
||||
name: "BOOT"
|
||||
update_interval: 0.5s
|
||||
lambda: |-
|
||||
static bool state = false;
|
||||
auto call = id(led).turn_on();
|
||||
call.set_transition_length(500);
|
||||
call.set_rgb(0, 1, 0);
|
||||
if (!state) {
|
||||
call.set_brightness(1);
|
||||
} else {
|
||||
// If using 0, it freaks Home Assistant UI.
|
||||
call.set_brightness(0.01);
|
||||
}
|
||||
call.perform();
|
||||
state = !state;
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -1,19 +1,22 @@
|
||||
substitutions:
|
||||
device: cam-1
|
||||
name: Cam 1
|
||||
comment: "DEV: Camera"
|
||||
area: DEV
|
||||
comment: "${area} | Camera"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32cam
|
||||
framework:
|
||||
type: arduino
|
||||
# type: esp-idf
|
||||
version: 2.0.14
|
||||
platform_version: 6.5.0
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -25,7 +28,7 @@ packages:
|
||||
# components: [ esp32_camera ]
|
||||
|
||||
esp32_camera:
|
||||
name: My Camera
|
||||
name: Camera
|
||||
external_clock:
|
||||
pin: 0
|
||||
frequency: 20MHz
|
||||
@@ -43,7 +46,7 @@ switch:
|
||||
pin: 32
|
||||
# restore_mode: ALWAYS_ON
|
||||
# id: "cam_power_down"
|
||||
name: "${name} Enable CAM"
|
||||
name: Enable
|
||||
|
||||
# esp32_camera_web_server:
|
||||
# - port: 8080
|
||||
|
||||
124
mcu-can-node-1.yaml
Normal file
124
mcu-can-node-1.yaml
Normal file
@@ -0,0 +1,124 @@
|
||||
substitutions:
|
||||
device: can-node-1
|
||||
name: CAN Node 1
|
||||
area: DEV
|
||||
comment: "${area} | CANopen"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
refresh: 1h
|
||||
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: can_bus
|
||||
rx_pin: 22
|
||||
tx_pin: 23
|
||||
can_id: 1
|
||||
bit_rate: 500kbps
|
||||
|
||||
canopen:
|
||||
id: can_open
|
||||
canbus_id: can_bus
|
||||
node_id: 1
|
||||
entities:
|
||||
- index: 1
|
||||
id: light1_state
|
||||
rpdo:
|
||||
- node_id: 2
|
||||
tpdo: 0
|
||||
offset: 0
|
||||
cmd: 0
|
||||
|
||||
- index: 2
|
||||
id: light1_brightness
|
||||
size: 1
|
||||
min_value: 0.0
|
||||
max_value: 1.0
|
||||
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:
|
||||
- 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
|
||||
name: Boot
|
||||
id: boot_button
|
||||
pin:
|
||||
number: 0
|
||||
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:
|
||||
- platform: gpio
|
||||
name: LED
|
||||
id: blue_led
|
||||
internal: true
|
||||
pin: 2
|
||||
138
mcu-can-node-2.yaml
Normal file
138
mcu-can-node-2.yaml
Normal file
@@ -0,0 +1,138 @@
|
||||
substitutions:
|
||||
device: can-node-2
|
||||
name: CAN Node 2
|
||||
area: DEV
|
||||
comment: "${area} | CANopen"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
refresh: 1h
|
||||
- source: github://mrk-its/esphome-canbus-udp-multicast@dev
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
canbus:
|
||||
- platform: esp32_can
|
||||
id: can_bus
|
||||
rx_pin: 22
|
||||
tx_pin: 23
|
||||
can_id: 2
|
||||
bit_rate: 500kbps
|
||||
|
||||
canopen:
|
||||
id: can_open
|
||||
canbus_id: can_bus
|
||||
node_id: 2
|
||||
entities:
|
||||
- index: 1
|
||||
id: light1
|
||||
tpdo: 0
|
||||
|
||||
- index: 2
|
||||
id: light2
|
||||
tpdo: 0
|
||||
|
||||
- index: 3
|
||||
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:
|
||||
- platform: as3935
|
||||
name: Storm Alert
|
||||
|
||||
sensor:
|
||||
- platform: as3935
|
||||
lightning_energy:
|
||||
name: Energy
|
||||
distance:
|
||||
name: Storm Distance
|
||||
|
||||
# logger:
|
||||
# level: VERY_VERBOSE
|
||||
# logs:
|
||||
# canbus: DEBUG
|
||||
# canopen: DEBUG
|
||||
# can_driver: DEBUG
|
||||
# timer_driver: DEBUG
|
||||
@@ -1,17 +1,22 @@
|
||||
substitutions:
|
||||
device: cec-bedroom
|
||||
name: Bedroom TV
|
||||
comment: "DEV"
|
||||
area: Bedroom
|
||||
comment: "${area} | CEC"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
# type: esp-idf
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
# - source: github://pr#3017
|
||||
@@ -61,13 +66,14 @@ binary_sensor:
|
||||
inverted: true
|
||||
|
||||
light:
|
||||
- platform: neopixelbus
|
||||
type: GRB
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
variant: WS2812
|
||||
num_leds: 1
|
||||
name: "${name} LED"
|
||||
id: neo
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
# Use default parameters:
|
||||
- random:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: clock-1
|
||||
name: Clock 1
|
||||
comment: "First floor: Clock"
|
||||
area: Office R
|
||||
comment: "${area} | Clock"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
@@ -14,8 +17,8 @@ esp32:
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.3
|
||||
platform_version: 53.03.12
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -35,7 +38,6 @@ packages:
|
||||
#
|
||||
# GPIO9 GPIO (BUZZER?)
|
||||
|
||||
|
||||
# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
|
||||
api:
|
||||
services:
|
||||
@@ -154,7 +156,7 @@ sensor:
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "${name} Alarm"
|
||||
name: Alarm
|
||||
optimistic: true
|
||||
turn_on_action:
|
||||
- globals.set:
|
||||
|
||||
173
mcu-clock-living-room.yaml
Normal file
173
mcu-clock-living-room.yaml
Normal 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'
|
||||
@@ -1,18 +1,27 @@
|
||||
substitutions:
|
||||
device: desk-lamp
|
||||
name: Mi Desk Lamp
|
||||
comment: ""
|
||||
name: Desk Lamp
|
||||
area: Room
|
||||
comment: "${area} | Desk lamp"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
# external_components:
|
||||
# - source: github://pr#7958
|
||||
# refresh: 0s
|
||||
# components:
|
||||
# - rotary_encoder
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -41,7 +50,7 @@ binary_sensor:
|
||||
|
||||
light:
|
||||
- platform: cwww
|
||||
name: "${name} Light"
|
||||
name: Light
|
||||
id: mi_desk_light
|
||||
gamma_correct: 1
|
||||
default_transition_length: 100ms
|
||||
|
||||
@@ -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
|
||||
|
||||
dallas:
|
||||
- pin: GPIO25
|
||||
update_interval: 10s
|
||||
|
||||
sensor:
|
||||
- platform: dallas
|
||||
index: 0
|
||||
name: $name Dallas
|
||||
id: temp
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: dimmer
|
||||
name: Dimmer
|
||||
comment: "Pain cave: Fan"
|
||||
area: Basement
|
||||
comment: "${area} | Pain cave fan"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_loop:
|
||||
then:
|
||||
@@ -30,12 +33,9 @@ esphome:
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
# type: arduino
|
||||
# version: 2.0.14
|
||||
type: esp-idf
|
||||
# version: 5.1.2
|
||||
version: 5.2.1
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.12
|
||||
|
||||
external_components:
|
||||
- source: github://pr#7072
|
||||
@@ -52,12 +52,12 @@ light:
|
||||
name: Exercise Room Fan
|
||||
default_transition_length: 10s
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
# rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -2,18 +2,21 @@ substitutions:
|
||||
device: echo-1
|
||||
name: Echo 1
|
||||
name_short: Echo 1
|
||||
comment: "DEV"
|
||||
area: DEV
|
||||
comment: "${area} | Echo"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
version: 2.0.14
|
||||
platform_version: 6.5.0
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
# type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
@@ -32,7 +35,7 @@ external_components:
|
||||
refresh: 0s
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
common: !include common/common_esp8266.yaml # this profile is without fancy features that are not supported by arduino
|
||||
|
||||
api:
|
||||
services:
|
||||
@@ -45,8 +48,8 @@ api:
|
||||
rtttl: !lambda 'return song;'
|
||||
|
||||
# i2c:
|
||||
# sda: 32
|
||||
# scl: 26
|
||||
# sda: 26
|
||||
# scl: 32
|
||||
# scan: true #false
|
||||
# frequency: 100kHz
|
||||
|
||||
@@ -58,7 +61,7 @@ api:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Button
|
||||
name: Button
|
||||
pin:
|
||||
number: 39
|
||||
inverted: true
|
||||
@@ -75,7 +78,7 @@ light:
|
||||
# id: status_led_id
|
||||
# output: status_led_output
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: neo_buildin
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
@@ -127,7 +130,7 @@ speaker:
|
||||
i2s_dout_pin:
|
||||
number: 22
|
||||
allow_other_uses: true
|
||||
mode: mono
|
||||
channel: mono
|
||||
|
||||
rtttl:
|
||||
id: my_rtttl
|
||||
@@ -140,10 +143,10 @@ microphone:
|
||||
adc_type: external
|
||||
pdm: true
|
||||
|
||||
# voice_assistant:
|
||||
# microphone: echo_microphone
|
||||
# on_tts_end:
|
||||
# - media_player.play_media:
|
||||
# id: media_out
|
||||
# media_url: !lambda |-
|
||||
# return x;
|
||||
voice_assistant:
|
||||
microphone: echo_microphone
|
||||
on_tts_end:
|
||||
- media_player.play_media:
|
||||
id: media_out
|
||||
media_url: !lambda |-
|
||||
return x;
|
||||
108
mcu-echo.yaml
108
mcu-echo.yaml
@@ -2,19 +2,22 @@ substitutions:
|
||||
device: echo
|
||||
name: Echo
|
||||
name_short: Echo
|
||||
comment: "DEV"
|
||||
area: Office R
|
||||
comment: "${area} | Speaker"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: arduino
|
||||
# type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.5.0
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -26,7 +29,7 @@ external_components:
|
||||
# refresh: 0s
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
# api:
|
||||
# services:
|
||||
@@ -39,20 +42,20 @@ packages:
|
||||
# rtttl: !lambda 'return song;'
|
||||
|
||||
i2c:
|
||||
sda: 32
|
||||
scl: 26
|
||||
sda: 26
|
||||
scl: 32
|
||||
scan: true #false
|
||||
frequency: 100kHz
|
||||
|
||||
binary_sensor:
|
||||
# - platform: gpio
|
||||
# name: ${name} On-Board Button
|
||||
# name: On-Board Button
|
||||
# id: button_buildin
|
||||
# pin:
|
||||
# number: 39
|
||||
# inverted: true
|
||||
- platform: gpio
|
||||
name: ${name} Button
|
||||
name: Button
|
||||
id: button_ext
|
||||
pin:
|
||||
number: 12
|
||||
@@ -61,7 +64,8 @@ binary_sensor:
|
||||
input: true
|
||||
pullup: true
|
||||
on_click:
|
||||
- media_player.toggle: media_out
|
||||
- media_player.toggle:
|
||||
id: media_out
|
||||
|
||||
light:
|
||||
# - platform: neopixelbus
|
||||
@@ -69,10 +73,10 @@ light:
|
||||
# pin: 27
|
||||
# variant: WS2812
|
||||
# num_leds: 1
|
||||
# name: "${name} On-Board LED"
|
||||
# name: On-Board LED"
|
||||
# id: neo_buildin
|
||||
- platform: rgb
|
||||
name: "${name} Light"
|
||||
name: Light
|
||||
id: led_light
|
||||
red: led_red
|
||||
green: led_green
|
||||
@@ -96,62 +100,50 @@ output:
|
||||
number: 23
|
||||
allow_other_uses: true
|
||||
|
||||
# i2s_audio:
|
||||
# - id: i2s_out
|
||||
# i2s_lrclk_pin: 33
|
||||
# i2s_bclk_pin: 19
|
||||
|
||||
# adf_pipeline:
|
||||
# - platform: i2s_audio
|
||||
# type: audio_out
|
||||
# id: adf_i2s_out
|
||||
# i2s_audio_id: i2s_out
|
||||
# i2s_dout_pin: 22
|
||||
|
||||
# media_player:
|
||||
# - platform: adf_pipeline
|
||||
# keep_pipeline_alive: true
|
||||
# id: media_out
|
||||
# name: ${name} Player
|
||||
# on_play:
|
||||
# - light.turn_on: led_light
|
||||
# on_idle:
|
||||
# - light.turn_off: led_light
|
||||
# pipeline:
|
||||
# - self
|
||||
# - adf_i2s_out
|
||||
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 33
|
||||
i2s_bclk_pin: 19
|
||||
|
||||
media_player:
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: media_out
|
||||
name: ${name} Player
|
||||
id: speaker_id
|
||||
dac_type: external
|
||||
i2s_dout_pin:
|
||||
number: 22
|
||||
# allow_other_uses: true
|
||||
mode: mono
|
||||
i2s_dout_pin: 22
|
||||
channel: mono
|
||||
sample_rate: 48000
|
||||
- platform: mixer
|
||||
id: mixer_speaker_id
|
||||
output_speaker: speaker_id
|
||||
source_speakers:
|
||||
- id: announcement_spk_mixer_input
|
||||
- id: media_spk_mixer_input
|
||||
- id: rtttl_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: media_spk_resampling_input
|
||||
output_speaker: media_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: announcement_spk_resampling_input
|
||||
output_speaker: announcement_spk_mixer_input
|
||||
- platform: resampler
|
||||
id: rtttl_spk_resampling_input
|
||||
output_speaker: rtttl_spk_mixer_input
|
||||
|
||||
media_player:
|
||||
- platform: speaker
|
||||
id: media_out
|
||||
name: Player
|
||||
media_pipeline:
|
||||
speaker: media_spk_resampling_input
|
||||
announcement_pipeline:
|
||||
speaker: announcement_spk_resampling_input
|
||||
on_play:
|
||||
- light.turn_on: led_light
|
||||
on_idle:
|
||||
- light.turn_off: led_light
|
||||
|
||||
# speaker:
|
||||
# - platform: i2s_audio
|
||||
# id: echo_speaker
|
||||
# dac_type: external
|
||||
# i2s_dout_pin:
|
||||
# number: 22
|
||||
# allow_other_uses: true
|
||||
# mode: mono
|
||||
|
||||
# rtttl:
|
||||
# id: my_rtttl
|
||||
# speaker: echo_speaker
|
||||
rtttl:
|
||||
id: my_rtttl
|
||||
speaker: rtttl_spk_resampling_input
|
||||
|
||||
# microphone:
|
||||
# - platform: i2s_audio
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
substitutions:
|
||||
device: eworkbench
|
||||
name: Electronics Workbench
|
||||
comment: "Office R: Electronics Workbench"
|
||||
comment: "Office R | Electronics Workbench"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
@@ -14,8 +15,8 @@ esp32:
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -42,6 +43,10 @@ i2c:
|
||||
sda: 1
|
||||
scl: 0
|
||||
scan: true
|
||||
# - id: i2c_grove_2
|
||||
# sda: 19
|
||||
# scl: 18
|
||||
# scan: true
|
||||
|
||||
uart:
|
||||
- id: uart_log
|
||||
@@ -53,87 +58,188 @@ uart:
|
||||
tx_pin: 19
|
||||
baud_rate: 9600
|
||||
|
||||
pcf8574:
|
||||
- id: 'pcf8574_hub'
|
||||
address: 0x20
|
||||
pcf8575: true
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #0"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 0
|
||||
# One of INPUT or OUTPUT
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #1"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 1
|
||||
# One of INPUT or OUTPUT
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #7"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 7
|
||||
# One of INPUT or OUTPUT
|
||||
mode:
|
||||
output: true
|
||||
inverted: false
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: rotary_encoder_button
|
||||
name: "PCF8574 Pin #10"
|
||||
pin:
|
||||
number: 6
|
||||
# mode: INPUT_PULLUP
|
||||
inverted: true
|
||||
filters:
|
||||
- delayed_on: 30ms
|
||||
- delayed_off: 30ms
|
||||
on_press:
|
||||
- display_menu.enter:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 8
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #11"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 9
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #12"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 10
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #13"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 11
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #14"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 12
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #15"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 13
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #15"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 14
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #17"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 15
|
||||
# One of INPUT or OUTPUT
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
|
||||
display:
|
||||
- platform: lcd_pcf8574
|
||||
id: my_lcd
|
||||
dimensions: 20x4
|
||||
address: 0x27
|
||||
user_characters:
|
||||
- position: 0
|
||||
data: # mark_back symbol
|
||||
- 0b00100
|
||||
- 0b01000
|
||||
- 0b11110
|
||||
- 0b01001
|
||||
- 0b00101
|
||||
- 0b00001
|
||||
- 0b11110
|
||||
- 0b00000
|
||||
lambda: |-
|
||||
id(my_lcd_menu).draw();
|
||||
if (!id(my_lcd_menu).is_active())
|
||||
it.print("Menu is not active");
|
||||
# binary_sensor:
|
||||
# - platform: gpio
|
||||
# id: rotary_encoder_button
|
||||
# pin:
|
||||
# number: 6
|
||||
# # mode: INPUT_PULLUP
|
||||
# inverted: true
|
||||
# filters:
|
||||
# - delayed_on: 30ms
|
||||
# - delayed_off: 30ms
|
||||
# on_press:
|
||||
# - display_menu.enter:
|
||||
|
||||
lcd_menu:
|
||||
id: my_lcd_menu
|
||||
display_id: my_lcd
|
||||
active: true
|
||||
mode: rotary
|
||||
mark_back: 0x08
|
||||
mark_selected: 0x3e
|
||||
mark_editing: 0x2a
|
||||
mark_submenu: 0x7e
|
||||
items:
|
||||
- type: back
|
||||
text: 'Back'
|
||||
- type: label
|
||||
text: 'Label 1'
|
||||
- type: label
|
||||
text: !lambda |-
|
||||
return "Templated label";
|
||||
# display:
|
||||
# - platform: lcd_pcf8574
|
||||
# id: my_lcd
|
||||
# i2c_id: i2c_grove
|
||||
# dimensions: 20x4
|
||||
# address: 0x27
|
||||
# user_characters:
|
||||
# - position: 0
|
||||
# data: # mark_back symbol
|
||||
# - 0b00100
|
||||
# - 0b01000
|
||||
# - 0b11110
|
||||
# - 0b01001
|
||||
# - 0b00101
|
||||
# - 0b00001
|
||||
# - 0b11110
|
||||
# - 0b00000
|
||||
# lambda: |-
|
||||
# id(my_lcd_menu).draw();
|
||||
# if (!id(my_lcd_menu).is_active())
|
||||
# it.print("Menu is not active");
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
id: hdmi_switch
|
||||
optimistic: true
|
||||
options:
|
||||
- PC1
|
||||
- PC2
|
||||
- PC3
|
||||
- PC4
|
||||
initial_option: PC1
|
||||
# set_action:
|
||||
# - logger.log:
|
||||
# format: "Chosen option: %s (index %d)"
|
||||
# args: ["x.c_str()", "i"]
|
||||
# - uart.write:
|
||||
# id: uart_hdmi_switch
|
||||
# data: [0x47, 0x30, 0x31, 0x67, 0x41, 0x00]
|
||||
# lcd_menu:
|
||||
# id: my_lcd_menu
|
||||
# display_id: my_lcd
|
||||
# active: true
|
||||
# mode: rotary
|
||||
# mark_back: 0x08
|
||||
# mark_selected: 0x3e
|
||||
# mark_editing: 0x2a
|
||||
# mark_submenu: 0x7e
|
||||
# items:
|
||||
# - type: back
|
||||
# text: 'Back'
|
||||
# - type: label
|
||||
# text: 'Label 1'
|
||||
# - type: label
|
||||
# text: !lambda |-
|
||||
# return "Templated label";
|
||||
|
||||
sensor:
|
||||
- platform: rotary_encoder
|
||||
id: rotary_encoder_sensor
|
||||
pin_a: 4
|
||||
pin_b: 5
|
||||
filters:
|
||||
debounce: 30ms
|
||||
on_anticlockwise:
|
||||
- display_menu.up:
|
||||
on_clockwise:
|
||||
- display_menu.down:
|
||||
# select:
|
||||
# - platform: template
|
||||
# id: hdmi_switch
|
||||
# optimistic: true
|
||||
# options:
|
||||
# - PC1
|
||||
# - PC2
|
||||
# - PC3
|
||||
# - PC4
|
||||
# initial_option: PC1
|
||||
# # set_action:
|
||||
# # - logger.log:
|
||||
# # format: "Chosen option: %s (index %d)"
|
||||
# # args: ["x.c_str()", "i"]
|
||||
# # - uart.write:
|
||||
# # id: uart_hdmi_switch
|
||||
# # data: [0x47, 0x30, 0x31, 0x67, 0x41, 0x00]
|
||||
|
||||
# sensor:
|
||||
# - platform: rotary_encoder
|
||||
# id: rotary_encoder_sensor
|
||||
# pin_a: 4
|
||||
# pin_b: 5
|
||||
# filters:
|
||||
# debounce: 30ms
|
||||
# on_anticlockwise:
|
||||
# - display_menu.up:
|
||||
# on_clockwise:
|
||||
# - display_menu.down:
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
substitutions:
|
||||
device: fireplace-old
|
||||
name: Heating Fireplace
|
||||
comment: "OBSOLETE | Ground floor, Kitchen: Fireplace monitoring for heating"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
|
||||
# wifi:
|
||||
# use_address: mcu-fireplace.local
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
dallas:
|
||||
- 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
|
||||
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
|
||||
@@ -1,18 +1,21 @@
|
||||
substitutions:
|
||||
device: fireplace
|
||||
name: Heating Fireplace
|
||||
comment: "Ground floor, Kitchen: Fireplace monitoring for heating"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area}, Fireplace | Fireplace monitoring for heating"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: github://mknjc/esphome@ds248x
|
||||
@@ -76,12 +79,12 @@ pca9554:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Status Button"
|
||||
name: Status Button
|
||||
filters:
|
||||
- invert:
|
||||
pin: 39
|
||||
- platform: template
|
||||
name: "${name} Fire"
|
||||
name: Fire
|
||||
lambda: |-
|
||||
if (id(heating_fireplace_temperature).state > 37.5) {
|
||||
return true;
|
||||
@@ -89,7 +92,7 @@ binary_sensor:
|
||||
return false;
|
||||
}
|
||||
- platform: gpio
|
||||
name: "${name} Pump"
|
||||
name: Pump
|
||||
id: off_peak_status
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
@@ -102,7 +105,7 @@ sensor:
|
||||
- platform: ds248x
|
||||
address: 0x6203168B32A7FF28
|
||||
# index: 0
|
||||
name: "${name}"
|
||||
name: Temperature
|
||||
id: 'heating_fireplace_temperature'
|
||||
# - platform: dht
|
||||
# pin: 14
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
substitutions:
|
||||
device: gate
|
||||
name: Gate
|
||||
comment: "Outside: Gate"
|
||||
area: Outside
|
||||
comment: "${area} | Gate"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -37,12 +40,12 @@ packages:
|
||||
|
||||
button:
|
||||
- platform: output
|
||||
name: "${name} Open"
|
||||
name: Open
|
||||
id: gate_open
|
||||
output: relay_1
|
||||
duration: 200ms
|
||||
- platform: output
|
||||
name: "${name} Close"
|
||||
name: Close
|
||||
id: gate_close
|
||||
output: relay_2
|
||||
duration: 200ms
|
||||
@@ -57,46 +60,47 @@ output:
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "${name} Open"
|
||||
name: Open
|
||||
turn_on_action:
|
||||
- button.press: gate_open
|
||||
- platform: template
|
||||
name: "${name} Close"
|
||||
name: Close
|
||||
turn_on_action:
|
||||
- button.press: gate_close
|
||||
- platform: template
|
||||
name: "${name} Auto Open"
|
||||
name: Auto Open
|
||||
id: auto_open
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
- platform: template
|
||||
name: "${name} Auto Close"
|
||||
name: Auto Close
|
||||
id: auto_close
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
- platform: template
|
||||
name: "${name} Enable Auris"
|
||||
name: Enable Auris
|
||||
id: enable_auris
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
- platform: template
|
||||
name: "${name} Enable Yaris"
|
||||
name: Enable Yaris
|
||||
id: enable_yaris
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
- platform: template
|
||||
name: "${name} Enable Honda PCX125"
|
||||
name: Enable Honda PCX125
|
||||
id: enable_pcx125
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
- platform: template
|
||||
name: "${name} Enable Suzuki DL650"
|
||||
name: Enable Suzuki DL650
|
||||
id: enable_dl650
|
||||
optimistic: true
|
||||
restore_mode: RESTORE_DEFAULT_ON
|
||||
|
||||
# Bluetooth related stuff
|
||||
esp32_ble_tracker:
|
||||
id: ${name}_ble_tracker
|
||||
scan_parameters:
|
||||
duration: 1min
|
||||
|
||||
@@ -272,7 +276,7 @@ binary_sensor:
|
||||
|
||||
select:
|
||||
- platform: template
|
||||
name: Gate
|
||||
name: State
|
||||
id: gate_state
|
||||
options:
|
||||
- Open
|
||||
|
||||
@@ -1,22 +1,25 @@
|
||||
substitutions:
|
||||
device: gateway
|
||||
name: Gateway
|
||||
comment: "DEV | BLE Proxy, Modbus"
|
||||
area: DEV
|
||||
comment: "${area} | BLE Proxy, Modbus"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
framework:
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
type: esp-idf
|
||||
|
||||
# external_components:
|
||||
# - source: github://pr#4062
|
||||
# components: ethernet
|
||||
external_components:
|
||||
- source: github://pr#8457
|
||||
components: ethernet
|
||||
# - source: github://pr#4080
|
||||
# components: [lcd_pcf8574, lcd_base]
|
||||
# - source: github://pr#3564
|
||||
@@ -71,6 +74,12 @@ i2c:
|
||||
# gateway: 10.17.240.1
|
||||
# subnet: 255.255.255.0
|
||||
|
||||
|
||||
# ethernet:
|
||||
# use_address: 10.17.241.254
|
||||
# use_address: 10.17.241.98
|
||||
# use_address: mcu-gateway.local
|
||||
|
||||
uart:
|
||||
id: uart_modbus
|
||||
tx_pin: 4
|
||||
@@ -102,7 +111,7 @@ sensor:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_temp_1
|
||||
id: temp_1
|
||||
name: "${name} Temperature 1"
|
||||
name: Temperature 1
|
||||
address: 0
|
||||
unit_of_measurement: "°C"
|
||||
register_type: read
|
||||
@@ -114,7 +123,7 @@ sensor:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_temp_1
|
||||
id: hum_1
|
||||
name: "${name} Humidity 1"
|
||||
name: Humidity 1
|
||||
address: 1
|
||||
unit_of_measurement: "%"
|
||||
register_type: read
|
||||
@@ -125,7 +134,7 @@ sensor:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_temp_2
|
||||
id: temp_2
|
||||
name: "${name} Temperature 2"
|
||||
name: Temperature 2
|
||||
address: 0
|
||||
unit_of_measurement: "°C"
|
||||
register_type: read
|
||||
@@ -137,7 +146,7 @@ sensor:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_temp_2
|
||||
id: hum_2
|
||||
name: "${name} Humidity 2"
|
||||
name: Humidity 2
|
||||
address: 1
|
||||
unit_of_measurement: "%"
|
||||
register_type: read
|
||||
@@ -147,25 +156,25 @@ sensor:
|
||||
- multiply: 0.1
|
||||
# - platform: bmp085
|
||||
# temperature:
|
||||
# name: "BMP180 Temperature"
|
||||
# name: BMP180 Temperature
|
||||
# pressure:
|
||||
# name: "BMP180 Pressure"
|
||||
# name: BMP180 Pressure
|
||||
# address: 0x77
|
||||
# update_interval: 60s
|
||||
# - platform: bme280
|
||||
# temperature:
|
||||
# name: "BME280 Temperature"
|
||||
# name: BME280 Temperature
|
||||
# oversampling: 16x
|
||||
# pressure:
|
||||
# name: "BME280 Pressure"
|
||||
# name: BME280 Pressure
|
||||
# humidity:
|
||||
# name: "BME280 Humidity"
|
||||
# name: BME280 Humidity
|
||||
# address: 0x76
|
||||
# update_interval: 60s
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_adc_1
|
||||
id: adc_1_1
|
||||
name: "Solar Pressure"
|
||||
name: Solar Pressure
|
||||
address: 0
|
||||
unit_of_measurement: "MPa"
|
||||
register_type: holding
|
||||
@@ -180,7 +189,7 @@ sensor:
|
||||
switch:
|
||||
- platform: modbus_controller
|
||||
modbus_controller_id: modbus_adc_1
|
||||
name: "Readress MODBUS"
|
||||
name: Readress MODBUS
|
||||
register_type: holding
|
||||
address: 0x00FD
|
||||
entity_category: config
|
||||
|
||||
423
mcu-heating.yaml
423
mcu-heating.yaml
@@ -2,18 +2,21 @@ substitutions:
|
||||
device: heating
|
||||
name: Heating
|
||||
name_1: Heater
|
||||
comment: "Basement: Hot water and Heating control"
|
||||
area: Basement
|
||||
comment: "${area} | Hot water and Heating control"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: github://mknjc/esphome@ds248x
|
||||
@@ -117,36 +120,6 @@ time:
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
on_time:
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 5
|
||||
# # days_of_week: MON-FRI
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "AUTO"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 6
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "OFF"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 16
|
||||
# # days_of_week: MON-FRI
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "AUTO"
|
||||
# - seconds: 0
|
||||
# minutes: 0
|
||||
# hours: 0
|
||||
# then:
|
||||
# - climate.control:
|
||||
# id: hot_water_climate
|
||||
# mode: "OFF"
|
||||
- seconds: 0
|
||||
minutes: /1
|
||||
# hours: 5-23
|
||||
@@ -154,72 +127,7 @@ time:
|
||||
then:
|
||||
lambda: |-
|
||||
if (id(hot_water_heater).state >= 67.0) {
|
||||
id(relay_1).turn_off();
|
||||
}
|
||||
// ## Solar
|
||||
// move to temp sensor?
|
||||
// //ESP_LOGD("main", "(hot_water_solar - current_hot_water_solar_delta) > set_hot_water_solar_temperature [(%.2f - %.2f) > %.2f] == TRUE", id(hot_water_solar).state, id(set_hot_water_solar_delta), id(set_hot_water_solar_temperature));
|
||||
//if ((id(hot_water_solar).state <= id(set_hot_water_solar_temperature)) && ((id(temp_1).state + id(set_hot_water_solar_delta)) >= id(hot_water_solar).state)) {
|
||||
// ESP_LOGD("main", "Water in solar tank is colder AND temperature of solar collector is higher => ON");
|
||||
// id(relay_1).turn_on();
|
||||
//}
|
||||
//if ((id(hot_water_solar).state > id(set_hot_water_solar_temperature)) || ((id(temp_1).state - id(hot_water_solar).state) < (id(set_hot_water_solar_delta) / 2))) {
|
||||
// ESP_LOGD("main", "Water in solar tank is higher OR temperature of solar collector is lower => OFF");
|
||||
// id(relay_1).turn_off();
|
||||
//}
|
||||
|
||||
// ## Hot Water
|
||||
if (!true) {
|
||||
if ((id(ha_time).now().hour >= 5) && (id(ha_time).now().hour <= 23)) {
|
||||
if (id(hot_water_heater).state <= id(set_hot_water_heating_temperature_min)) {
|
||||
ESP_LOGD("main", "Water in heated tank is cold, needs to reheat => ON");
|
||||
id(relay_1).turn_on();
|
||||
//id(relay_3).turn_on();
|
||||
id(relay_4).turn_on();
|
||||
} else {
|
||||
if (id(hot_water_heater).state >= id(set_hot_water_heating_temperature_max)) {
|
||||
ESP_LOGD("main", "Water in heated tank is OK => OFF");
|
||||
id(relay_1).turn_off();
|
||||
//id(relay_3).turn_off();
|
||||
id(relay_4).turn_off();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ESP_LOGD("main", "Night Mode, Hot water heating => OFF");
|
||||
id(relay_1).turn_off();
|
||||
}
|
||||
}
|
||||
|
||||
// ## Heating - TYPE 1: heat water to desired max temperature at specified times
|
||||
// ## Heating - TYPE 2: mantain temperature in min-max range in desired time range
|
||||
//if ( (id(relay_2).state) && (id(heating_climate).mode == 0)) {
|
||||
if (id(heating_climate).mode == 0) {
|
||||
id(relay_2).turn_off();
|
||||
ESP_LOGD("main", "Climate Heating is OFF => Turn Heating OFF!");
|
||||
} else {
|
||||
ESP_LOGD("main", "Climate Heating state is other than OFFF => dont touch heating");
|
||||
}
|
||||
if (!true) {
|
||||
//if (!id(heating_override).state) { // if not overriden from Thermosta
|
||||
if (id(ha_time).now().hour >= 7 && id(ha_time).now().hour <= 23) { // is between 5:00-23:59
|
||||
if ((id(current_heating_temperature_min).state <= id(set_heating_temperature_min)) && !id(heating_fireplace_status).state) { // temperature LOWER than set AND fireplace is NOT ON
|
||||
ESP_LOGD("main", "Is cold inside, heating => ON DISABLED");
|
||||
id(relay_2).turn_on();
|
||||
} else {
|
||||
if (id(current_heating_temperature_min).state >= id(set_heating_temperature_max)) {
|
||||
ESP_LOGD("main", "Temperature is fine, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
if (id(heating_fireplace_status).state) {
|
||||
ESP_LOGD("main", "Fireplace is ON, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
}
|
||||
} else { // othervise night mode
|
||||
ESP_LOGD("main", "Night Mode, heating => OFF");
|
||||
id(relay_2).turn_off();
|
||||
}
|
||||
//}
|
||||
id(hot_water_demand).turn_off();
|
||||
}
|
||||
|
||||
climate:
|
||||
@@ -235,39 +143,12 @@ climate:
|
||||
default_target_temperature_low: 48 °C
|
||||
default_target_temperature_high: 56 °C
|
||||
heat_action:
|
||||
- switch.turn_on: relay_1
|
||||
- switch.turn_on: hot_water_demand
|
||||
idle_action:
|
||||
- switch.turn_off: relay_1
|
||||
- switch.turn_off: hot_water_demand
|
||||
away_config:
|
||||
default_target_temperature_low: 30 °C
|
||||
default_target_temperature_high: 40 °C
|
||||
- platform: bang_bang
|
||||
sensor: current_heating_temperature_min
|
||||
name: Heating
|
||||
id: heating_climate
|
||||
visual:
|
||||
min_temperature: 12
|
||||
max_temperature: 35
|
||||
temperature_step: 0.1
|
||||
default_target_temperature_low: 19 °C
|
||||
default_target_temperature_high: 20 °C
|
||||
heat_action:
|
||||
- switch.turn_on: relay_2
|
||||
idle_action:
|
||||
- switch.turn_off: relay_2
|
||||
away_config:
|
||||
default_target_temperature_low: 17 °C
|
||||
default_target_temperature_high: 18 °C
|
||||
# interval:
|
||||
# - interval: 5s
|
||||
# then:
|
||||
# - display.page.show_next: display_1
|
||||
# # - display.page.show_next: display_2
|
||||
# - component.update: display_1
|
||||
# # - component.update: display_2
|
||||
|
||||
# dallas:
|
||||
# - pin: 32
|
||||
|
||||
i2c:
|
||||
# - id: i2c0
|
||||
@@ -298,113 +179,34 @@ uart:
|
||||
stop_bits: 2
|
||||
# debug:
|
||||
|
||||
# light:
|
||||
# - platform: neopixelbus
|
||||
# type: GRB
|
||||
# pin: 27
|
||||
# variant: WS2812
|
||||
# num_leds: 1
|
||||
# name: "${name} Light"
|
||||
# id: neo
|
||||
# effects:
|
||||
# # Use default parameters:
|
||||
# - random:
|
||||
# # Customize parameters
|
||||
# - random:
|
||||
# name: "My Slow Random Effect"
|
||||
# transition_length: 30s
|
||||
# update_interval: 30s
|
||||
# - random:
|
||||
# name: "My Fast Random Effect"
|
||||
# transition_length: 4s
|
||||
# update_interval: 5s
|
||||
# - strobe:
|
||||
# - strobe:
|
||||
# name: Strobe Effect With Custom Values
|
||||
# colors:
|
||||
# - state: True
|
||||
# brightness: 100%
|
||||
# red: 100%
|
||||
# green: 90%
|
||||
# blue: 0%
|
||||
# duration: 500ms
|
||||
# - state: False
|
||||
# duration: 250ms
|
||||
# - state: True
|
||||
# brightness: 100%
|
||||
# red: 0%
|
||||
# green: 100%
|
||||
# blue: 0%
|
||||
# duration: 500ms
|
||||
# - flicker:
|
||||
# - flicker:
|
||||
# name: Flicker Effect With Custom Values
|
||||
# alpha: 95%
|
||||
# intensity: 1.5%
|
||||
# - addressable_rainbow:
|
||||
# - addressable_rainbow:
|
||||
# name: Rainbow Effect With Custom Values
|
||||
# speed: 10
|
||||
# width: 50
|
||||
# - addressable_scan:
|
||||
# - addressable_scan:
|
||||
# name: Scan Effect With Custom Values
|
||||
# move_interval: 100ms
|
||||
|
||||
pca9554:
|
||||
- id: pca9554_module
|
||||
address: 0x27
|
||||
|
||||
switch:
|
||||
# - platform: gpio
|
||||
# name: "${name} Relay 1" # Solar pump
|
||||
# id: relay_1
|
||||
# pin:
|
||||
# pcf8574: relay_module
|
||||
# number: 0
|
||||
# mode: OUTPUT
|
||||
# inverted: true
|
||||
- platform: template
|
||||
name: "Heating Enabled"
|
||||
id: heating_enabled
|
||||
optimistic: True
|
||||
- platform: gpio
|
||||
name: "${name} Relay 2" # Hot Water Heating Demand (to Heater)
|
||||
id: relay_1
|
||||
name: "Hot Water Demand" # Hot Water Heating Demand (to Heater)
|
||||
id: hot_water_demand
|
||||
pin: 22
|
||||
inverted: true
|
||||
# pin:
|
||||
# mcp23xxx: relay_module
|
||||
# # pcf8574: relay_module
|
||||
# number: 0
|
||||
# mode: OUTPUT
|
||||
# inverted: true
|
||||
# on_turn_on:
|
||||
# - light.addressable_set:
|
||||
# id: neo
|
||||
# range_from: 1
|
||||
# range_to: 2
|
||||
# red: 0%
|
||||
# green: 100%
|
||||
# blue: 0%
|
||||
# on_turn_off:
|
||||
# - light.addressable_set:
|
||||
# id: neo
|
||||
# range_from: 1
|
||||
# range_to: 2
|
||||
# red: 100%
|
||||
# green: 0%
|
||||
# blue: 0%
|
||||
- platform: gpio
|
||||
name: "${name} Relay 3" # Heating Demand (to Heater)
|
||||
id: relay_2
|
||||
name: "Heating Demand" # Heating Demand (to Heater)
|
||||
id: heating_demand
|
||||
pin: 19
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "${name_1} Power Level II"
|
||||
id: relay_3
|
||||
id: heating_power_level_2
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 4
|
||||
- platform: gpio
|
||||
name: "${name_1} Power Level III"
|
||||
id: relay_4
|
||||
id: heating_power_level_3
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 5
|
||||
@@ -432,14 +234,6 @@ sensor:
|
||||
address: 0x5A041750B2C8FF28 # Hot Water Tank - Bottom (Solar)
|
||||
name: "Hot Water - Solar"
|
||||
id: 'hot_water_solar'
|
||||
# - platform: ds248x
|
||||
# address: 0xB2041750CF1AFF28 # Heating Water Feed (OUT from Heater, TO System)
|
||||
# name: "Heating OUT"
|
||||
# id: 'heating_out'
|
||||
# - platform: ds248x
|
||||
# address: 0xDB041750EAE2FF28 # Heating Water Return (OUT from System, TO Heater)
|
||||
# name: "Heating IN"
|
||||
# id: 'heating_in'
|
||||
- platform: ds248x
|
||||
address: 0xF701143E397FAA28 # Heater Tank
|
||||
name: "Heater"
|
||||
@@ -452,48 +246,6 @@ sensor:
|
||||
address: 0x7301143F7F57AA28 # Heating Water Return (OUT from System, TO Heater)
|
||||
name: "Heating IN2"
|
||||
id: 'heating_in'
|
||||
## heating
|
||||
- platform: homeassistant
|
||||
id: current_heating_fireplace_temperature
|
||||
entity_id: sensor.heating_fireplace
|
||||
# - ground floor
|
||||
- platform: homeassistant
|
||||
id: kitchen_temperature
|
||||
entity_id: sensor.zigbee_living_room_kitchen_temperature
|
||||
- platform: homeassistant
|
||||
id: room_temperature
|
||||
entity_id: sensor.zigbee_room_temperature
|
||||
# - first floor
|
||||
- platform: homeassistant
|
||||
id: bedroom_temperature
|
||||
entity_id: sensor.zigbee_bedroom_temperature
|
||||
- platform: homeassistant
|
||||
id: office_j_temperature
|
||||
entity_id: sensor.zigbee_office_j_temperature
|
||||
- platform: homeassistant
|
||||
id: office_r_temperature
|
||||
entity_id: sensor.zigbee_office_r_temperature
|
||||
# - min/max
|
||||
- platform: template
|
||||
id: current_heating_temperature_min
|
||||
lambda: |-
|
||||
float value = 25.0;
|
||||
value = min(value, (float) id(kitchen_temperature).state);
|
||||
//value = min(value, (float) id(room_temperature).state);
|
||||
//value = min(value, (float) id(office_j_temperature).state);
|
||||
//value = min(value, (float) id(bedroom_temperature).state);
|
||||
return value;
|
||||
update_interval: 60s
|
||||
- platform: template
|
||||
id: current_heating_temperature_max
|
||||
lambda: |-
|
||||
float value = 20.0;
|
||||
value = max(value, (float) id(kitchen_temperature).state);
|
||||
value = max(value, (float) id(room_temperature).state);
|
||||
value = max(value, (float) id(office_j_temperature).state);
|
||||
value = max(value, (float) id(bedroom_temperature).state);
|
||||
return value;
|
||||
update_interval: 60s
|
||||
- platform: template
|
||||
name: "Heater Total Daily Energy"
|
||||
id: heater_daily_energy
|
||||
@@ -506,22 +258,22 @@ sensor:
|
||||
unit_of_measurement: '€'
|
||||
lambda: |-
|
||||
//# platba za odberne miesto 0,75 1,1
|
||||
//# pevna mesacna zlozka tarify 0,15000000 0,1508 * 75 A
|
||||
//# pevna mesacna zlozka tarify 0,15080000 0,1508 * 75 A
|
||||
|
||||
//## platba za systemove sluzby 0,00594340
|
||||
//# platba za prevadzku systemu 0,02598800
|
||||
//# variabilna zlozka tarify za distribuciu 0,00279200
|
||||
//# platba za straty elktr.sidtr.el. 0,00687300
|
||||
//## platba za systemove sluzby 0,00629760
|
||||
//# platba za prevadzku systemu 0,01590000
|
||||
//# variabilna zlozka tarify za distribuciu 0,00398400
|
||||
//# platba za straty elktr.sidtr.el. 0,01146600
|
||||
//# odvod do jadroveho fondu 0,00327000
|
||||
//#
|
||||
//# cena za elektrinu VT 0,06390000 0,10070000
|
||||
//# cena za elektrinu NT 0,04110000 0,06700000
|
||||
//# cena za elektrinu VT 0,06390000 0,10380000
|
||||
//# cena za elektrinu NT 0,04110000 0,06900000
|
||||
//# 0.00594340+0.02598800+0.00279200+0.00687300+0.00327000+0.04110000 = 0.0859664
|
||||
//# prenos mesacne = 0,15080000*75
|
||||
//# prenos spotreba * (0,00398400+0,01146600+0,00327000+0,00629760+0,01590000) = spotreba * 0,0409176
|
||||
|
||||
// # 1,1 + (VT * 0,1007) + (NT * 0,067) + (75 * 0,1508) + ((VT+NT) * (0,00398400+0,01146600+0,00327000+0,00629760+0,01590000))
|
||||
return (id(heater_daily_energy).state * (0.0409176 + 0.067));
|
||||
// # 1,1 + (VT * 0,1038) + (NT * 0,069) + (75 * 0,1508) + ((VT+NT) * (0,00398400+0,01146600+0,00327000+0,00629760+0,01590000))
|
||||
return (id(heater_daily_energy).state * (0.0409176 + 0.069));
|
||||
# L1
|
||||
- platform: pzemac
|
||||
#address: 161
|
||||
@@ -657,85 +409,6 @@ sensor:
|
||||
lambda: |-
|
||||
return id(heater_l1_energy).state + id(heater_l2_energy).state + id(heater_l3_energy).state ;
|
||||
|
||||
# font:
|
||||
# - file: 'slkscr.ttf'
|
||||
# id: font_1
|
||||
# size: 8
|
||||
# - file: 'BebasNeue-Regular.ttf'
|
||||
# id: font_2
|
||||
# size: 48
|
||||
# - file: 'arial.ttf'
|
||||
# id: font_3
|
||||
# size: 14
|
||||
# - file: 'B612Mono-Regular.ttf'
|
||||
# id: font_4
|
||||
# size: 16
|
||||
|
||||
# display:
|
||||
# - platform: ssd1306_i2c
|
||||
# model: "SSD1306 128x64"
|
||||
# address: 0x3C # 0x78
|
||||
# #address: 0x3D # 0x7A
|
||||
# id: display_1
|
||||
# pages:
|
||||
# # - id: page_1
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 1");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_1).state);
|
||||
# # }
|
||||
# # - id: page_2
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 2");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_2).state);
|
||||
# # }
|
||||
# # - id: page_3
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 3");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_3).state);
|
||||
# # }
|
||||
# # - id: page_4
|
||||
# # lambda: |-
|
||||
# # it.print(0, 0, id(font_3), "TEMP 4");
|
||||
# # if (id(temp_1).has_state()) {
|
||||
# # it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(temp_4).state);
|
||||
# # }
|
||||
# # - id: page_5
|
||||
# # lambda: |-
|
||||
# # it.printf(0, 0, id(font_1), TextAlign::TOP_LEFT, "RELAY 1: %s", id(relay_1).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 8, id(font_1), TextAlign::TOP_LEFT, "RELAY 2: %s", id(relay_2).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 16, id(font_1), TextAlign::TOP_LEFT, "RELAY 3: %s", id(relay_3).state ? "ON" : "OFF");
|
||||
# # it.printf(0, 24, id(font_1), TextAlign::TOP_LEFT, "RELAY 4: %s", id(relay_4).state ? "ON" : "OFF");
|
||||
# - id: page_6
|
||||
# lambda: |-
|
||||
# it.print(0, 0, id(font_3), "Hot Water");
|
||||
# it.printf(100, 0, id(font_3), TextAlign::TOP_LEFT, "%s", id(relay_2).state ? "ON" : "OFF");
|
||||
# if (id(hot_water_heater).has_state()) {
|
||||
# it.printf(0, 16, id(font_2), TextAlign::TOP_LEFT, "%.1f°", id(hot_water_heater).state);
|
||||
# }
|
||||
|
||||
# - platform: ssd1306_i2c
|
||||
# model: "SSD1306 128x64"
|
||||
# #address: 0x3C # 0x78
|
||||
# address: 0x3D # 0x7A
|
||||
# id: display_2
|
||||
# pages:
|
||||
# - id: page_2_1
|
||||
# lambda: |-
|
||||
# it.print(0, 0, id(font_3), "Heating");
|
||||
# it.printf(100, 0, id(font_3), TextAlign::TOP_LEFT, "%s", id(relay_3).state ? "ON" : "OFF");
|
||||
# it.print(100, 32, id(font_1), TextAlign::BOTTOM_LEFT, "max");
|
||||
# if (id(current_heating_temperature_max).has_state()) {
|
||||
# it.printf(0, 32, id(font_4), TextAlign::BOTTOM_LEFT, "%.1f°", id(current_heating_temperature_max).state);
|
||||
# }
|
||||
# it.print(100, 48, id(font_1), TextAlign::BOTTOM_LEFT, "min");
|
||||
# if (id(current_heating_temperature_min).has_state()) {
|
||||
# it.printf(0, 48, id(font_4), TextAlign::BOTTOM_LEFT, "%.1f°", id(current_heating_temperature_min).state);
|
||||
# }
|
||||
# it.printf(0, 64, id(font_4), TextAlign::BOTTOM_LEFT, "%s", id(off_peak_status).state ? "OFF PEAK POWER" : "Disabled");
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Off Peak" # Off Peak (HDO)
|
||||
@@ -764,29 +437,33 @@ binary_sensor:
|
||||
filters:
|
||||
- delayed_on: 300ms
|
||||
- delayed_off: 300ms
|
||||
- platform: gpio
|
||||
name: "${name} Input 3" # Heating Demand/Override (from Thermostat)
|
||||
id: heating_override
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 3
|
||||
filters:
|
||||
- delayed_on: 300ms
|
||||
- delayed_off: 300ms
|
||||
- platform: template
|
||||
id: heating_fireplace_status
|
||||
lambda: |-
|
||||
if (id(current_heating_fireplace_temperature).state > 37.5) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
- platform: template
|
||||
id: heater_alarm
|
||||
name: "Heater Alarm"
|
||||
lambda: |-
|
||||
if (id(off_peak_status).state && (id(relay_2).state || id(relay_3).state) && !id(heater_on).state) {
|
||||
if (id(off_peak_status).state && (id(heating_demand).state || id(heating_power_level_2).state) && !id(heater_on).state) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
- platform: homeassistant
|
||||
id: trv_heating_demand
|
||||
entity_id: binary_sensor.trv_heating_demand
|
||||
- platform: homeassistant
|
||||
id: heating_fireplace_fire
|
||||
entity_id: binary_sensor.heating_fireplace_fire
|
||||
- platform: template
|
||||
id: request_heating_demand
|
||||
name: "Request Heating Demand"
|
||||
lambda: |-
|
||||
if (id(trv_heating_demand).state && id(heating_enabled).state && !id(heating_fireplace_fire).state) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
on_press:
|
||||
then:
|
||||
- switch.turn_on: heating_demand
|
||||
on_release:
|
||||
then:
|
||||
- switch.turn_off: heating_demand
|
||||
@@ -1,225 +0,0 @@
|
||||
substitutions:
|
||||
device: irrigation-1
|
||||
name: Irrigation A
|
||||
comment: "OBSOLETE | Outside, Well: Irrigation system"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
board: esp01_1m
|
||||
# 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
|
||||
|
||||
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
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: kitchen
|
||||
name: Kitchen
|
||||
comment: "Kitchen: Kitchen Worktop and Stove Lights"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area} | Kitchen Worktop and Stove Lights"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
# - priority: 600.0
|
||||
@@ -29,8 +32,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -83,14 +86,14 @@ pca9685:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Status Button"
|
||||
name: Status Button
|
||||
filters:
|
||||
- invert:
|
||||
pin: 39
|
||||
|
||||
light:
|
||||
# - platform: esp32_rmt_led_strip
|
||||
# name: "${name} Status Light"
|
||||
# name: Status Light
|
||||
# id: neo
|
||||
# rgb_order: GRB
|
||||
# pin: 27
|
||||
@@ -99,7 +102,7 @@ light:
|
||||
# chipset: ws2812
|
||||
# restore_mode: ALWAYS_OFF
|
||||
- platform: cwww
|
||||
name: "${name} Worktop Left"
|
||||
name: Worktop Left
|
||||
id: light_1
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -108,7 +111,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
- platform: cwww
|
||||
name: "${name} Stove"
|
||||
name: Stove
|
||||
id: light_2
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -117,7 +120,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
- platform: cwww
|
||||
name: "${name} Worktop Right"
|
||||
name: Worktop Right
|
||||
id: light_3
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -126,7 +129,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
# - platform: cwww
|
||||
# name: "${name} Light Spare"
|
||||
# name: Light Spare
|
||||
# id: light_4
|
||||
# default_transition_length: 200ms
|
||||
# restore_mode: ALWAYS_ON
|
||||
|
||||
@@ -2,10 +2,13 @@ substitutions:
|
||||
device: lightening
|
||||
name: Lightening detector
|
||||
name_short: Lightening
|
||||
comment: "DEV"
|
||||
area: DEV
|
||||
comment: "${area} | Lightening"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
@@ -13,8 +16,8 @@ esp32:
|
||||
# board: m5stamp-pico
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.1
|
||||
platform_version: 6.9.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -39,7 +42,7 @@ as3935_i2c:
|
||||
|
||||
binary_sensor:
|
||||
# - platform: gpio
|
||||
# # name: ${name} Button
|
||||
# # name: Button
|
||||
# pin:
|
||||
# number: 39
|
||||
# inverted: true
|
||||
@@ -48,19 +51,18 @@ binary_sensor:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
# name: "${name} LED"
|
||||
# name: LED
|
||||
id: neo
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
sensor:
|
||||
- platform: as3935
|
||||
lightning_energy:
|
||||
name: Lightning Energy
|
||||
name: Energy
|
||||
distance:
|
||||
name: Storm Distance
|
||||
|
||||
|
||||
159
mcu-lvgl-eworkbench.yaml
Normal file
159
mcu-lvgl-eworkbench.yaml
Normal file
@@ -0,0 +1,159 @@
|
||||
substitutions:
|
||||
device: lvgl-eworkbench
|
||||
name: Electronics Workbench Display
|
||||
area: Office R
|
||||
comment: "${area} | Electronics Workbench"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
upload_speed: 921600
|
||||
build_unflags: -Werror=all
|
||||
board_build.flash_mode: dio
|
||||
board_build.f_flash: 80000000L
|
||||
board_build.f_cpu: 240000000L
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
||||
CONFIG_ESP32S3_DATA_CACHE_64KB: y
|
||||
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y
|
||||
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
|
||||
CONFIG_SPIRAM_RODATA: y
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
external_components:
|
||||
#- source: github://buglloc/esphome-components
|
||||
#- source: github://Garag/esphome-components
|
||||
- source: github://clowrey/esphome-components
|
||||
components: [axs15231]
|
||||
refresh: 10min
|
||||
|
||||
i2c:
|
||||
sda: 4
|
||||
scl: 8
|
||||
id: touchscreen_bus
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 40MHz
|
||||
|
||||
spi:
|
||||
id: display_qspi
|
||||
type: quad
|
||||
clk_pin: 47
|
||||
data_pins: [21, 48, 40, 39]
|
||||
|
||||
color:
|
||||
- id: my_red
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
- id: my_orange
|
||||
red: 100%
|
||||
green: 50%
|
||||
blue: 0%
|
||||
- id: my_yellow
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_green
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_blue
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 100%
|
||||
- id: my_teal
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
- id: my_gray
|
||||
red: 70%
|
||||
green: 70%
|
||||
blue: 70%
|
||||
- id: my_white
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_48
|
||||
size: 48
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_36
|
||||
size: 36
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_24
|
||||
size: 24
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_12
|
||||
size: 12
|
||||
- file: "gfonts://Roboto"
|
||||
id: font_std
|
||||
size: 40
|
||||
glyphs: "!\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/\\[]|&@#'"
|
||||
- file: "gfonts://Roboto@700"
|
||||
id: font_title
|
||||
size: 40
|
||||
glyphs: "!\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/\\[]|&@#'"
|
||||
|
||||
globals:
|
||||
- id: bgcolor
|
||||
type: Color
|
||||
initial_value: "Color::random_color()"
|
||||
|
||||
display:
|
||||
- platform: axs15231
|
||||
data_rate: 40MHz #20mhz is default
|
||||
#spi_mode: MODE2
|
||||
id: main_display
|
||||
spi_id: display_qspi
|
||||
dimensions:
|
||||
height: 480
|
||||
width: 320
|
||||
cs_pin: 45
|
||||
backlight_pin: 1
|
||||
brightness: 50
|
||||
transform:
|
||||
swap_xy: false
|
||||
rotation: 90
|
||||
auto_clear_enabled: false
|
||||
show_test_card: true
|
||||
lambda: |-
|
||||
it.fill(id(bgcolor));
|
||||
it.print(it.get_width()/2, it.get_height()/2-20, id(font_title), TextAlign::CENTER, "ESPHome");
|
||||
it.print(it.get_width()/2, it.get_height()/2+20, id(font_std), TextAlign::CENTER, "@UTBDK");
|
||||
|
||||
touchscreen:
|
||||
- platform: axs15231
|
||||
id: main_touch
|
||||
display: main_display
|
||||
i2c_id: touchscreen_bus
|
||||
transform:
|
||||
swap_xy: true
|
||||
on_touch:
|
||||
- lambda: |-
|
||||
Color newColor;
|
||||
do { newColor = Color::random_color(); } while (newColor == id(bgcolor));
|
||||
id(bgcolor) = newColor;
|
||||
|
||||
ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
|
||||
touch.x,
|
||||
touch.y,
|
||||
touch.x_raw,
|
||||
touch.y_raw
|
||||
);
|
||||
107
mcu-lvgl.yaml
107
mcu-lvgl.yaml
@@ -1,13 +1,17 @@
|
||||
substitutions:
|
||||
device: lvgl
|
||||
name: LVGL
|
||||
comment: "DEV"
|
||||
area: DEV
|
||||
comment: "${area} | LVGL"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
includes: ota.h
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
@@ -15,8 +19,8 @@ esp32:
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# Required to achieve sufficient PSRAM bandwidth
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
||||
@@ -31,13 +35,6 @@ psram:
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/clydebarrow/esphome
|
||||
ref: fd15094c0860df23d532881df36cfd16c7da1091 #previous commit - wont be needed in the future
|
||||
components: [ lvgl ]
|
||||
|
||||
# PINOUTS: ESP32 Cheap Yellow Display, 4.3", IPS, Capacitive
|
||||
## Display
|
||||
# R0 GND
|
||||
@@ -177,8 +174,8 @@ number:
|
||||
step: 1
|
||||
optimistic: True
|
||||
|
||||
debug:
|
||||
update_interval: 5s
|
||||
# debug:
|
||||
# update_interval: 5s
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
@@ -194,15 +191,15 @@ sensor:
|
||||
id: counting_number
|
||||
cycle: True
|
||||
- script.execute: update_display
|
||||
- platform: debug
|
||||
free:
|
||||
name: "${name} Heap Free"
|
||||
block:
|
||||
name: "${name} Heap Max Block"
|
||||
loop_time:
|
||||
name: "${name} Loop Time"
|
||||
psram:
|
||||
name: "${name} Free PSRAM"
|
||||
# - platform: debug
|
||||
# free:
|
||||
# name: "${name} Heap Free"
|
||||
# block:
|
||||
# name: "${name} Heap Max Block"
|
||||
# loop_time:
|
||||
# name: "${name} Loop Time"
|
||||
# psram:
|
||||
# name: "${name} Free PSRAM"
|
||||
- platform: uptime
|
||||
# name: Uptime Sensor
|
||||
internal: True
|
||||
@@ -231,9 +228,9 @@ sensor:
|
||||
script:
|
||||
- id: update_display
|
||||
then:
|
||||
- lvgl.indicator.line.update:
|
||||
id: power_meter_input
|
||||
value: !lambda return id(counting_number).state;
|
||||
# - lvgl.indicator.line.update:
|
||||
# id: power_meter_input
|
||||
# value: !lambda return id(counting_number).state;
|
||||
- lvgl.label.update:
|
||||
id: battery_kw
|
||||
text: !lambda |-
|
||||
@@ -257,15 +254,15 @@ script:
|
||||
static char buf[8];
|
||||
snprintf(buf, sizeof(buf), "%.1fkW", id(counting_number).state);
|
||||
return buf;
|
||||
- lvgl.img.update:
|
||||
id: img_solar_power
|
||||
src: solar_power_icon
|
||||
img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
#img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
- lvgl.indicator.line.update:
|
||||
id: power_meter_input2
|
||||
value: !lambda return id(counting_number).state;
|
||||
# - lvgl.img.update:
|
||||
# id: img_solar_power
|
||||
# src: solar_power_icon
|
||||
# img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
# #img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
# #bg_color: 0xFFFFFF
|
||||
# # - lvgl.indicator.line.update:
|
||||
# # id: power_meter_input2
|
||||
# # value: !lambda return id(counting_number).state;
|
||||
- lvgl.label.update:
|
||||
id: battery_kw2
|
||||
text: !lambda |-
|
||||
@@ -289,12 +286,12 @@ script:
|
||||
static char buf[8];
|
||||
snprintf(buf, sizeof(buf), "%.1fkW", id(counting_number).state);
|
||||
return buf;
|
||||
- lvgl.img.update:
|
||||
id: img_solar_power2
|
||||
src: solar_power_icon
|
||||
img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
#img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
# - lvgl.img.update:
|
||||
# id: img_solar_power2
|
||||
# src: solar_power_icon
|
||||
# img_recolor: 0xFFF000 #mixes this color with the base image
|
||||
# #img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
# #bg_color: 0xFFFFFF
|
||||
|
||||
image:
|
||||
- file: mdi:sun-wireless-outline
|
||||
@@ -305,10 +302,12 @@ image:
|
||||
# mdi:battery-arrow-down-outline
|
||||
id: solar_power_icon
|
||||
resize: 50x50
|
||||
type: BINARY
|
||||
|
||||
- file: mdi:battery-arrow-down-outline
|
||||
id: home_battery_icon
|
||||
resize: 30x30
|
||||
type: BINARY
|
||||
|
||||
lvgl:
|
||||
log_level: INFO
|
||||
@@ -378,8 +377,8 @@ lvgl:
|
||||
color: 0xFFFFFF
|
||||
r_mod: 12 #sets line length by this much difference from the scale default radius
|
||||
value: 50
|
||||
- img:
|
||||
id: power_meter_input_img
|
||||
# - image:
|
||||
# id: power_meter_input_img
|
||||
- arc:
|
||||
color: 0xFF3000
|
||||
r_mod: 10 #radius difference from the scale default radius
|
||||
@@ -443,12 +442,12 @@ lvgl:
|
||||
#bg_color: 0xFFFFFF
|
||||
#y: -35
|
||||
#x: -60
|
||||
- img:
|
||||
- image:
|
||||
src: solar_power_icon
|
||||
id: img_solar_power
|
||||
align: center
|
||||
img_recolor: 0xFFFF00
|
||||
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
image_recolor: 0xFFFF00
|
||||
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
y: 50
|
||||
#x: -60
|
||||
@@ -486,8 +485,8 @@ lvgl:
|
||||
color: 0xFFFFFF
|
||||
r_mod: 12 #sets line length by this much difference from the scale default radius
|
||||
value: 50
|
||||
- img:
|
||||
id: power_meter_input_img2
|
||||
# - image:
|
||||
# id: power_meter_input_img2
|
||||
- arc:
|
||||
color: 0xFF3000
|
||||
r_mod: 10 #radius difference from the scale default radius
|
||||
@@ -551,12 +550,12 @@ lvgl:
|
||||
#bg_color: 0xFFFFFF
|
||||
#y: -35
|
||||
#x: -60
|
||||
- img:
|
||||
- image:
|
||||
src: solar_power_icon
|
||||
id: img_solar_power2
|
||||
align: center
|
||||
img_recolor: 0xFFFF00
|
||||
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
image_recolor: 0xFFFF00
|
||||
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
y: 50
|
||||
#x: -60
|
||||
@@ -594,8 +593,8 @@ lvgl:
|
||||
color: 0xFFFFFF
|
||||
r_mod: 12 #sets line length by this much difference from the scale default radius
|
||||
value: 50
|
||||
- img:
|
||||
id: power_meter_input_img3
|
||||
# - image:
|
||||
# id: power_meter_input_img3
|
||||
- arc:
|
||||
color: 0xFF3000
|
||||
r_mod: 10 #radius difference from the scale default radius
|
||||
@@ -659,12 +658,12 @@ lvgl:
|
||||
#bg_color: 0xFFFFFF
|
||||
#y: -35
|
||||
#x: -60
|
||||
- img:
|
||||
- image:
|
||||
src: solar_power_icon
|
||||
id: img_solar_power3
|
||||
align: center
|
||||
img_recolor: 0xFFFF00
|
||||
img_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
image_recolor: 0xFFFF00
|
||||
image_recolor_opa: 100% #opacity defaults to 0% = must set this for recolor to take effect
|
||||
#bg_color: 0xFFFFFF
|
||||
y: 50
|
||||
#x: -60
|
||||
@@ -1,10 +1,12 @@
|
||||
substitutions:
|
||||
device: m5paper
|
||||
name: M5Paper
|
||||
comment: "DEV | m5paper"
|
||||
area: DEV
|
||||
comment: "${area} | M5Paper"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
|
||||
@@ -2,18 +2,20 @@ substitutions:
|
||||
device: mains-power
|
||||
name: Mains Power
|
||||
name_1: Mains
|
||||
comment: "Room: Mains Power Monitoring"
|
||||
area: Room
|
||||
comment: "${area} | Mains Power Monitoring"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -2,14 +2,23 @@ substitutions:
|
||||
device: nspanel-bedroom
|
||||
name: Bedroom NSPanel
|
||||
name_short: Bedroom
|
||||
comment: "Bedroom NSPanel"
|
||||
area: Bedroom
|
||||
comment: "${area} | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +31,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -174,7 +186,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -186,14 +198,13 @@ binary_sensor:
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
# on_click:
|
||||
# - switch.toggle: relay_2
|
||||
on_click:
|
||||
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
@@ -205,7 +216,7 @@ binary_sensor:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: ${name_short} Light
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
|
||||
@@ -225,7 +236,7 @@ output:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -257,7 +268,7 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 25°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "${name_short} Temperature"
|
||||
name: Temperature
|
||||
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
substitutions:
|
||||
device: nspanel-dev
|
||||
name: NSPanel DEV
|
||||
name_short: DevPanel
|
||||
comment: "DEV | NSPanel"
|
||||
area: DEV
|
||||
comment: "${area} | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
# on_boot:
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
- delay: 2s
|
||||
- lambda: 'id(nspanel_id).set_display_dim(5, 80);'
|
||||
|
||||
# priority: -100
|
||||
# then:
|
||||
# - wait_until:
|
||||
@@ -25,16 +34,25 @@ esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
# ref: dev
|
||||
# refresh: 0s
|
||||
# components: [nspanel_lovelace]
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
url: https://github.com/olicooper/esphome-nspanel-lovelace-native
|
||||
ref: dev
|
||||
refresh: 0s
|
||||
refresh: 3h
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -61,95 +79,97 @@ api:
|
||||
message: string
|
||||
song: string
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("notify~" + heading + "~" + message);'
|
||||
- lambda: 'id(nspanel_id).notify_on_screensaver(heading, message, 10000);'
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("notify~" + heading + "~" + message);'
|
||||
- rtttl.play:
|
||||
rtttl: !lambda 'return song;'
|
||||
- delay: 10s
|
||||
- lambda: 'id(nspanel_id).send_custom_command("notify~~");'
|
||||
# - delay: 10s
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("notify~~");'
|
||||
|
||||
- service: update_tft
|
||||
then:
|
||||
- lambda: |-
|
||||
id(nspanel_id).upload_tft("${tft_url}");
|
||||
# DISABLED until https://github.com/olicooper/esphome-nspanel-lovelace-native/issues/20 is fixed
|
||||
# - service: update_tft
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# id(nspanel_id).upload_tft("${tft_url}");
|
||||
|
||||
- service: upload_tft
|
||||
variables:
|
||||
url: string
|
||||
then:
|
||||
- lambda: |-
|
||||
id(nspanel_id).upload_tft(url);
|
||||
# - service: upload_tft
|
||||
# variables:
|
||||
# url: string
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# id(nspanel_id).upload_tft(url);
|
||||
|
||||
# Service to send a command directly to the display. Useful for testing
|
||||
- service: send_command
|
||||
variables:
|
||||
cmd: string
|
||||
then:
|
||||
- lambda: "id(nspanel_id).send_custom_command(cmd.c_str());"
|
||||
# # Service to send a command directly to the display. Useful for testing
|
||||
# - service: send_command
|
||||
# variables:
|
||||
# cmd: string
|
||||
# then:
|
||||
# - lambda: "id(nspanel_id).send_custom_command(cmd.c_str());"
|
||||
|
||||
# Service to pusblish to mqtt used for refreshin the panel
|
||||
- service: publish_to_recv_topic
|
||||
variables:
|
||||
cmd: string
|
||||
then:
|
||||
- mqtt.publish:
|
||||
topic: $panel_recv_topic
|
||||
payload: !lambda "return cmd;"
|
||||
# # Service to pusblish to mqtt used for refreshin the panel
|
||||
# - service: publish_to_recv_topic
|
||||
# variables:
|
||||
# cmd: string
|
||||
# then:
|
||||
# - mqtt.publish:
|
||||
# topic: $panel_recv_topic
|
||||
# payload: !lambda "return cmd;"
|
||||
|
||||
# Service to send a command wake the screen
|
||||
- service: wake
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("wake");'
|
||||
# # Service to send a command wake the screen
|
||||
# - service: wake
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("wake");'
|
||||
|
||||
# Service to send a command to show screensaver (some of the values are hardcoded)
|
||||
- service: show_screensaver
|
||||
then:
|
||||
- mqtt.publish:
|
||||
topic: $panel_recv_topic
|
||||
payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
# # Service to send a command to show screensaver (some of the values are hardcoded)
|
||||
# - service: show_screensaver
|
||||
# then:
|
||||
# - mqtt.publish:
|
||||
# topic: $panel_recv_topic
|
||||
# payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
|
||||
# Service to navigate to screen
|
||||
- service: navigate_to_page
|
||||
variables:
|
||||
page: string
|
||||
then:
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate." + page + ",button";
|
||||
# # Service to navigate to screen
|
||||
# - service: navigate_to_page
|
||||
# variables:
|
||||
# page: string
|
||||
# then:
|
||||
# - mqtt.publish_json:
|
||||
# topic: $panel_recv_topic
|
||||
# payload: |-
|
||||
# root["CustomRecv"] = "event,buttonPress2,navigate." + page + ",button";
|
||||
|
||||
# Service to send a command disable screensaver
|
||||
- service: disable_screensaver
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("timeout~0");'
|
||||
# # Service to send a command disable screensaver
|
||||
# - service: disable_screensaver
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("timeout~0");'
|
||||
|
||||
# Service to send a command enabled screensaver
|
||||
- service: enable_screensaver
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("timeout~20");'
|
||||
# # Service to send a command enabled screensaver
|
||||
# - service: enable_screensaver
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("timeout~20");'
|
||||
|
||||
# Service to send a command wake the screen
|
||||
- service: dim_0_to_100
|
||||
variables:
|
||||
intensity: string
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("dimmode~"+intensity+"~100");'
|
||||
# # Service to send a command wake the screen
|
||||
# - service: dim_0_to_100
|
||||
# variables:
|
||||
# intensity: string
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("dimmode~"+intensity+"~100");'
|
||||
|
||||
# Service to send a command To show the screen of a specific like
|
||||
- service: show_entity
|
||||
variables:
|
||||
entity: string
|
||||
title: string
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("pageType~popupLight~" + title + "~" + entity);'
|
||||
# # Service to send a command To show the screen of a specific like
|
||||
# - service: show_entity
|
||||
# variables:
|
||||
# entity: string
|
||||
# title: string
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("pageType~popupLight~" + title + "~" + entity);'
|
||||
|
||||
# Service to send a command To show the screen of a specific like
|
||||
- service: notify_on_screensaver
|
||||
variables:
|
||||
line1: string
|
||||
line2: string
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).send_custom_command("notify~" + line1 + "~" + line2);'
|
||||
# - rtttl.play: "short:d=4,o=5,b=100:16e6"
|
||||
# # Service to send a command To show the screen of a specific like
|
||||
# - service: notify_on_screensaver
|
||||
# variables:
|
||||
# line1: string
|
||||
# line2: string
|
||||
# then:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("notify~" + line1 + "~" + line2);'
|
||||
# # - rtttl.play: "short:d=4,o=5,b=100:16e6"
|
||||
|
||||
# Service to send a command To show the screen of a specific like
|
||||
# interaction of the buttons are on implemented yet
|
||||
@@ -159,14 +179,15 @@ api:
|
||||
description: string
|
||||
button1: string
|
||||
button2: string
|
||||
timeout: string
|
||||
timeout: int
|
||||
icon: string
|
||||
then:
|
||||
- lambda: 'id(nspanel_id).notify_on_screensaver(title, description, timeout);'
|
||||
# show notification screen
|
||||
- lambda: 'id(nspanel_id).send_custom_command("pageType~popupNotify");'
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("pageType~popupNotify");'
|
||||
# set values on notification screen
|
||||
# color defined as number created in binary and converted to decimal (rrrrggggbbbbaaaa)
|
||||
- lambda: 'id(nspanel_id).send_custom_command("entityUpdateDetail~id~"+ title + "~65535~" + button1 +"~3840~" + button2 + "~61440~" + description + "~65535~" + timeout + "~3~" + icon + "~65535~");'
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("entityUpdateDetail~id~"+ title + "~65535~" + button1 +"~3840~" + button2 + "~61440~" + description + "~65535~" + timeout + "~3~" + icon + "~65535~");'
|
||||
- rtttl.play: "scale_up:d=32,o=5,b=100:c,c#,d#,e,f#,g#,a#,b"
|
||||
|
||||
uart:
|
||||
@@ -175,17 +196,226 @@ uart:
|
||||
rx_pin: 17
|
||||
baud_rate: 115200
|
||||
|
||||
mqtt:
|
||||
id: mqtt_client
|
||||
broker: !secret mqtt_ip
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
discovery: false
|
||||
|
||||
nspanel_lovelace:
|
||||
id: nspanel_id
|
||||
mqtt_recv_topic: $panel_recv_topic
|
||||
mqtt_send_topic: $panel_send_topic
|
||||
sleep_timeout: 10
|
||||
locale:
|
||||
language: /config/esphome/nspanel/sk.json
|
||||
temperature_unit: celcius
|
||||
screensaver:
|
||||
time_id: ha_time
|
||||
time_format: '%H:%M~$name_day'
|
||||
date_format: '%A, %d. %b. %Y'
|
||||
weather:
|
||||
entity_id: sensor.weather_forecast_daily
|
||||
# type: screensaver2
|
||||
# statusIcon1:
|
||||
# entity: switch.office_r_light
|
||||
# icon:
|
||||
# "on": mdi:sofa
|
||||
# "off": mdi:sofa
|
||||
# color:
|
||||
# "on": [255, 255, 255]
|
||||
# "off": [255, 255, 255]
|
||||
# statusIcon2:
|
||||
# entity: light.office_r_desk_strip
|
||||
# icon:
|
||||
# "on": mdi:table-furniture
|
||||
# "off": mdi:table-furniture
|
||||
# color:
|
||||
# "on": [255, 255, 255]
|
||||
# "off": [255, 255, 255]
|
||||
# entities:
|
||||
# - entity: sensor.weather_forecast_daily
|
||||
# color: [255, 255, 255]
|
||||
# - entity: delete
|
||||
# - entity: delete
|
||||
# - entity: delete
|
||||
# - entity: sensor.weather_forecast_daily
|
||||
# color: [255, 255, 255]
|
||||
# type: 0
|
||||
# - entity: sensor.weather_forecast_daily
|
||||
# color: [255, 255, 255]
|
||||
# type: 1
|
||||
# - entity: sensor.weather_forecast_daily
|
||||
# color: [255, 255, 255]
|
||||
# type: 2
|
||||
# - entity: sensor.weather_forecast_daily
|
||||
# color: [255, 255, 255]
|
||||
# type: 3
|
||||
# - entity: delete
|
||||
# - entity: sensor.zigbee_office_r_temperature
|
||||
# color: [255, 255, 255]
|
||||
# name: ""
|
||||
# icon: mdi:home-thermometer
|
||||
# - entity: switch.heating_relay_3
|
||||
# icon:
|
||||
# "on": mdi:radiator
|
||||
# "off": "text:"
|
||||
# color:
|
||||
# "on": [255, 255, 255]
|
||||
# - entity: binary_sensor.heating_fireplace_fire
|
||||
# icon:
|
||||
# "on": mdi:fireplace
|
||||
# "off": "text:"
|
||||
# color:
|
||||
# "on": [255, 255, 255]
|
||||
# - entity: delete
|
||||
# - entity: delete
|
||||
# - entity: delete
|
||||
cards:
|
||||
- type: cardGrid
|
||||
title: Kuchyňa / Obývačka
|
||||
entities:
|
||||
- name: Kuchyňa
|
||||
entity_id: light.kitchen
|
||||
icon: ceiling-light
|
||||
- name: Stôl
|
||||
entity_id: light.dining_table
|
||||
icon: ceiling-light
|
||||
- name: Gauč
|
||||
entity_id: light.living_room
|
||||
icon: ceiling-light
|
||||
- name: TV
|
||||
entity_id: light.tv_light
|
||||
icon: led-strip-variant
|
||||
- name: (Stôl)
|
||||
entity_id: light.dining_table_ambilight
|
||||
icon: ceiling-light-multiple-outline
|
||||
- name: (Gauč)
|
||||
entity_id: light.living_room_ambilight
|
||||
icon: ceiling-light-multiple-outline
|
||||
- type: cardGrid
|
||||
title: Romanko
|
||||
entities:
|
||||
- name: Svetlo
|
||||
entity_id: switch.office_r_light
|
||||
icon: wall-sconce-flat
|
||||
- name: LED pásik
|
||||
entity_id: light.office_r_desk_strip
|
||||
icon: led-strip-variant
|
||||
- entity_id: delete
|
||||
- name: Monitor
|
||||
entity_id: light.office_r_display_lamp
|
||||
icon: monitor-star
|
||||
- name: (Monitor)
|
||||
entity_id: light.office_r_display_lamp_ambilight
|
||||
icon: monitor-star
|
||||
- name: Whitebox
|
||||
entity_id: switch.whitebox
|
||||
- type: cardGrid
|
||||
title: Von
|
||||
entities:
|
||||
- name: Terasa
|
||||
entity_id: light.patio_light
|
||||
icon: lightbulb-group
|
||||
- name: Terasa
|
||||
entity_id: switch.patio_relay
|
||||
icon: power-socket-fr
|
||||
- name: Vzadu
|
||||
entity_id: switch.outside_light_back
|
||||
icon: light-flood-down
|
||||
- name: Z. domček
|
||||
entity_id: switch.shed_light
|
||||
icon: wall-sconce-flat
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
- name: Z. domček
|
||||
entity_id: switch.shed_socket
|
||||
icon: power-socket-fr
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
- name: Záhrada
|
||||
entity_id: switch.garden_light
|
||||
icon: light-flood-down
|
||||
# state_template: '{{ is_state("binary_sensor.shed_status", "off") }}'
|
||||
- type: cardGrid
|
||||
title: Brána
|
||||
entities:
|
||||
- name: Otvoriť
|
||||
entity_id: button.gate_open
|
||||
icon: gate-open
|
||||
- name: Zatvoriť
|
||||
entity_id: button.gate_close
|
||||
icon: gate
|
||||
- name: Automatizácia
|
||||
entity_id: navigate.card_gate_automation
|
||||
- type: cardGrid
|
||||
title: Závlaha
|
||||
entities:
|
||||
- name: A1
|
||||
entity_id: switch.irrigation_valve_a1
|
||||
icon: valve
|
||||
- name: A2
|
||||
entity_id: switch.irrigation_valve_a2
|
||||
icon: valve
|
||||
- name: A3
|
||||
entity_id: switch.irrigation_valve_a3
|
||||
icon: valve
|
||||
- name: A4
|
||||
entity_id: switch.irrigation_valve_a4
|
||||
icon: valve
|
||||
- name: A5
|
||||
entity_id: switch.irrigation_valve_a5
|
||||
icon: valve
|
||||
- name: Automatizácia
|
||||
entity_id: navigate.card_irrigation_automation
|
||||
- type: cardThermo
|
||||
title: Kúrenie
|
||||
thermo_entity_id: climate.bt_trv_office_r
|
||||
# - type: cardQR
|
||||
# title: Guest Wifi
|
||||
# qr_text: "WIFI:T:WPA;S:LAB;P:slniecko;;"
|
||||
# # qrCode: "URL:https://www.johndoe.com/"
|
||||
# # entities:
|
||||
# # - entity_id: delete
|
||||
# # - entity_id: iText.LAB
|
||||
# # name: Name
|
||||
# # icon: wifi
|
||||
# # - entity_id: iText.slniecko
|
||||
# # name: Password
|
||||
# # icon: key
|
||||
- type: cardEntities
|
||||
title: Zwift
|
||||
entities:
|
||||
- name: Svetlo
|
||||
entity_id: light.basement_light
|
||||
icon: lightbulb-multiple
|
||||
- name: LED
|
||||
entity_id: light.exercise_room
|
||||
icon: led-strip-variant
|
||||
- name: Ventilátor
|
||||
entity_id: light.exercise_room_fan
|
||||
icon: fan
|
||||
- name: Automatizácia
|
||||
entity_id: navigate.card_exercise_automation
|
||||
- type: cardEntities
|
||||
title: Automatizácia
|
||||
id: card_exercise_automation
|
||||
hidden: true
|
||||
entities:
|
||||
- name: Start
|
||||
entity_id: automation.zwift_enable_fan
|
||||
- name: End
|
||||
entity_id: automation.zwift_disable_fan
|
||||
- type: cardEntities
|
||||
title: Automatizácia
|
||||
id: card_gate_automation
|
||||
hidden: true
|
||||
entities:
|
||||
- name: Auto-otváranie
|
||||
entity_id: switch.gate_auto_open
|
||||
- name: Auto-zatváranie
|
||||
entity_id: switch.gate_auto_close
|
||||
- type: cardEntities
|
||||
title: Automatizácia
|
||||
id: card_irrigation_automation
|
||||
hidden: true
|
||||
entities:
|
||||
- name: Ráno
|
||||
entity_id: automation.irrigation_morning
|
||||
- name: Terasa
|
||||
entity_id: automation.irrigation_patio
|
||||
- name: Rast trávy
|
||||
entity_id: automation.irrigation_grow_grass
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
@@ -194,7 +424,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -206,7 +436,7 @@ binary_sensor:
|
||||
# entity_id: switch.gate_open
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
@@ -225,37 +455,37 @@ output:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: ${name} Relay 1
|
||||
name: Relay 1
|
||||
id: relay_1
|
||||
pin:
|
||||
number: 22
|
||||
on_turn_on:
|
||||
# show a light on the panel when we swich on the light
|
||||
# - lambda: 'id(nspanel).send_custom_command("pageType~popupLight~[TITLE TO SHOW ON SCREEN]~[ENTITY NAME]");'
|
||||
- lambda: 'id(nspanel_id).send_custom_command("pageType~popupLight~Light 1~light.bed_light");'
|
||||
on_turn_off:
|
||||
# send to screensaver when switch off the light
|
||||
- mqtt.publish:
|
||||
topic: $panel_recv_topic
|
||||
payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
- lambda: 'id(nspanel_id).send_display_command("pageType~popupLight~Light 1~light.bed_light");'
|
||||
# on_turn_off:
|
||||
# # send to screensaver when switch off the light
|
||||
# - mqtt.publish:
|
||||
# topic: $panel_recv_topic
|
||||
# payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Relay 2
|
||||
name: Relay 2
|
||||
id: relay_2
|
||||
pin:
|
||||
number: 19
|
||||
on_turn_on:
|
||||
# show a light on the panel when we swich on the light
|
||||
- lambda: 'id(nspanel_id).send_custom_command("pageType~popupLight~Light 2~light.bed_light2");'
|
||||
on_turn_off:
|
||||
# send to screensaver when switch off the light
|
||||
- mqtt.publish:
|
||||
topic: $panel_recv_topic
|
||||
payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
- lambda: 'id(nspanel_id).send_display_command("pageType~popupLight~Light 2~light.bed_light2");'
|
||||
# on_turn_off:
|
||||
# # send to screensaver when switch off the light
|
||||
# - mqtt.publish:
|
||||
# topic: $panel_recv_topic
|
||||
# payload: '{"CustomRecv":"event,sleepReached,cardGrid"}'
|
||||
|
||||
# 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
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -287,11 +517,16 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 25°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "Living Room Temperature Entry"
|
||||
name: Living Room Temperature Entry
|
||||
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
text_sensor:
|
||||
- platform: homeassistant
|
||||
id: name_day
|
||||
entity_id: sensor.nameday_sk
|
||||
|
||||
# esp32_ble_tracker:
|
||||
# scan_parameters:
|
||||
# duration: 1min
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
substitutions:
|
||||
device: nspanel-fireplace
|
||||
name: Fireplace NSPanel
|
||||
name_short: Fireplace
|
||||
comment: "Fireplace NSPanel"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area}, Fireplace | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +29,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -174,7 +184,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -190,7 +200,7 @@ binary_sensor:
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
@@ -226,7 +236,7 @@ switch:
|
||||
number: 19
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -258,7 +268,7 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 25°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "Living Room Temperature Fireplace"
|
||||
name: "Living Room Temperature"
|
||||
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
@@ -1,15 +1,23 @@
|
||||
substitutions:
|
||||
device: nspanel-office-j
|
||||
name: Office J NSPanel
|
||||
name_short: Office J
|
||||
comment: "Office J NSPanel"
|
||||
area: Office J
|
||||
comment: "${area} | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +30,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -179,7 +190,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
# - platform: gpio
|
||||
# name: ${name} Left Button
|
||||
# name: Left Button
|
||||
# pin:
|
||||
# number: 14
|
||||
# inverted: true
|
||||
@@ -187,7 +198,7 @@ binary_sensor:
|
||||
# - switch.toggle: relay_1
|
||||
|
||||
# - platform: gpio
|
||||
# name: ${name} Right Button
|
||||
# name: Right Button
|
||||
# pin:
|
||||
# number: 27
|
||||
# inverted: true
|
||||
@@ -199,7 +210,7 @@ binary_sensor:
|
||||
# data:
|
||||
# entity_id: light.office_r_desk_strip
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -211,7 +222,7 @@ binary_sensor:
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
@@ -241,16 +252,16 @@ output:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: ${name_short} Light
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
# # - platform: binary
|
||||
# # name: ${name_full} Relay 2
|
||||
# # name: Relay 2
|
||||
# # output: relay_2
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -280,7 +291,7 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 22°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "${name_short} Temperature"
|
||||
name: Temperature
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
@@ -288,7 +299,7 @@ sensor:
|
||||
|
||||
# text_sensor:
|
||||
# - platform: ble_scanner
|
||||
# name: "${name_short} BLE Scanner"
|
||||
# name: BLE Scanner
|
||||
|
||||
# esp32_ble_beacon:
|
||||
# type: iBeacon
|
||||
|
||||
@@ -1,20 +1,30 @@
|
||||
substitutions:
|
||||
device: nspanel-office-r
|
||||
name: Office R NSPanel
|
||||
name_short: Office R
|
||||
comment: "Office R NSPanel"
|
||||
area: Office R
|
||||
comment: "${area} | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
wifi:
|
||||
use_address: 10.17.241.212
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -22,6 +32,12 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: github://pr#8325
|
||||
components: mqtt
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -166,6 +182,7 @@ mqtt:
|
||||
username: !secret mqtt_username
|
||||
password: !secret mqtt_password
|
||||
discovery: false
|
||||
idf_send_async: true
|
||||
|
||||
nspanel_lovelace:
|
||||
id: nspanel_id
|
||||
@@ -179,7 +196,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
# - platform: gpio
|
||||
# name: ${name} Left Button
|
||||
# name: Left Button
|
||||
# pin:
|
||||
# number: 14
|
||||
# inverted: true
|
||||
@@ -187,7 +204,7 @@ binary_sensor:
|
||||
# - switch.toggle: relay_1
|
||||
|
||||
# - platform: gpio
|
||||
# name: ${name} Right Button
|
||||
# name: Right Button
|
||||
# pin:
|
||||
# number: 27
|
||||
# inverted: true
|
||||
@@ -199,7 +216,7 @@ binary_sensor:
|
||||
# data:
|
||||
# entity_id: light.office_r_desk_strip
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -215,7 +232,7 @@ binary_sensor:
|
||||
# - lambda: 'id(nspanel_id).send_custom_command("event,buttonPress1,navigate.cardGrid_main,button");'
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
@@ -243,12 +260,12 @@ output:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name_short} Presence Light"
|
||||
name: Presence Light
|
||||
id: neo
|
||||
rgb_order: GRB
|
||||
pin: 23
|
||||
num_leds: 3
|
||||
rmt_channel: 0
|
||||
# rmt_channel: 0
|
||||
chipset: SK6812
|
||||
effects:
|
||||
- pulse:
|
||||
@@ -261,26 +278,26 @@ light:
|
||||
transition_length: 2s # defaults to 1s
|
||||
update_interval: 2s
|
||||
- platform: binary
|
||||
name: ${name_short} Light
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
# # - platform: binary
|
||||
# # name: ${name_full} Relay 2
|
||||
# # name: Relay 2
|
||||
# # output: relay_2
|
||||
|
||||
switch:
|
||||
# - platform: gpio
|
||||
# name: ${name_short} Light
|
||||
# name: Light
|
||||
# id: relay_1
|
||||
# pin:
|
||||
# number: 22
|
||||
- platform: gpio
|
||||
# name: ${name_full} Relay 2
|
||||
# name: Relay 2
|
||||
id: relay_2
|
||||
pin:
|
||||
number: 19
|
||||
- platform: gpio
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -310,7 +327,7 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 22°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "${name_short} Temperature"
|
||||
name: Temperature
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
@@ -318,7 +335,7 @@ sensor:
|
||||
|
||||
# text_sensor:
|
||||
# - platform: ble_scanner
|
||||
# name: "${name_short} BLE Scanner"
|
||||
# name: BLE Scanner
|
||||
|
||||
# esp32_ble_beacon:
|
||||
# type: iBeacon
|
||||
|
||||
@@ -1,15 +1,22 @@
|
||||
substitutions:
|
||||
device: nspanel-patio
|
||||
name: Patio NSPanel
|
||||
name_short: Patio
|
||||
comment: "Patio NSPanel"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area}, Patio | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
tft_url: !secret tft_url
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- switch.turn_off: screen_power
|
||||
- delay: 1s
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
@@ -22,6 +29,9 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
@@ -174,7 +184,7 @@ time:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: ${name} Left Button
|
||||
name: Left Button
|
||||
pin:
|
||||
number: 14
|
||||
inverted: true
|
||||
@@ -186,7 +196,7 @@ binary_sensor:
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Right Button
|
||||
name: Right Button
|
||||
pin:
|
||||
number: 27
|
||||
inverted: true
|
||||
@@ -198,7 +208,7 @@ binary_sensor:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.patio_light
|
||||
entity_id: light.patio_lights
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
@@ -220,7 +230,7 @@ switch:
|
||||
number: 22
|
||||
|
||||
- platform: gpio
|
||||
name: ${name_short} Light MAIN
|
||||
name: Light MAIN
|
||||
id: relay_2
|
||||
restore_mode: always_on
|
||||
entity_category: config
|
||||
@@ -228,7 +238,7 @@ switch:
|
||||
number: 19
|
||||
|
||||
- platform: gpio
|
||||
name: ${name} Screen Power
|
||||
name: Screen Power
|
||||
id: screen_power
|
||||
entity_category: config
|
||||
pin:
|
||||
@@ -260,7 +270,7 @@ sensor:
|
||||
b_constant: 3950
|
||||
reference_temperature: 25°C
|
||||
reference_resistance: 10kOhm
|
||||
name: "Living Room Temperature"
|
||||
name: Living Room Temperature
|
||||
|
||||
- platform: template
|
||||
id: room_temperature_id
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: office-r
|
||||
name: Office R
|
||||
comment: "MS Teams presence"
|
||||
area: Office R
|
||||
comment: "${area} | MS Teams presence"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
@@ -14,11 +17,9 @@ esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: esp32c3
|
||||
framework:
|
||||
# type: arduino
|
||||
# version: 2.0.14
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: patio
|
||||
name: Patio
|
||||
comment: "Outside, Patio: On the back yard"
|
||||
area: Outside
|
||||
comment: "${area}, Patio | On the back yard"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
# - priority: 600.0
|
||||
@@ -29,8 +32,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.1
|
||||
platform_version: 6.9.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -83,14 +86,14 @@ pca9685:
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
name: "${name} Status Button"
|
||||
name: Status Button
|
||||
filters:
|
||||
- invert:
|
||||
pin: 39
|
||||
|
||||
light:
|
||||
# - platform: esp32_rmt_led_strip
|
||||
# name: "${name} Status Light"
|
||||
# name: Status Light
|
||||
# id: neo
|
||||
# rgb_order: GRB
|
||||
# pin: 27
|
||||
@@ -99,7 +102,7 @@ light:
|
||||
# chipset: ws2812
|
||||
# restore_mode: ALWAYS_OFF
|
||||
- platform: cwww
|
||||
name: "${name} Light 1"
|
||||
name: Light 1
|
||||
id: light_1
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -108,7 +111,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
- platform: cwww
|
||||
name: "${name} Light 2"
|
||||
name: Light 2
|
||||
id: light_2
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -117,7 +120,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
- platform: cwww
|
||||
name: "${name} Light 3"
|
||||
name: Light 3
|
||||
id: light_3
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -126,7 +129,7 @@ light:
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
- platform: cwww
|
||||
name: "${name} Light 4"
|
||||
name: Light 4
|
||||
id: light_4
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
@@ -199,6 +202,6 @@ power_supply:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Relay"
|
||||
name: Relay
|
||||
id: relay_2
|
||||
pin: 19
|
||||
|
||||
205
mcu-pow-1.yaml
Normal file
205
mcu-pow-1.yaml
Normal file
@@ -0,0 +1,205 @@
|
||||
substitutions:
|
||||
device: pow-1
|
||||
name: POW 1
|
||||
comment: "DEV"
|
||||
update_interval: 10s
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
comment: ${comment}
|
||||
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state.
|
||||
priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(v_sensor).state > 10;'
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
else:
|
||||
- switch.turn_off: relay_1
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
interval:
|
||||
- interval: 30s
|
||||
then:
|
||||
if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- light.turn_on: wifi_status_led
|
||||
else:
|
||||
- light.turn_off: wifi_status_led
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
uart:
|
||||
rx_pin: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 0
|
||||
id: reset
|
||||
internal: true
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 10ms
|
||||
on_click:
|
||||
- max_length: 350ms # short press to toggle the relay
|
||||
then:
|
||||
switch.toggle: relay_1
|
||||
- min_length: 360ms # long press to cycle display info
|
||||
max_length: 3s
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: page
|
||||
then:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: OFF
|
||||
else:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: ON
|
||||
- platform: template # this is a fake sensor to tell the screen which info to show on display
|
||||
id: page
|
||||
publish_initial_state: true
|
||||
internal: true
|
||||
- platform: template
|
||||
name: Load
|
||||
id: load_on
|
||||
lambda: |-
|
||||
if (isnan(id(w_sensor).state)) {
|
||||
return {};
|
||||
} else if (id(w_sensor).state > 4) {
|
||||
// Running
|
||||
return true;
|
||||
} else {
|
||||
// Not running
|
||||
return false;
|
||||
}
|
||||
|
||||
display:
|
||||
platform: tm1621
|
||||
id: tm1621_display
|
||||
cs_pin: 25
|
||||
data_pin: 14
|
||||
read_pin: 26
|
||||
write_pin: 27
|
||||
lambda: |-
|
||||
if (id(page).state) {
|
||||
it.display_voltage(true);
|
||||
it.display_kwh(false);
|
||||
it.printf(0, "%.1f", id(v_sensor).state);
|
||||
it.printf(1, "%.1f", id(a_sensor).state);
|
||||
} else {
|
||||
it.display_voltage(false);
|
||||
it.display_kwh(true);
|
||||
it.printf(0, "%.1f", id(wh_sensor).state);
|
||||
it.printf(1, "%.1f", id(w_sensor).state);
|
||||
}
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: switch_led
|
||||
output: led
|
||||
internal: True
|
||||
- platform: status_led
|
||||
id: wifi_status_led
|
||||
internal: True
|
||||
pin:
|
||||
number: 5
|
||||
inverted: True
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: led
|
||||
pin:
|
||||
number: 18
|
||||
inverted: True
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
current:
|
||||
name: Current
|
||||
id: a_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
voltage:
|
||||
name: Voltage
|
||||
id: v_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
power:
|
||||
name: Power
|
||||
id: w_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
on_value_range:
|
||||
- above: 4.0
|
||||
then:
|
||||
- light.turn_on: switch_led
|
||||
- below: 3.0
|
||||
then:
|
||||
- light.turn_off: switch_led
|
||||
energy:
|
||||
name: Energy
|
||||
id: wh_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: Total Daily Energy
|
||||
power_id: w_sensor
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
|
||||
- platform: template
|
||||
name: Power Factor
|
||||
device_class: power_factor
|
||||
id: power_factor
|
||||
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: Relay
|
||||
optimistic: true
|
||||
id: relay_1
|
||||
turn_off_action:
|
||||
- switch.turn_on: relay_off
|
||||
turn_on_action:
|
||||
- switch.turn_on: relay_on
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_off
|
||||
pin: 4
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
- light.turn_off: switch_led
|
||||
interlock: [relay_on]
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_on
|
||||
pin: 2
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_on # bi-stable relay so no need to keep on
|
||||
- light.turn_on: switch_led
|
||||
interlock: [relay_off]
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
205
mcu-pow-2.yaml
Normal file
205
mcu-pow-2.yaml
Normal file
@@ -0,0 +1,205 @@
|
||||
substitutions:
|
||||
device: pow-2
|
||||
name: POW 2
|
||||
comment: "DEV"
|
||||
update_interval: 10s
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
comment: ${comment}
|
||||
on_boot: # Set the initial state of the template switch to the actual relay state. This will NOT change the state.
|
||||
priority: 250.0 # Wait until WiFi is connected to allow the sensor some time to settle
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(v_sensor).state > 10;'
|
||||
then:
|
||||
- switch.turn_on: relay_1
|
||||
else:
|
||||
- switch.turn_off: relay_1
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
interval:
|
||||
- interval: 30s
|
||||
then:
|
||||
if:
|
||||
condition:
|
||||
wifi.connected:
|
||||
then:
|
||||
- light.turn_on: wifi_status_led
|
||||
else:
|
||||
- light.turn_off: wifi_status_led
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
uart:
|
||||
rx_pin: 16
|
||||
baud_rate: 4800
|
||||
parity: EVEN
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: 0
|
||||
id: reset
|
||||
internal: true
|
||||
filters:
|
||||
- invert:
|
||||
- delayed_off: 10ms
|
||||
on_click:
|
||||
- max_length: 350ms # short press to toggle the relay
|
||||
then:
|
||||
switch.toggle: relay_1
|
||||
- min_length: 360ms # long press to cycle display info
|
||||
max_length: 3s
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
binary_sensor.is_on: page
|
||||
then:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: OFF
|
||||
else:
|
||||
binary_sensor.template.publish:
|
||||
id: page
|
||||
state: ON
|
||||
- platform: template # this is a fake sensor to tell the screen which info to show on display
|
||||
id: page
|
||||
publish_initial_state: true
|
||||
internal: true
|
||||
- platform: template
|
||||
name: Load
|
||||
id: load_on
|
||||
lambda: |-
|
||||
if (isnan(id(w_sensor).state)) {
|
||||
return {};
|
||||
} else if (id(w_sensor).state > 4) {
|
||||
// Running
|
||||
return true;
|
||||
} else {
|
||||
// Not running
|
||||
return false;
|
||||
}
|
||||
|
||||
display:
|
||||
platform: tm1621
|
||||
id: tm1621_display
|
||||
cs_pin: 25
|
||||
data_pin: 14
|
||||
read_pin: 26
|
||||
write_pin: 27
|
||||
lambda: |-
|
||||
if (id(page).state) {
|
||||
it.display_voltage(true);
|
||||
it.display_kwh(false);
|
||||
it.printf(0, "%.1f", id(v_sensor).state);
|
||||
it.printf(1, "%.1f", id(a_sensor).state);
|
||||
} else {
|
||||
it.display_voltage(false);
|
||||
it.display_kwh(true);
|
||||
it.printf(0, "%.1f", id(wh_sensor).state);
|
||||
it.printf(1, "%.1f", id(w_sensor).state);
|
||||
}
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
id: switch_led
|
||||
output: led
|
||||
internal: True
|
||||
- platform: status_led
|
||||
id: wifi_status_led
|
||||
internal: True
|
||||
pin:
|
||||
number: 5
|
||||
inverted: True
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: led
|
||||
pin:
|
||||
number: 18
|
||||
inverted: True
|
||||
|
||||
sensor:
|
||||
- platform: cse7766
|
||||
current:
|
||||
name: Current
|
||||
id: a_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
voltage:
|
||||
name: Voltage
|
||||
id: v_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
power:
|
||||
name: Power
|
||||
id: w_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
on_value_range:
|
||||
- above: 4.0
|
||||
then:
|
||||
- light.turn_on: switch_led
|
||||
- below: 3.0
|
||||
then:
|
||||
- light.turn_off: switch_led
|
||||
energy:
|
||||
name: Energy"
|
||||
id: wh_sensor
|
||||
filters:
|
||||
- throttle_average: ${update_interval}
|
||||
|
||||
- platform: total_daily_energy
|
||||
name: Total Daily Energy
|
||||
power_id: w_sensor
|
||||
filters:
|
||||
- multiply: 0.001
|
||||
unit_of_measurement: kWh
|
||||
|
||||
- platform: template
|
||||
name: Power Factor
|
||||
device_class: power_factor
|
||||
id: power_factor
|
||||
lambda: return id(w_sensor).state / id(v_sensor).state / id(a_sensor).state;
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: Relay
|
||||
optimistic: true
|
||||
id: relay_1
|
||||
turn_off_action:
|
||||
- switch.turn_on: relay_off
|
||||
turn_on_action:
|
||||
- switch.turn_on: relay_on
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_off
|
||||
pin: 4
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_off # bi-stable relay so no need to keep on
|
||||
- light.turn_off: switch_led
|
||||
interlock: [relay_on]
|
||||
- platform: gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
internal: true
|
||||
id: relay_on
|
||||
pin: 2
|
||||
on_turn_on:
|
||||
- delay: 500ms
|
||||
- switch.turn_off: relay_on # bi-stable relay so no need to keep on
|
||||
- light.turn_on: switch_led
|
||||
interlock: [relay_off]
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: ha_time
|
||||
timezone: Europe/Bratislava
|
||||
@@ -1,12 +1,16 @@
|
||||
substitutions:
|
||||
device: rf433
|
||||
name: RF433 Bridge
|
||||
comment: "Ground floor, Kitchen: RF433 Gateway"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area}, Fireplace | RF433 Gateway"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
|
||||
@@ -1,18 +1,21 @@
|
||||
substitutions:
|
||||
device: shed
|
||||
name: Shed
|
||||
comment: "Outside, Shed: Irrigation B"
|
||||
area: Outside
|
||||
comment: "${area}, Shed | Irrigation B"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -85,20 +88,20 @@ switch:
|
||||
mode: OUTPUT
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
name: "${name} Socket"
|
||||
name: Socket
|
||||
id: socket_relay
|
||||
pin:
|
||||
pca9554: pca9554_module
|
||||
number: 4
|
||||
mode: OUTPUT
|
||||
- platform: gpio
|
||||
name: "Garden Light"
|
||||
name: Garden Light
|
||||
id: garden_light_relay
|
||||
pin:
|
||||
number: 22
|
||||
mode: OUTPUT
|
||||
- platform: gpio
|
||||
name: "${name} Light"
|
||||
name: Light
|
||||
id: shed_light_relay
|
||||
pin:
|
||||
number: 19
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
substitutions:
|
||||
device: socket-01
|
||||
device_id: socket_01
|
||||
name: Socket 01
|
||||
area: Bedroom
|
||||
comment: "${area} | TV Socket"
|
||||
current_res: "0.00290"
|
||||
voltage_div: "940"
|
||||
comment: "First floor, Bedroom: TV"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
@@ -33,7 +36,7 @@ binary_sensor:
|
||||
number: GPIO13
|
||||
mode: INPUT_PULLUP
|
||||
inverted: yes
|
||||
name: "${name} Button"
|
||||
name: Button
|
||||
# filters:
|
||||
# invert:
|
||||
on_press:
|
||||
@@ -62,11 +65,11 @@ output:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "${name} Red LED"
|
||||
name: Red LED
|
||||
id: light_red
|
||||
output: led_red
|
||||
- platform: binary
|
||||
name: "${name} Blue LED"
|
||||
name: Blue LED
|
||||
id: light_blue
|
||||
output: led_blue
|
||||
|
||||
@@ -80,21 +83,21 @@ sensor:
|
||||
current_resistor: ${current_res}
|
||||
voltage_divider: ${voltage_div}
|
||||
current:
|
||||
name: "${name} Current"
|
||||
name: Current
|
||||
icon: mdi:flash-circle
|
||||
accuracy_decimals: 3
|
||||
voltage:
|
||||
name: "${name} Voltage"
|
||||
name: Voltage
|
||||
icon: mdi:current-ac
|
||||
power:
|
||||
name: "${name} Power"
|
||||
id: "${device_id}_power"
|
||||
name: Power
|
||||
id: power
|
||||
icon: mdi:flash-outline
|
||||
update_interval: 30s
|
||||
change_mode_every: 4
|
||||
- platform: total_daily_energy
|
||||
name: "${name} Total Daily Power"
|
||||
power_id: "${device_id}_power"
|
||||
name: Total Daily Power"
|
||||
power_id: power
|
||||
filters:
|
||||
# Multiplication factor from W to kW is 0.001
|
||||
- multiply: 0.001
|
||||
@@ -103,7 +106,7 @@ sensor:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Relay"
|
||||
name: Relay
|
||||
# icon: mdi:power-socket-eu
|
||||
pin: GPIO15
|
||||
id: relay
|
||||
|
||||
@@ -2,14 +2,18 @@ substitutions:
|
||||
device: socket-02
|
||||
device_id: socket_02
|
||||
name: Socket 02
|
||||
area: Bedroom
|
||||
comment: "${area} | Bug Repelent Socket"
|
||||
current_res: "0.00290"
|
||||
voltage_div: "940"
|
||||
comment: "First floor, Bedroom: Repelent"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
@@ -33,7 +37,7 @@ binary_sensor:
|
||||
number: GPIO13
|
||||
mode: INPUT_PULLUP
|
||||
inverted: yes
|
||||
name: "${name} Button"
|
||||
name: Button
|
||||
# filters:
|
||||
# invert:
|
||||
on_press:
|
||||
@@ -53,11 +57,11 @@ binary_sensor:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "${name} Red LED"
|
||||
name: Red LED
|
||||
id: light_red
|
||||
output: led_red
|
||||
- platform: binary
|
||||
name: "${name} Blue LED"
|
||||
name: Blue LED
|
||||
id: light_blue
|
||||
output: led_blue
|
||||
|
||||
@@ -81,21 +85,21 @@ sensor:
|
||||
current_resistor: ${current_res}
|
||||
voltage_divider: ${voltage_div}
|
||||
current:
|
||||
name: "${name} Current"
|
||||
name: Current
|
||||
icon: mdi:flash-circle
|
||||
accuracy_decimals: 3
|
||||
voltage:
|
||||
name: "${name} Voltage"
|
||||
name: Voltage
|
||||
icon: mdi:current-ac
|
||||
power:
|
||||
name: "${name} Power"
|
||||
id: "${device_id}_power"
|
||||
name: Power
|
||||
id: power
|
||||
icon: mdi:flash-outline
|
||||
update_interval: 30s
|
||||
change_mode_every: 4
|
||||
- platform: total_daily_energy
|
||||
name: "${name} Total Daily Power"
|
||||
power_id: "${device_id}_power"
|
||||
name: Total Daily Power
|
||||
power_id: power
|
||||
filters:
|
||||
# Multiplication factor from W to kW is 0.001
|
||||
- multiply: 0.001
|
||||
@@ -109,7 +113,7 @@ sensor:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Relay"
|
||||
name: Relay
|
||||
# icon: mdi:power-socket-eu
|
||||
pin: GPIO15
|
||||
id: relay
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
substitutions:
|
||||
device: socket-03
|
||||
device_id: socket_03
|
||||
name: Socket 03
|
||||
area: Bedroom
|
||||
comment: "${area} | SPARE Socket"
|
||||
max_power: "3450"
|
||||
# <2020
|
||||
current_res: "0.00290"
|
||||
@@ -11,12 +12,13 @@ substitutions:
|
||||
# current_res: "0.00117"
|
||||
# voltage_div: "755"
|
||||
# cf1_pin: GPIO04
|
||||
comment: "First floor, Room R: Socket"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
@@ -40,7 +42,7 @@ binary_sensor:
|
||||
number: GPIO13
|
||||
mode: INPUT_PULLUP
|
||||
inverted: yes
|
||||
name: "${name} Button"
|
||||
name: Button
|
||||
# filters:
|
||||
# invert:
|
||||
on_press:
|
||||
@@ -70,11 +72,11 @@ output:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "${name} Red LED"
|
||||
name: Red LED
|
||||
id: light_red
|
||||
output: led_red
|
||||
- platform: binary
|
||||
name: "${name} Blue LED"
|
||||
name: Blue LED
|
||||
id: light_blue
|
||||
output: led_blue
|
||||
|
||||
@@ -88,15 +90,15 @@ sensor:
|
||||
current_resistor: ${current_res}
|
||||
voltage_divider: ${voltage_div}
|
||||
current:
|
||||
name: "${name} Current"
|
||||
name: Current
|
||||
icon: mdi:flash-circle
|
||||
accuracy_decimals: 3
|
||||
voltage:
|
||||
name: "${name} Voltage"
|
||||
name: Voltage
|
||||
icon: mdi:current-ac
|
||||
power:
|
||||
name: "${name} Power"
|
||||
id: "${device_id}_power"
|
||||
name: Power
|
||||
id: power
|
||||
icon: mdi:flash-outline
|
||||
on_value_range:
|
||||
- above: ${max_power}
|
||||
@@ -110,14 +112,14 @@ sensor:
|
||||
data_template:
|
||||
message: Switch turned off because power exceeded ${max_power} W
|
||||
energy:
|
||||
name: "${name} Energy"
|
||||
name: Energy
|
||||
unit_of_measurement: "Wh"
|
||||
icon: mdi:flash-outline
|
||||
update_interval: 30s
|
||||
change_mode_every: 4
|
||||
- platform: total_daily_energy
|
||||
name: "${name} Total Daily Power"
|
||||
power_id: "${device_id}_power"
|
||||
name: Total Daily Power
|
||||
power_id: power
|
||||
accuracy_decimals: 5
|
||||
filters:
|
||||
# Multiplication factor from W to kW is 0.001
|
||||
@@ -127,7 +129,7 @@ sensor:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Relay"
|
||||
name: Relay
|
||||
# icon: mdi:power-socket-eu
|
||||
pin: GPIO15
|
||||
id: relay
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: staircase-light
|
||||
name: Staircase Light
|
||||
comment: "Staircase"
|
||||
name: Staircase
|
||||
area: Staircase
|
||||
comment: "${area} | Light"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp8266:
|
||||
@@ -42,7 +45,7 @@ binary_sensor:
|
||||
# - light.turn_off: light_blue
|
||||
- platform: homeassistant
|
||||
id: motion
|
||||
entity_id: binary_sensor.zigbee_staircase_pir_motion
|
||||
entity_id: binary_sensor.zigbee_staircase_pir_occupancy
|
||||
on_state:
|
||||
if:
|
||||
condition:
|
||||
@@ -61,7 +64,7 @@ output:
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "${name}"
|
||||
name: Light
|
||||
id: light_relay
|
||||
output: relay
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
22
mcu-tft.yaml
22
mcu-tft.yaml
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: tft
|
||||
name: TFT
|
||||
comment: "Desk TFT Display"
|
||||
area: DEV
|
||||
comment: "${area} | Desk TFT Display"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
@@ -15,18 +18,18 @@ esp32:
|
||||
variant: ESP32C3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/clydebarrow/esphome
|
||||
ref: fd15094c0860df23d532881df36cfd16c7da1091 #previous commit - wont be needed in the future
|
||||
components: [ lvgl ]
|
||||
# external_components:
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/clydebarrow/esphome
|
||||
# ref: fd15094c0860df23d532881df36cfd16c7da1091 #previous commit - wont be needed in the future
|
||||
# components: [ lvgl ]
|
||||
|
||||
logger:
|
||||
logs:
|
||||
@@ -110,6 +113,7 @@ display:
|
||||
cs_pin: 7
|
||||
dc_pin: 8
|
||||
reset_pin: 10
|
||||
invert_colors: false
|
||||
lambda: |-
|
||||
it.fill(Color::BLACK);
|
||||
it.print(0, 0, id(b612_12), id(my_white), TextAlign::TOP_LEFT, "HELLO WORLD!");
|
||||
|
||||
@@ -5,7 +5,7 @@ substitutions:
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: mcu-${device}
|
||||
friendly_name: ${device}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
# priority: -10
|
||||
@@ -88,8 +88,8 @@ esp32:
|
||||
# platform_version: 6.5.0
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
## TESTING
|
||||
|
||||
@@ -117,13 +117,13 @@ i2c:
|
||||
|
||||
modem:
|
||||
id: atmodem
|
||||
ready: modem_ready
|
||||
# ready: modem_ready
|
||||
rx_pin: 26
|
||||
tx_pin: 27
|
||||
model: SIM7600
|
||||
apn: o2internet
|
||||
username: ""
|
||||
password: ""
|
||||
# username: ""
|
||||
# password: ""
|
||||
pin_code: ""
|
||||
init_at:
|
||||
- AT+CGNSSMODE=15,1 # GNSS all navigation systems
|
||||
@@ -144,40 +144,40 @@ axp192:
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: modem_dtr
|
||||
# name: "${name} Cellular DTR"
|
||||
# name: Cellular DTR
|
||||
pin: 32
|
||||
- platform: gpio
|
||||
id: modem_ri
|
||||
# name: "${name} Cellular RI"
|
||||
# name: ellular RI
|
||||
pin: 33
|
||||
- platform: gpio
|
||||
id: modem_status
|
||||
# name: "${name} Cellular Status"
|
||||
# name: Cellular Status
|
||||
pin: 36
|
||||
- platform: template
|
||||
id: modem_ready
|
||||
# name: "${name} Cellular Ready"
|
||||
# name: Cellular Ready
|
||||
|
||||
sensor:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
id: modem_powerkey
|
||||
# name: "${name} Cellular PowerKey"
|
||||
# name: Cellular PowerKey
|
||||
pin: 4
|
||||
# inverted: true
|
||||
- platform: gpio
|
||||
id: led
|
||||
# name: "${name} LED"
|
||||
# name: LED
|
||||
pin: 12
|
||||
inverted: true
|
||||
- platform: gpio
|
||||
id: modem_enable
|
||||
# name: "${name} Cellular Enable"
|
||||
# name: Cellular Enable
|
||||
pin: 25
|
||||
- platform: axp192
|
||||
id: gnss_enable
|
||||
# name: "${name} GNSS Enable"
|
||||
# name: GNSS Enable
|
||||
port: LDO3
|
||||
|
||||
text_sensor:
|
||||
@@ -403,30 +403,30 @@ text_sensor:
|
||||
# binary_sensor:
|
||||
# - platform: sim7600
|
||||
# registered:
|
||||
# name: "${name} Cellular"
|
||||
# name: Cellular
|
||||
# - platform: gpio
|
||||
# id: modem_status
|
||||
# name: "${name} Cellular Status"
|
||||
# name: Cellular Status
|
||||
# pin: 36
|
||||
|
||||
# sensor:
|
||||
# - platform: sim7600
|
||||
# rssi:
|
||||
# name: "${name} Cellular RSSI"
|
||||
# name: Cellular RSSI
|
||||
|
||||
# switch:
|
||||
# - platform: gpio
|
||||
# id: modem_powerkey
|
||||
# # name: "${name} Modem Powerkey"
|
||||
# # name: Modem Powerkey
|
||||
# pin: 4
|
||||
# - platform: gpio
|
||||
# id: led
|
||||
# # name: "${name} LED"
|
||||
# # name: LED
|
||||
# pin: 12
|
||||
# inverted: true
|
||||
# - platform: gpio
|
||||
# id: modem_enable
|
||||
# # name: "${name} Modem Enable"
|
||||
# # name: Modem Enable
|
||||
# pin: 25
|
||||
# - platform: axp192
|
||||
# id: gnss_enable
|
||||
@@ -445,16 +445,16 @@ text_sensor:
|
||||
# text_sensor:
|
||||
# - platform: template
|
||||
# id: sms_sender
|
||||
# name: "${name} SMS Sender"
|
||||
# name: SMS Sender
|
||||
# - platform: template
|
||||
# id: sms_message
|
||||
# name: "${name} SMS Message"
|
||||
# name: SMS Message
|
||||
# - platform: template
|
||||
# id: caller_id_text_sensor
|
||||
# name: "${name} Caller ID"
|
||||
# name: Caller ID
|
||||
# - platform: template
|
||||
# id: ussd_message
|
||||
# name: "${name} USSD Code"
|
||||
# name: USSD Code
|
||||
# - platform: serial
|
||||
# uart_id: modem_uart
|
||||
# id: modem_read
|
||||
@@ -1,24 +1,21 @@
|
||||
substitutions:
|
||||
device: tv-light
|
||||
name: TV Light
|
||||
comment: "Ground floor, Living room: TV Rack Light"
|
||||
area: Living Room / Kitchen
|
||||
comment: "${area}: TV Rack Light"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp8285
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
|
||||
# Module type 18 Generic Module type
|
||||
# D2 GPIO4 51 IRRecv IR Remote (optional, view console for debugging!)
|
||||
# D1 GPIO5 38 PWM2 BLUE
|
||||
# D6 GPIO12 37 PWM1 RED
|
||||
# D7 GPIO13 39 PWM3 GREEN
|
||||
# D8 GPIO15 40 PWM4 WHITE
|
||||
|
||||
## H801 LED module
|
||||
# Function Pin Channel
|
||||
# R GPIO15 PWM1
|
||||
@@ -33,17 +30,8 @@ light:
|
||||
- platform: status_led
|
||||
id: status_led_id
|
||||
pin: 5
|
||||
# - platform: rgbww
|
||||
# name: "${name}"
|
||||
# red: pwm_red
|
||||
# green: pwm_green
|
||||
# blue: pwm_blue
|
||||
# cold_white: pwm_cold_white
|
||||
# warm_white: pwm_warm_white
|
||||
# cold_white_color_temperature: 6536 K
|
||||
# warm_white_color_temperature: 2000 K
|
||||
- platform: monochromatic
|
||||
name: "${name}"
|
||||
name: Strip
|
||||
output: pwm_cold_white
|
||||
effects:
|
||||
- flicker:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: vehicle-honda-pcx125
|
||||
name: Vehicle Honda PCX125
|
||||
comment: "BEACON | Honda PCX125"
|
||||
area: Outside
|
||||
comment: "${area}, Beacon | Honda PCX125"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_loop:
|
||||
then:
|
||||
@@ -35,11 +38,11 @@ esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
wifi:
|
||||
reboot_timeout: 0s
|
||||
# wifi:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -73,12 +76,11 @@ esp32_ble_beacon:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: vehicle-suzuki-dl650
|
||||
name: Vehicle Suzuki DL650
|
||||
comment: "BEACON | Suzuki DL650"
|
||||
area: Outside
|
||||
comment: "${area}, Beacon | Suzuki DL650"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_loop:
|
||||
then:
|
||||
@@ -35,11 +38,11 @@ esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
wifi:
|
||||
reboot_timeout: 0s
|
||||
# wifi:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
@@ -73,12 +76,11 @@ esp32_ble_beacon:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: vehicle-toyota-auris-ts
|
||||
name: Vehicle Toyota Auris TS
|
||||
comment: "BEACON | Toyota Auris TS"
|
||||
area: Outside
|
||||
comment: "${area}, Beacon | Toyota Auris TS"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_loop:
|
||||
then:
|
||||
@@ -34,24 +37,24 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.5.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
wifi: !include common/wifi.yaml
|
||||
# wifi: !include common/wifi.yaml
|
||||
logger: !include common/logger.yaml
|
||||
api: !include common/api.yaml
|
||||
ota: !include common/ota.yaml
|
||||
# api: !include common/api.yaml
|
||||
# ota: !include common/ota.yaml
|
||||
# common: !include common/common.yaml
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
wifi:
|
||||
reboot_timeout: 0s
|
||||
# wifi:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
# debug:
|
||||
|
||||
@@ -78,12 +81,11 @@ esp32_ble_beacon:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: vehicle-toyota-yaris-cross
|
||||
name: Vehicle Toyota Yaris Cross
|
||||
comment: "BEACON | Toyota Yaris Cross"
|
||||
area: Outside
|
||||
comment: "${area}, Beacon | Toyota Yaris Cross"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_loop:
|
||||
then:
|
||||
@@ -35,17 +38,18 @@ esp32:
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
api:
|
||||
reboot_timeout: 0s
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
wifi:
|
||||
reboot_timeout: 0s
|
||||
# wifi:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/logger.yaml
|
||||
# wifi: !include common/wifi.yaml
|
||||
# common: !include common/common.yaml
|
||||
|
||||
# debug:
|
||||
@@ -73,12 +77,11 @@ esp32_ble_beacon:
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: "${name} LED"
|
||||
name: LED
|
||||
id: led
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
effects:
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
substitutions:
|
||||
device: waterproof-socket
|
||||
name: Waterproof Socket
|
||||
comment: "Hardened remote controlled socket"
|
||||
area: Basement
|
||||
comment: "${area} | Hardened remote controlled socket"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platform: ESP8266
|
||||
|
||||
esp8266:
|
||||
board: esp01_1m
|
||||
|
||||
packages:
|
||||
@@ -25,7 +29,7 @@ binary_sensor:
|
||||
number: GPIO0
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
name: "${name} Button"
|
||||
name: Button
|
||||
on_press:
|
||||
- switch.toggle: relay
|
||||
|
||||
@@ -43,7 +47,7 @@ output:
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
name: "${name} Relay"
|
||||
name: Relay
|
||||
pin: GPIO12
|
||||
id: relay
|
||||
on_turn_on:
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
substitutions:
|
||||
device: well
|
||||
name: Well
|
||||
comment: "Outside, Well: Irrigation A"
|
||||
area: Outside
|
||||
comment: "${area}, Well | Irrigation A"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
# friendly_name: mcu-well
|
||||
# on_boot:
|
||||
@@ -24,8 +27,8 @@ esp32:
|
||||
board: m5stack-atom
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.1.2
|
||||
platform_version: 6.6.0
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
108
nspanel/sk.json
Normal file
108
nspanel/sk.json
Normal file
@@ -0,0 +1,108 @@
|
||||
{
|
||||
"none": "Žiady",
|
||||
"unknown": "Neznámy",
|
||||
"preset_mode": "Prednastavený režim",
|
||||
"swing_mode": "Režim oscilácie",
|
||||
"fan_mode": "Režim ventilátora",
|
||||
"activity": "Aktivita",
|
||||
"away": "Preč",
|
||||
"boost": "Boost",
|
||||
"comfort": "Komfort",
|
||||
"eco": "Eko",
|
||||
"home": "Domov",
|
||||
"sleep": "Spánok",
|
||||
"cool": "Chladenie",
|
||||
"cooling": "Chladí",
|
||||
"dry": "Sušenie",
|
||||
"drying": "Suší",
|
||||
"fan": "Ventilátor",
|
||||
"heat": "Kúrenie",
|
||||
"heating": "Kúri",
|
||||
"heat_cool": "Kúrenie/Chladenie",
|
||||
"idle": "V kľude",
|
||||
"auto": "Automatický",
|
||||
"fan_only": "Len ventilátor",
|
||||
"on": "Zapnuté",
|
||||
"off": "Vypnuté",
|
||||
"currently": "Aktuálne",
|
||||
"state": "Stav",
|
||||
"action": "Akcia",
|
||||
"lock": "Zamknúť",
|
||||
"unlock": "Odomknúť",
|
||||
"paused": "Pozastavené",
|
||||
"active": "Aktívne",
|
||||
"activate": "Aktivovať",
|
||||
"press": "Stlačiť",
|
||||
"run": "Spustiť",
|
||||
"speed": "Rýchlosť",
|
||||
"brightness": "Jas",
|
||||
"color": "Farba",
|
||||
"color_temp": "Teplota farby",
|
||||
"above_horizon": "Nad horizontom",
|
||||
"below_horizon": "Pod horizontom",
|
||||
"position": "Pozícia",
|
||||
"tilt_position": "Náklon",
|
||||
"start": "Štart",
|
||||
"pause": "Pauza",
|
||||
"cancel": "Zrušiť",
|
||||
"finish": "Dokončiť",
|
||||
"arm_home": "Arm (doma)",
|
||||
"arm_away": "Arm (mimo domov)",
|
||||
"arm_night": "Arm (noc)",
|
||||
"arm_vacation": "Arm (dovolenka)",
|
||||
"arm_custom_bypass": "Arm (bypass)",
|
||||
"disarm": "Vypnúť zabezpečenie",
|
||||
"disarming": "Vypínanie zabezpečenia",
|
||||
"disarmed": "Zabezpečenie vypnuté",
|
||||
"arming": "Zabezpečuje sa",
|
||||
"pending": "Čekanie",
|
||||
"triggered": "Poplach",
|
||||
"armed_away": "Zabezpečené (mimo domov)",
|
||||
"armed_home": "Zabezpečené (doma)",
|
||||
"armed_night": "Zabezpečené (noc)",
|
||||
"armed_vacation": "Zabezpečené (dovolenka)",
|
||||
"armed_custom_bypass": "Zabezpečené (bypass)",
|
||||
"not_home": "Mimo domov",
|
||||
"start_cleaning": "Začať upratovať",
|
||||
"return_to_base": "Späť na základňu",
|
||||
"docked": "Zaparkované",
|
||||
"turn_on": "Zapnúť",
|
||||
"turn_off": "Vypnúť",
|
||||
"month_january": "Január",
|
||||
"month_jan": "Jan",
|
||||
"month_february": "Február",
|
||||
"month_feb": "Feb",
|
||||
"month_march": "Marec",
|
||||
"month_mar": "Mar",
|
||||
"month_april": "Apríl",
|
||||
"month_apr": "Apr",
|
||||
"month_may": "Máj",
|
||||
"month_june": "Jún",
|
||||
"month_jun": "Jun",
|
||||
"month_july": "Júl",
|
||||
"month_jul": "Jul",
|
||||
"month_august": "August",
|
||||
"month_aug": "Aug",
|
||||
"month_september": "September",
|
||||
"month_sep": "Sep",
|
||||
"month_october": "Október",
|
||||
"month_oct": "Okt",
|
||||
"month_november": "November",
|
||||
"month_nov": "Nov",
|
||||
"month_december": "December",
|
||||
"month_dec": "Dec",
|
||||
"dow_sunday": "Nedela",
|
||||
"dow_sun": "Ne",
|
||||
"dow_monday": "Pondelok",
|
||||
"dow_mon": "Po",
|
||||
"dow_tuesday": "Utorok",
|
||||
"dow_tue": "Ut",
|
||||
"dow_wednesday": "Streda",
|
||||
"dow_wed": "St",
|
||||
"dow_thursday": "Štvrtok",
|
||||
"dow_thu": "Št",
|
||||
"dow_friday": "Piatok",
|
||||
"dow_fri": "Pi",
|
||||
"dow_saturday": "Sobota",
|
||||
"dow_sat": "So"
|
||||
}
|
||||
Reference in New Issue
Block a user