mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-10-14 08:35:12 +02:00
Compare commits
15
Commits
4bbf26fc87
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3374ed6ad8 | ||
|
|
e5f9c5813e | ||
|
|
2b66f1a60d | ||
|
|
05060756e3 | ||
|
|
7cc90187d1 | ||
|
|
26a09b37bc | ||
|
|
4c45ebdc4a | ||
|
|
2ad74b9d05 | ||
|
|
b1b57818df | ||
|
|
1a83052d90 | ||
|
|
8eae480253 | ||
|
|
5fdacb82df | ||
|
|
9eb5cd9155 | ||
|
|
b8f8649833 | ||
|
|
5fdea643a7 |
No files matched your search
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# ESP8266 core with LEAmDNS announcing the IPv6 addresses (AAAA, ff02::fb) from
|
||||||
|
# randybb/Arduino@mdns-ipv6-aaaa (esp8266/Arduino#9068); add next to common_esp8266.yaml.
|
||||||
|
# The device must not set 'toolchain: arduino' (no custom framework source there).
|
||||||
|
# Drop once it's upstream and in an ESPHome release.
|
||||||
|
esp8266:
|
||||||
|
toolchain: platformio
|
||||||
|
framework:
|
||||||
|
version: 3.1.2
|
||||||
|
source: https://github.com/randybb/Arduino.git#mdns-ipv6-aaaa
|
||||||
@@ -8,16 +8,15 @@ external_components:
|
|||||||
# network enable_ipv4 + audio HTTP reader over IPv6 (esphome/esphome#19750), drop once merged
|
# network enable_ipv4 + audio HTTP reader over IPv6 (esphome/esphome#19750), drop once merged
|
||||||
- source: github://pr#19750
|
- source: github://pr#19750
|
||||||
components: [const, network, wifi, ethernet, audio]
|
components: [const, network, wifi, ethernet, audio]
|
||||||
|
refresh: 1h
|
||||||
|
|
||||||
esp32:
|
esp32:
|
||||||
framework:
|
framework:
|
||||||
components:
|
components:
|
||||||
# mdns 1.12.0 + fix for "A 0.0.0.0" without IPv4 (espressif/esp-protocols#1156, merged)
|
# mdns 1.14.0: no "A 0.0.0.0" without IPv4 + IPv6 on ETH-only builds (espressif/esp-protocols#1156, #1161),
|
||||||
# + IPv6 on ETH-only builds (espressif/esp-protocols#1161, merged), drop once both are released
|
# drop once on ESPHome 2026.10.0 (esphome/esphome#20383 bumps the pin from 1.12.0)
|
||||||
- name: espressif/mdns
|
- name: espressif/mdns
|
||||||
source: https://github.com/randybb/esp-protocols.git
|
ref: 1.14.0
|
||||||
ref: mdns-v1.12.0-zero-ipv4-test
|
|
||||||
path: components/mdns
|
|
||||||
# IDF v5.5.5 lwip + .local resolution over IPv6 (espressif/esp-lwip#94), drop once in IDF
|
# IDF v5.5.5 lwip + .local resolution over IPv6 (espressif/esp-lwip#94), drop once in IDF
|
||||||
- name: lwip
|
- name: lwip
|
||||||
source: https://github.com/randybb/esp-lwip.git
|
source: https://github.com/randybb/esp-lwip.git
|
||||||
|
|||||||
@@ -9,3 +9,4 @@ wifi:
|
|||||||
enable_btm: true
|
enable_btm: true
|
||||||
enable_rrm: true
|
enable_rrm: true
|
||||||
min_auth_mode: WPA3
|
min_auth_mode: WPA3
|
||||||
|
power_save_mode: none
|
||||||
@@ -25,6 +25,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
status_led:
|
status_led:
|
||||||
pin:
|
pin:
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: aerator_auto
|
- id: aerator_auto
|
||||||
|
|||||||
+2
-2
@@ -148,10 +148,10 @@ media_player:
|
|||||||
buffer_size: 14000
|
buffer_size: 14000
|
||||||
media_pipeline:
|
media_pipeline:
|
||||||
speaker: media_spk_resampling_input
|
speaker: media_spk_resampling_input
|
||||||
format: NONE
|
format: WAV # no PSRAM: HA transcodes to WAV, decoding MP3/FLAC here runs the heap out
|
||||||
announcement_pipeline:
|
announcement_pipeline:
|
||||||
speaker: announcement_spk_resampling_input
|
speaker: announcement_spk_resampling_input
|
||||||
format: NONE
|
format: WAV # no PSRAM: HA transcodes to WAV, decoding MP3/FLAC here runs the heap out
|
||||||
|
|
||||||
rtttl:
|
rtttl:
|
||||||
id: my_rtttl
|
id: my_rtttl
|
||||||
|
|||||||
+8
-48
@@ -37,56 +37,26 @@ esp32:
|
|||||||
flash_chip: gd
|
flash_chip: gd
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
|
|
||||||
external_components:
|
|
||||||
# - source: github://pr#12717
|
|
||||||
# components: [ds248x]
|
|
||||||
# refresh: 1h
|
|
||||||
- source: github://pr#13534
|
|
||||||
components: [ds2482, ds2484, ds248x_base]
|
|
||||||
refresh: 1h
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common.yaml
|
common: !include common/common.yaml
|
||||||
ipv6_only: !include common/ipv6_only.yaml
|
ipv6_only: !include common/ipv6_only.yaml
|
||||||
status_led: !include common/status_led_atom.yaml
|
status_led: !include common/status_led_atom.yaml
|
||||||
|
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
# - id: i2c0
|
|
||||||
# sda: 26
|
|
||||||
# scl: 32
|
|
||||||
# scan: true #false
|
|
||||||
# - id: i2c1
|
|
||||||
sda: 25
|
sda: 25
|
||||||
scl: 21
|
scl: 21
|
||||||
scan: true #false
|
scan: true #false
|
||||||
|
|
||||||
# ds248x:
|
ds248x:
|
||||||
# # i2c_id: i2c_main
|
id: ds2484_module
|
||||||
# address: 0x18 # should be the default
|
type: ds2482-100
|
||||||
# # sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress
|
address: 0x18
|
||||||
# active_pullup: true # adds a active pullup which should improve signal integrity
|
active_pullup: true
|
||||||
# strong_pullup: false # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
|
|
||||||
# bus_sleep: true # power down the bus when no transaction is in progres
|
|
||||||
|
|
||||||
# one_wire:
|
|
||||||
# id: one_wire_bus
|
|
||||||
# platform: ds2484
|
|
||||||
# active_pullup: true
|
|
||||||
|
|
||||||
# ds248x:
|
|
||||||
# id: ds2484_module
|
|
||||||
# address: 0x18
|
|
||||||
|
|
||||||
# one_wire:
|
|
||||||
# - platform: ds248x
|
|
||||||
# ds248x_id: ds2484_module
|
|
||||||
# id: one_wire_bus
|
|
||||||
|
|
||||||
one_wire:
|
one_wire:
|
||||||
id: one_wire_bus
|
- platform: ds248x
|
||||||
platform: ds2482
|
ds248x_id: ds2484_module
|
||||||
active_pullup: true
|
id: one_wire_bus
|
||||||
|
|
||||||
pca9554:
|
pca9554:
|
||||||
- id: pca9554_module
|
- id: pca9554_module
|
||||||
@@ -133,16 +103,6 @@ sensor:
|
|||||||
# index: 0
|
# index: 0
|
||||||
name: Temperature
|
name: Temperature
|
||||||
id: 'heating_fireplace_temperature'
|
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
|
|
||||||
|
|
||||||
bluetooth_proxy:
|
bluetooth_proxy:
|
||||||
active: true
|
active: true
|
||||||
+9
-38
@@ -47,26 +47,11 @@ esp32:
|
|||||||
flash_chip: gd
|
flash_chip: gd
|
||||||
type: esp-idf
|
type: esp-idf
|
||||||
|
|
||||||
external_components:
|
|
||||||
# - source: github://pr#12717
|
|
||||||
# components: [ds248x]
|
|
||||||
# refresh: 1h
|
|
||||||
- source: github://pr#13534
|
|
||||||
components: [ds2482, ds2484, ds248x_base]
|
|
||||||
refresh: 1h
|
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common.yaml
|
common: !include common/common.yaml
|
||||||
ipv6_only: !include common/ipv6_only.yaml
|
ipv6_only: !include common/ipv6_only.yaml
|
||||||
status_led: !include common/status_led_atom.yaml
|
status_led: !include common/status_led_atom.yaml
|
||||||
|
|
||||||
#logger:
|
|
||||||
# level: VERBOSE
|
|
||||||
# logs:
|
|
||||||
# dallas.component: ERROR
|
|
||||||
# uart.component: ERROR
|
|
||||||
# i2c.component: VERBOSE
|
|
||||||
|
|
||||||
# Heating / Hot water Controller
|
# Heating / Hot water Controller
|
||||||
# temp_1: Solar Collector
|
# temp_1: Solar Collector
|
||||||
# temp_2: Cylinder Bottom (solar)
|
# temp_2: Cylinder Bottom (solar)
|
||||||
@@ -170,36 +155,22 @@ climate:
|
|||||||
default_target_temperature_high: 40 °C
|
default_target_temperature_high: 40 °C
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
# - id: i2c0
|
|
||||||
# sda: 26
|
|
||||||
# scl: 32
|
|
||||||
# scan: true #false
|
|
||||||
# - id: i2c1
|
|
||||||
sda: 25
|
sda: 25
|
||||||
scl: 21
|
scl: 21
|
||||||
scan: true #false
|
scan: true #false
|
||||||
|
|
||||||
# one_wire:
|
|
||||||
# id: one_wire_bus
|
|
||||||
# # i2c_id: i2c_main
|
|
||||||
# platform: ds2484
|
|
||||||
# active_pullup: true
|
|
||||||
|
|
||||||
# ds248x:
|
ds248x:
|
||||||
# id: ds2484_module
|
id: ds2482_module
|
||||||
# address: 0x18
|
type: ds2482-100
|
||||||
# active_pullup: true
|
address: 0x18
|
||||||
|
active_pullup: true
|
||||||
# one_wire:
|
|
||||||
# - platform: ds248x
|
|
||||||
# ds248x_id: ds2484_module
|
|
||||||
# id: one_wire_bus
|
|
||||||
|
|
||||||
one_wire:
|
one_wire:
|
||||||
id: one_wire_bus
|
- platform: ds248x
|
||||||
# i2c_id: i2c_main
|
ds248x_id: ds2482_module
|
||||||
platform: ds2482
|
id: one_wire_bus
|
||||||
active_pullup: true
|
|
||||||
|
|
||||||
modbus:
|
modbus:
|
||||||
uart_id: uart_modbus
|
uart_id: uart_modbus
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
remote_receiver:
|
remote_receiver:
|
||||||
pin: 4
|
pin: 4
|
||||||
|
|||||||
@@ -0,0 +1,285 @@
|
|||||||
|
---
|
||||||
|
# Hardware: M5Stack M5Stamp S3 + PN5180 module (5 V and 3.3 V both needed)
|
||||||
|
# Pinout:
|
||||||
|
# GPIO0 Button
|
||||||
|
# GPIO3 (external RFID LED, not fitted yet; notify_led uses the onboard RGB for now)
|
||||||
|
# GPIO4 Buzzer -> buzzer (output ledc)
|
||||||
|
# GPIO5 -> spi (spi miso_pin) PN5180 MISO
|
||||||
|
# GPIO6 -> spi (spi mosi_pin) PN5180 MOSI
|
||||||
|
# GPIO7 -> spi (spi clk_pin) PN5180 SCK
|
||||||
|
# GPIO8 -> pn5180 (cs_pin) PN5180 NSS
|
||||||
|
# GPIO9 -> pn5180 (busy_pin) PN5180 BUSY
|
||||||
|
# GPIO10 -> pn5180 (reset_pin) PN5180 RST
|
||||||
|
# GPIO11 -> pn5180 (irq_pin) PN5180 IRQ
|
||||||
|
# GPIO19 U-
|
||||||
|
# GPIO20 U+
|
||||||
|
# GPIO21 RGB -> notify_led (light esp32_rmt_led_strip), also status_led
|
||||||
|
# PN5180 REQ, AUX, GPIO left open (REQ high at reset = firmware download mode)
|
||||||
|
substitutions:
|
||||||
|
device: rfid-openprinttag
|
||||||
|
name: OpenPrintTag
|
||||||
|
area: DEV
|
||||||
|
comment: Filament spool reader (OpenPrintTag, Creality CFS)
|
||||||
|
|
||||||
|
esphome:
|
||||||
|
name: mcu-${device}
|
||||||
|
friendly_name: ${name}
|
||||||
|
area: ${area}
|
||||||
|
comment: ${comment}
|
||||||
|
|
||||||
|
esp32:
|
||||||
|
variant: esp32s3
|
||||||
|
toolchain: esp-idf
|
||||||
|
framework:
|
||||||
|
advanced:
|
||||||
|
flash_chip: gd
|
||||||
|
type: esp-idf
|
||||||
|
|
||||||
|
packages:
|
||||||
|
common: !include common/common.yaml
|
||||||
|
ipv6_only: !include common/ipv6_only.yaml
|
||||||
|
status_led: !include
|
||||||
|
file: common/status_led.yaml
|
||||||
|
vars:
|
||||||
|
light_id: notify_led
|
||||||
|
show_errors: "true"
|
||||||
|
|
||||||
|
external_components:
|
||||||
|
- source: github://randybb/esphome-components
|
||||||
|
components: [pn5180, openprinttag, creality_cfs]
|
||||||
|
refresh: 1h
|
||||||
|
|
||||||
|
# Called by the OpenPrintTag integration (openprinttag.update) to update the aux region
|
||||||
|
api:
|
||||||
|
actions:
|
||||||
|
- action: openprinttag_write_aux
|
||||||
|
variables:
|
||||||
|
uid: string
|
||||||
|
aux: string
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: led_enabled
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: notify_led
|
||||||
|
brightness: 100%
|
||||||
|
red: 100%
|
||||||
|
green: 0%
|
||||||
|
blue: 0%
|
||||||
|
flash_length: 500ms
|
||||||
|
- lambda: id(spool).write_aux(uid, aux);
|
||||||
|
# Writes a Creality CFS record (48 characters, optionally 48 more for sector 2) to the
|
||||||
|
# Creality tag on the reader
|
||||||
|
- action: creality_cfs_write
|
||||||
|
variables:
|
||||||
|
uid: string
|
||||||
|
data: string
|
||||||
|
then:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: led_enabled
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: notify_led
|
||||||
|
brightness: 100%
|
||||||
|
red: 100%
|
||||||
|
green: 0%
|
||||||
|
blue: 0%
|
||||||
|
flash_length: 500ms
|
||||||
|
- lambda: id(creality).write(uid, data);
|
||||||
|
|
||||||
|
spi:
|
||||||
|
clk_pin: GPIO7
|
||||||
|
mosi_pin: GPIO6
|
||||||
|
miso_pin: GPIO5
|
||||||
|
|
||||||
|
pn5180:
|
||||||
|
id: pn5180_reader
|
||||||
|
cs_pin: GPIO8
|
||||||
|
busy_pin: GPIO9
|
||||||
|
reset_pin: GPIO10
|
||||||
|
irq_pin: GPIO11
|
||||||
|
on_tag:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: led_enabled
|
||||||
|
then:
|
||||||
|
- light.turn_on:
|
||||||
|
id: notify_led
|
||||||
|
brightness: 100%
|
||||||
|
red: 0%
|
||||||
|
green: 100%
|
||||||
|
blue: 0%
|
||||||
|
flash_length: 500ms
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: buzzer_enabled
|
||||||
|
then:
|
||||||
|
- rtttl.play: "success:d=32,o=5,b=100:c,g,b"
|
||||||
|
- homeassistant.tag_scanned: !lambda return x;
|
||||||
|
on_tag_removed:
|
||||||
|
- if:
|
||||||
|
condition:
|
||||||
|
switch.is_on: buzzer_enabled
|
||||||
|
then:
|
||||||
|
- rtttl.play: "removed:d=16,o=5,b=100:b"
|
||||||
|
|
||||||
|
openprinttag:
|
||||||
|
id: spool
|
||||||
|
# Raw tag record for the OpenPrintTag integration (randybb/ha-openprinttag), empty when removed
|
||||||
|
on_openprinttag:
|
||||||
|
- homeassistant.event:
|
||||||
|
event: esphome.openprinttag
|
||||||
|
data:
|
||||||
|
uid: !lambda return uid;
|
||||||
|
payload: !lambda return payload;
|
||||||
|
|
||||||
|
creality_cfs:
|
||||||
|
id: creality
|
||||||
|
# The Creality record (ASCII) for Home Assistant, empty when removed
|
||||||
|
on_creality:
|
||||||
|
- homeassistant.event:
|
||||||
|
event: esphome.creality_cfs
|
||||||
|
data:
|
||||||
|
uid: !lambda return uid;
|
||||||
|
data: !lambda return data;
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: creality_cfs
|
||||||
|
name: Creality length
|
||||||
|
- platform: openprinttag
|
||||||
|
type: remaining_weight
|
||||||
|
name: Remaining weight
|
||||||
|
- platform: openprinttag
|
||||||
|
type: consumed_weight
|
||||||
|
name: Consumed weight
|
||||||
|
- platform: openprinttag
|
||||||
|
type: actual_weight
|
||||||
|
name: Full weight
|
||||||
|
- platform: openprinttag
|
||||||
|
type: min_print_temperature
|
||||||
|
name: Min print temperature
|
||||||
|
- platform: openprinttag
|
||||||
|
type: max_print_temperature
|
||||||
|
name: Max print temperature
|
||||||
|
- platform: openprinttag
|
||||||
|
type: max_bed_temperature
|
||||||
|
name: Max bed temperature
|
||||||
|
- platform: openprinttag
|
||||||
|
type: drying_temperature
|
||||||
|
name: Drying temperature
|
||||||
|
- platform: openprinttag
|
||||||
|
type: drying_time
|
||||||
|
name: Drying time
|
||||||
|
|
||||||
|
text_sensor:
|
||||||
|
- platform: pn5180
|
||||||
|
name: Tag UID
|
||||||
|
- platform: creality_cfs
|
||||||
|
type: material_id
|
||||||
|
name: Creality material ID
|
||||||
|
- platform: creality_cfs
|
||||||
|
type: color
|
||||||
|
name: Creality color
|
||||||
|
id: creality_color
|
||||||
|
on_value:
|
||||||
|
- script.execute: show_filament_color
|
||||||
|
- platform: creality_cfs
|
||||||
|
type: serial
|
||||||
|
name: Creality serial
|
||||||
|
- platform: openprinttag
|
||||||
|
type: material_type
|
||||||
|
name: Material
|
||||||
|
- platform: openprinttag
|
||||||
|
type: material_name
|
||||||
|
name: Material name
|
||||||
|
- platform: openprinttag
|
||||||
|
type: brand_name
|
||||||
|
name: Brand
|
||||||
|
- platform: openprinttag
|
||||||
|
type: primary_color
|
||||||
|
name: Color
|
||||||
|
id: openprinttag_color
|
||||||
|
on_value:
|
||||||
|
- script.execute: show_filament_color
|
||||||
|
|
||||||
|
script:
|
||||||
|
# The filament color on the filament_color light: the OpenPrintTag's, else the Creality tag's
|
||||||
|
- id: show_filament_color
|
||||||
|
then:
|
||||||
|
- lambda: |-
|
||||||
|
std::string x = id(openprinttag_color).state;
|
||||||
|
if (x.size() < 7)
|
||||||
|
x = id(creality_color).state;
|
||||||
|
if (x.size() < 7) {
|
||||||
|
id(filament_color).turn_off().set_transition_length(0).perform();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
uint32_t c = strtoul(x.c_str() + 1, nullptr, 16);
|
||||||
|
if (x.size() > 7)
|
||||||
|
c >>= 8; // #rrggbbaa
|
||||||
|
// ESPHome scales the strongest channel to 100 %, the darkness goes to the brightness
|
||||||
|
const float r = ((c >> 16) & 0xFF) / 255.0f, g = ((c >> 8) & 0xFF) / 255.0f, b = (c & 0xFF) / 255.0f;
|
||||||
|
const float m = std::max({r, g, b});
|
||||||
|
if (m == 0.0f) {
|
||||||
|
id(filament_color).turn_off().set_transition_length(0).perform(); // black
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
id(filament_color).turn_on()
|
||||||
|
.set_rgb(r, g, b)
|
||||||
|
.set_brightness(m)
|
||||||
|
.set_transition_length(0)
|
||||||
|
.perform();
|
||||||
|
|
||||||
|
light:
|
||||||
|
# Onboard RGB for now: tag feedback and status. With the external LED fitted, move
|
||||||
|
# notify_led to pin 3 and give the onboard one back to status_led (as on mcu-rfid-reader)
|
||||||
|
- platform: esp32_rmt_led_strip
|
||||||
|
id: notify_led
|
||||||
|
name: Notify LED
|
||||||
|
channel_colors: GRB
|
||||||
|
pin: 21
|
||||||
|
num_leds: 1
|
||||||
|
chipset: ws2812
|
||||||
|
restore_mode: ALWAYS_OFF
|
||||||
|
rmt_symbols: 96
|
||||||
|
|
||||||
|
# Shows the filament color in Home Assistant; drives nothing, the next tag read overwrites it
|
||||||
|
- platform: rgb
|
||||||
|
id: filament_color
|
||||||
|
name: Filament color
|
||||||
|
icon: mdi:printer-3d-nozzle
|
||||||
|
red: color_none
|
||||||
|
green: color_none
|
||||||
|
blue: color_none
|
||||||
|
restore_mode: ALWAYS_OFF
|
||||||
|
default_transition_length: 0s
|
||||||
|
|
||||||
|
output:
|
||||||
|
- platform: ledc
|
||||||
|
pin: 4
|
||||||
|
id: buzzer
|
||||||
|
- platform: template
|
||||||
|
id: color_none
|
||||||
|
type: float
|
||||||
|
write_action: []
|
||||||
|
|
||||||
|
rtttl:
|
||||||
|
output: buzzer
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: template
|
||||||
|
name: Buzzer Enabled
|
||||||
|
id: buzzer_enabled
|
||||||
|
icon: mdi:volume-high
|
||||||
|
optimistic: true
|
||||||
|
restore_mode: RESTORE_DEFAULT_ON
|
||||||
|
entity_category: config
|
||||||
|
- platform: template
|
||||||
|
name: LED enabled
|
||||||
|
id: led_enabled
|
||||||
|
icon: mdi:alarm-light-outline
|
||||||
|
optimistic: true
|
||||||
|
restore_mode: RESTORE_DEFAULT_ON
|
||||||
|
entity_category: config
|
||||||
+11
-11
@@ -28,7 +28,7 @@ esphome:
|
|||||||
# - wait_until:
|
# - wait_until:
|
||||||
# api.connected:
|
# api.connected:
|
||||||
# - logger.log: API is connected!
|
# - logger.log: API is connected!
|
||||||
# - rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
# - rtttl.play: "success:d=32,o=5,b=100:c,g,b"
|
||||||
# - light.turn_on:
|
# - light.turn_on:
|
||||||
# id: notify_led
|
# id: notify_led
|
||||||
# brightness: 100%
|
# brightness: 100%
|
||||||
@@ -91,13 +91,13 @@ api:
|
|||||||
uri += tag_id;
|
uri += tag_id;
|
||||||
message->add_uri_record(uri);
|
message->add_uri_record(uri);
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
- action: write_music_tag
|
- action: write_music_tag
|
||||||
variables:
|
variables:
|
||||||
@@ -123,13 +123,13 @@ api:
|
|||||||
message->add_text_record(text);
|
message->add_text_record(text);
|
||||||
}
|
}
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
globals:
|
globals:
|
||||||
- id: source
|
- id: source
|
||||||
@@ -271,7 +271,7 @@ pn532_i2c:
|
|||||||
condition:
|
condition:
|
||||||
switch.is_on: buzzer_enabled
|
switch.is_on: buzzer_enabled
|
||||||
then:
|
then:
|
||||||
- rtttl.play: "success:d=24,o=5,b=100:c,g,b"
|
- rtttl.play: "success:d=32,o=5,b=100:c,g,b"
|
||||||
on_tag_removed:
|
on_tag_removed:
|
||||||
then:
|
then:
|
||||||
- homeassistant.event:
|
- homeassistant.event:
|
||||||
@@ -313,13 +313,13 @@ button:
|
|||||||
message->add_uri_record(uri);
|
message->add_uri_record(uri);
|
||||||
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
|
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
|
||||||
id(pn532_module).write_mode(message);
|
id(pn532_module).write_mode(message);
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: Clean Tag
|
name: Clean Tag
|
||||||
id: clean_tag
|
id: clean_tag
|
||||||
@@ -333,13 +333,13 @@ button:
|
|||||||
green: 64.7%
|
green: 64.7%
|
||||||
blue: 0%
|
blue: 0%
|
||||||
- lambda: 'id(pn532_module).clean_mode();'
|
- lambda: 'id(pn532_module).clean_mode();'
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b"
|
- rtttl.play: "write:d=32,o=5,b=100:b"
|
||||||
- wait_until:
|
- wait_until:
|
||||||
not:
|
not:
|
||||||
pn532.is_writing:
|
pn532.is_writing:
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
- platform: template
|
- platform: template
|
||||||
name: Cancel writing
|
name: Cancel writing
|
||||||
id: cancel_writing
|
id: cancel_writing
|
||||||
@@ -349,7 +349,7 @@ button:
|
|||||||
- lambda: 'id(pn532_module).read_mode();'
|
- lambda: 'id(pn532_module).read_mode();'
|
||||||
- light.turn_off:
|
- light.turn_off:
|
||||||
id: notify_led
|
id: notify_led
|
||||||
- rtttl.play: "write:d=24,o=5,b=100:b,b"
|
- rtttl.play: "write:d=32,o=5,b=100:b,b"
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: esp32_rmt_led_strip
|
- platform: esp32_rmt_led_strip
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
|||||||
@@ -30,11 +30,13 @@ esphome:
|
|||||||
friendly_name: ${name}
|
friendly_name: ${name}
|
||||||
area: ${area}
|
area: ${area}
|
||||||
comment: ${comment}
|
comment: ${comment}
|
||||||
|
|
||||||
esp8266:
|
esp8266:
|
||||||
board: esp01_1m
|
board: esp01_1m
|
||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
|||||||
@@ -63,6 +63,7 @@ esphome:
|
|||||||
esp32:
|
esp32:
|
||||||
variant: esp32s3
|
variant: esp32s3
|
||||||
flash_size: 16MB
|
flash_size: 16MB
|
||||||
|
flash_frequency: 40MHz # the IDF 5.5.5 bootloader reads garbage from this flash (mfr 0x46) at 80MHz
|
||||||
toolchain: esp-idf
|
toolchain: esp-idf
|
||||||
framework:
|
framework:
|
||||||
advanced:
|
advanced:
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
# wifi:
|
# wifi:
|
||||||
# use_address: mcu-mini-04.local
|
# use_address: mcu-mini-04.local
|
||||||
@@ -53,8 +54,18 @@ binary_sensor:
|
|||||||
entity_id: binary_sensor.zigbee_staircase_pir_occupancy
|
entity_id: binary_sensor.zigbee_staircase_pir_occupancy
|
||||||
on_state:
|
on_state:
|
||||||
if:
|
if:
|
||||||
condition:
|
condition: &no_motion
|
||||||
binary_sensor.is_off: motion
|
and:
|
||||||
|
- binary_sensor.is_off: motion
|
||||||
|
- binary_sensor.is_off: motion_2
|
||||||
|
then:
|
||||||
|
- light.turn_off: light_relay
|
||||||
|
- platform: homeassistant
|
||||||
|
id: motion_2
|
||||||
|
entity_id: binary_sensor.zigbee_staircase_2_pir_occupancy
|
||||||
|
on_state:
|
||||||
|
if:
|
||||||
|
condition: *no_motion
|
||||||
then:
|
then:
|
||||||
- light.turn_off: light_relay
|
- light.turn_off: light_relay
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
light:
|
light:
|
||||||
- platform: status_led
|
- platform: status_led
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ esp8266:
|
|||||||
|
|
||||||
packages:
|
packages:
|
||||||
common: !include common/common_esp8266.yaml
|
common: !include common/common_esp8266.yaml
|
||||||
|
mdns_ipv6: !include common/esp8266_mdns_ipv6.yaml
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
|||||||
Reference in new issue
Block a user