initial commit esphome

This commit is contained in:
2023-02-22 00:11:45 +01:00
commit 4c9bf4499f
40 changed files with 3507 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
<<<<<<< HEAD
homeassistant repository
home lab basti
=======
# homeassistant
>>>>>>> 335a07eb1ea01992ce3eea3d122a3af3e9b5b92e
+10
View File
@@ -0,0 +1,10 @@
# Gitignore settings for ESPHome
# This is an example and may include too much for your use-case.
# You can modify this file to suit your needs.
/.esphome/
**/.pioenvs/
**/.piolibdeps/
**/lib/
**/src/
**/platformio.ini
/secrets.yaml
BIN
View File
Binary file not shown.
+56
View File
@@ -0,0 +1,56 @@
substitutions:
devicename: eg-ga-sw-tor
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "99e1512e8c3c6c74a0941c6265a6bfb8"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Optional manual IP
manual_ip:
static_ip: 192.168.1.193
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "QzKYJac0SGb0"
captive_portal:
# Example configuration entry
switch:
- platform: gpio
pin: D2
id: relay
name: "Garagentor"
icon: "mdi:garage"
on_turn_on:
- delay: 4000ms
- switch.turn_off: relay
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+48
View File
@@ -0,0 +1,48 @@
substitutions:
devicename: esp32cam
esphome:
name: ${devicename}
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "c3a5c265871d35fccae367d5b458eba3"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "FNDXksl7u2eJ"
captive_portal:
# Example configuration entry
esp32_camera:
external_clock:
pin: GPIO0
frequency: 20MHz
i2c_pins:
sda: GPIO26
scl: GPIO27
data_pins: [GPIO5, GPIO18, GPIO19, GPIO21, GPIO36, GPIO39, GPIO34, GPIO35]
vsync_pin: GPIO25
href_pin: GPIO23
pixel_clock_pin: GPIO22
power_down_pin: GPIO32
# Image settings
name: My Camera
# ...
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
View File
@@ -0,0 +1 @@
Free download fonts at http://sharefonts.net
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-az-le-ambi
wledname: WLED-AZ-Ambi
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "7EyFH9NP5ilMZUOuDIYJqe4pFuljzUCGEXebOygob30="
ota:
password: "17462b15801fcc11b267a896dc869b8f"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.39
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "QyyB6Lj1CgnB"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 64
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 63
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+28
View File
@@ -0,0 +1,28 @@
esphome:
name: og-az-le-magic
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "KxSlEOz763gH4HROCFeb1bxdsiddSKQtW/imL7h3Mew="
ota:
password: "92a40b4dafe3676d99b2b21bc1fdf30f"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Og-Az-Le-Magic Fallback Hotspot"
password: "4FJgLGUl65qn"
captive_portal:
+267
View File
@@ -0,0 +1,267 @@
substitutions:
devicename: og-az-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
on_boot:
then:
# - rtttl.play: 'MissionImp:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,a#,g,2d,32p,a#,g,2c#,32p,a#,g,2c,a#5,8c,2p,32p,a#5,g5,2f#,32p,a#5,g5,2f,32p,a#5,g5,2e,d#,8d'
# - rtttl.play: 'mario:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6'
# - rtttl.play: 'back:d=4,o=6,b=200:4g4,4a#5,4d#5,4a#4,4a#5,4g4,4a#5,4d#5,4a#5,4d#6,4a#4,32g4,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,2g6,4c7,2a#.6,4g6,1a#.6,2d7,2g.6,1f.6,2g.6,2a#.6,2d7,2c.7,2a#.6,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,'
- rtttl.play: 'BackToTheFuture:d=4,o=5,b=160:p,8c.,16p,g,16p,16c.6,16p,a#.,16p,16a,16p,16g,16p,8a,16p,8g,16p,8f,16p,1g.,1p,g.,16p,c.,16p,2f#.,16p,32g.,32p,32a.,32p,8g,32p,8e,32p,8c,32p,f#,16p,32g.,32p,32a.,32p,8g.,32p,8d.,32p,8g.,32p,8d.6,32p,d6,16p,c#6,16p,32b.,32p,32c#.6,32p,2d6'
# - rtttl.play: 'PlayedAl:d=4,o=5,b=355:8g#,p,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.,f,8g#,g,g,8p,8d#,2g,8p,8g,p,g,8p,8d#,g.,d#,8g,d#,d#,8p,8c,2d#,8p,8d#,p,d#,8p,8c,d#.,c,8d#,f,c#6,8p,8f,2c#6,8p,8f,p,c#6,8p,8f,c6,8p,a#,8g#,g#,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.'
# - rtttl.play: 'Ghostbus:d=16,o=5,b=112:g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,8a,8g,4d.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.';
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
- service: write_tag_random
then:
- lambda: |-
static const char alphanum[] = "0123456789abcdef";
std::string uri = "//www.home-assistant.io/tag/";
for (int i = 0; i < 8; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
for (int j = 0; j < 3; j++) {
for (int i = 0; i < 4; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
}
for (int i = 0; i < 12; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
auto message = new nfc::NdefMessage();
message->add_uri_record(uri);
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
id(pn532_board).write_mode(message);
- service: write_tag_id
variables:
tag_id: string
then:
- lambda: |-
auto message = new nfc::NdefMessage();
std::string uri = "//www.home-assistant.io/tag/";
uri += tag_id;
message->add_uri_record(uri);
id(pn532_board).write_mode(message);
- service: clean_tag
then:
- lambda: 'id(pn532_board).clean_mode();'
- service: cancel_writing
then:
- lambda: 'id(pn532_board).read_mode();'
ota:
password: "37c297f04462d9e0bba70543ebbfa7ae"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.95
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "DSFKr3I1aBXy"
captive_portal:
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: RGB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "Status LED 01"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 0
- platform: partition
name: "Status LED 02"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 1
to: 1
- platform: partition
name: "Status LED 03"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 2
to: 2
- platform: partition
name: "Status LED 04"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Status LED 05"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 06"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 07"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 08"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 09"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 10"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 11"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 12"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
#RFID - PN532
# Reset Pin D7
# SDA D5
# SCL D6
#
# schau mal bei og-wz-us-tag
# abweichend port D1 / D2
i2c:
sda: D5
scl: D6
scan: true
id: bus_a
pn532_i2c:
update_interval: 1s
id: pn532_board
on_tag:
then:
- homeassistant.tag_scanned: !lambda |
if (!tag.has_ndef_message()) {
ESP_LOGD("tagreader", "No NDEF");
return x;
}
auto message = tag.get_ndef_message();
auto records = message->get_records();
for (auto &record : records) {
std::string payload = record->get_payload();
size_t pos = payload.find("//www.home-assistant.io/tag/");
if (pos != std::string::npos) {
return payload.substr(pos + 34);
}
}
ESP_LOGD("tagreader", "Bad NDEF, fallback to uid");
return x;
binary_sensor:
- platform: gpio
pin:
number: D1
mode: INPUT_PULLUP
name: "${devicename} Radar Sensor"
device_class: motion
- platform: status
name: "${devicename} Status"
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
# Buzzer D6
output:
- platform: esp8266_pwm
pin: D2
frequency: 1000 Hz
id: rtttl_out
rtttl:
output: rtttl_out
on_finished_playback:
- logger.log: 'Song ended!'
+206
View File
@@ -0,0 +1,206 @@
substitutions:
devicename: og-bz-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
# encryption:
# key: "ASBh/0rFjqcMw312xRW3GBe7YwkJ5N03Sa00THKWFyA="
ota:
password: "e997f9bb54cc19ba96870868471dd560"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.98
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "NWODEbSPSLkM"
captive_portal:
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 40
internal: true
- platform: partition
name: "Status RS"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 0
- platform: partition
name: "Status LED 01"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 1
to: 1
- platform: partition
name: "Status LED 02"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 2
to: 2
- platform: partition
name: "Status LED 03"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Status LED 04"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 05"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 06"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 07"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 08"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 09"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 10"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 11"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
- platform: partition
name: "Status LED 12"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 12
to: 12
- platform: partition
name: "Night Light"
segments:
# Use LEDs 11-20 from the light with ID light1
- id: neopixel
from: 13
to: 26
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
- platform: partition
name: "Msg Light"
segments:
# Use LEDs 11-20 from the light with ID light1
- id: neopixel
from: 28
to: 39
- platform: partition
name: "Status BM"
segments:
# Use LEDs 11-20 from the light with ID light1
- id: neopixel
from: 27
to: 27
binary_sensor:
- platform: gpio
pin:
number: D3
mode: INPUT_PULLUP
name: "${devicename} Radar Sensor"
device_class: motion
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+28
View File
@@ -0,0 +1,28 @@
esphome:
name: og-fl-le-magic
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "O5LisX51XHvv+rPAfXR7CVYdmC6kcvcbXTktHGNzVCw="
ota:
password: "2e6d357a383ba60954bf08f12e394432"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Og-Fl-Le-Magic Fallback Hotspot"
password: "2wcm9pQmfUeg"
captive_portal:
+57
View File
@@ -0,0 +1,57 @@
substitutions:
devicename: og-fl-pw-tablet
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "hz4Qw6LGiYDpqrOxM89VvGu65Zl4k48fivVKU16BBzI="
ota:
password: "918e5604e0036edccbbb261ce8a7ab4b"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.194
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "KhFkbQXGGRoU"
captive_portal:
### temp sensor
### switch für releae von garage
### audio connector auch switch???
switch:
#D1 Relais für den Türöffner
- platform: gpio
pin: D1
id: relay
name: "Tablet laden"
icon: "mdi:BatteryChargingWirelessOutline"
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+184
View File
@@ -0,0 +1,184 @@
substitutions:
devicename: og-fl-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "7e132689c324a0f7de57d556a0e18e72"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.94
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "RL24sDzw4lL6"
captive_portal:
### temp sensor
### switch für releae von garage
### audio connector auch switch???
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: RGB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "Status LED 01"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 0
- platform: partition
name: "Status LED 02"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 1
to: 1
- platform: partition
name: "Status LED 03"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 2
to: 2
- platform: partition
name: "Status LED 04"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Status LED 05"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 06"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 07"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 08"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 09"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 10"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 11"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 12"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
binary_sensor:
#D2 ist der Soundchip für die Türklingel
- platform: gpio
pin: D2
name: "Haustür Klingel"
device_class: sound
filters:
- delayed_off: 5s
switch:
#D1 Relais für den Türöffner
- platform: gpio
pin: D1
id: relay
name: "Haustür Türdrücker"
icon: "mdi:door"
on_turn_on:
- delay: 3000ms
- switch.turn_off: relay
- platform: restart
name: "${devicename} Neustart"
# D3 Temp Sensor DS18b20
# Temp_Flur
dallas:
- pin: D3
sensor:
- platform: dallas
address: 0xDB0316A35722FF28
name: "${devicename} Temperature"
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+71
View File
@@ -0,0 +1,71 @@
substitutions:
devicename: og-ku-co-senseo
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "2e625bc7fcf9ba632a5ff1008538831f"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Optional manual IP
manual_ip:
static_ip: 192.168.1.139
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "anO1GGY2nsmz"
captive_portal:
switch:
- platform: restart
name: "${devicename} Neustart"
- platform: gpio
pin: D2
id: onecup
name: "${devicename} 1cup"
icon: "mdi:coffee"
on_turn_on:
- delay: 500ms
- switch.turn_off: onecup
- platform: gpio
pin: D3
id: twocup
name: "${devicename} 2cup"
icon: "mdi:coffee"
on_turn_on:
- delay: 500ms
- switch.turn_off: twocup
- platform: gpio
pin: D4
id: pot
name: "${devicename} pot"
icon: "mdi:coffee-maker"
on_turn_on:
- delay: 500ms
- switch.turn_off: pot
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+169
View File
@@ -0,0 +1,169 @@
substitutions:
devicename: og-ku-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "e997f9bb54cc19ba96870868471dd560"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.99
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "Cio9y5YAWiBT"
captive_portal:
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 15
internal: true
- platform: partition
name: "Status LED 01"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 14
to: 14
- platform: partition
name: "Status LED 02"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 13
to: 13
- platform: partition
name: "Status LED 03"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 12
to: 12
- platform: partition
name: "Status LED 04"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
- platform: partition
name: "Status LED 05"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 06"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 07"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 08"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 09"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 10"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 11"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 12"
segments:
# Use first 12 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Msg Light"
segments:
# Use LEDs 13-15 from the light with ID light1
- id: neopixel
from: 0
to: 2
binary_sensor:
- platform: gpio
pin:
number: D3
mode: INPUT_PULLUP
name: "${devicename} Radar Sensor"
device_class: motion
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-sz-le-ambi
wledname: WLED-SZ-Ambi
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "wSBQeBM9DjwLg1yUIU0JxbYVlTQvF5/oFTi4H9OIEo4="
ota:
password: "63dc1bff4f6cc76273ea1fb9f3d17a81"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.37
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "lftIGuzLvTW1"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 38
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 37
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+94
View File
@@ -0,0 +1,94 @@
substitutions:
devicename: og-sz-le-bett-l
wledname: WLED-SZ-Bett-L
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "qSnmhRiXNnS0LY9mTpvpcX980ZkFalMaxVIR8Vf1yaM="
ota:
password: "6f81ed36e808ec92426a873fc317568d"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.49
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "6GDUC8n39JCP"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 11
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
# Example configuration entry
text_sensor:
- platform: wifi_info
ip_address:
name: "${devicename} Wi-Fi IP Address"
ssid:
name: "${devicename} Wi-Fi Connected SSID"
bssid:
name: "${devicename} Wi-Fi Connected BSSID"
mac_address:
name: "${devicename} Wi-Fi Mac Address"
scan_results:
name: "${devicename} Wi-Fi Latest Scan Results"
- platform: version
name: "${devicename} Version"
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-sz-le-bett-r
wledname: WLED-SZ-Bett-R
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "ILZ93o0U0EYla+y33L3nCTBzCzDc5WHniRb2xYXqjj0="
ota:
password: "c66c398cf5380063f19498fdffdcbb85"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.50
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "1JPPqwdCXcZr"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 11
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+247
View File
@@ -0,0 +1,247 @@
substitutions:
device_name: og-sz-le-magic
friendly_name: WLED-SZ-magic
esphome:
name: ${device_name}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "SFVKZveCeQ7nvwQbBl4Nn0KKbGz6ldlmzPEqs/+QIpA="
ota:
password: "9bd950aa91bf6ae5a69a7070e6c58072"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.51
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${device_name}"
password: "6f9jvXdAKO4E"
# Enable web server
web_server:
port: 80
remote_receiver:
pin: GPIO4
dump: all
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
binary_sensor:
- platform: remote_receiver
name: "Remote ON"
raw:
code: [ -9052, 4434, -636, 523, -636, 492, -603, 526, -608, 522, -606, 523, -608, 520, -606, 522, -600, 529, -610, 1594, -633, 1602, -638, 1595, -631, 1601, -628, 1606, -635, 1600, -636, 1595, -637, 1597, -634, 1600, -637, 521, -604, 1600, -637, 1596, -638, 520, -609, 521, -606, 523, -634, 494, -610, 518, -608, 1597, -638, 520, -607, 521, -607, 1597, -635, 1598, -636, 1599, -665, 1568, -644 ]
on_press:
then:
- light.turn_on: ${device_name}
- platform: remote_receiver
name: "Remote OFF"
raw:
code: [ -9008, 4482, -600, 531, -565, 564, -591, 536, -568, 564, -593, 537, -597, 529, -597, 531, -596, 534, -596, 1639, -597, 1635, -597, 1638, -598, 1638, -591, 1644, -568, 1665, -592, 1642, -566, 1670, -592, 1640, -595, 1639, -592, 1643, -567, 1665, -596, 1640, -597, 532, -595, 533, -594, 536, -596, 534, -597, 530, -567, 563, -568, 561, -599, 529, -568, 1667, -593, 1642, -591, 1642, -597 ]
on_press:
then:
- light.turn_off: ${device_name}
- platform: remote_receiver
name: "Remote BRIGHTUP"
raw:
code: [ -8998, 4475, -592, 533, -594, 535, -593, 535, -591, 536, -591, 536, -591, 537, -591, 535, -591, 536, -593, 1639, -592, 1638, -591, 1639, -589, 1640, -592, 1637, -593, 1638, -593, 1638, -591, 1637, -593, 1638, -593, 534, -592, 535, -594, 1636, -594, 535, -590, 537, -592, 535, -592, 536, -592, 534, -593, 1635, -594, 1639, -591, 536, -591, 1639, -591, 1639, -591, 1640, -591, 1639, -592 ]
on_press:
then:
- light.dim_relative:
id: ${device_name}
relative_brightness: 5%
- platform: remote_receiver
name: "Remote BRIGHTDOWN"
raw:
code: [ -9000, 4476, -589, 537, -593, 533, -593, 536, -590, 536, -593, 536, -592, 535, -592, 535, -592, 535, -593, 1638, -593, 1638, -592, 1637, -591, 1640, -591, 1638, -592, 1639, -592, 1638, -592, 1639, -592, 1637, -591, 538, -592, 1637, -592, 1639, -592, 1637, -593, 536, -591, 536, -591, 536, -593, 534, -592, 1639, -591, 537, -592, 536, -590, 535, -593, 1637, -593, 1638, -594, 1636, -593 ]
on_press:
then:
- light.dim_relative:
id: ${device_name}
relative_brightness: -5%
- platform: remote_receiver
name: "Remote RED"
raw:
code: [ -9011, 4465, -600, 558, -574, 528, -597, 556, -573, 555, -573, 524, -603, 556, -571, 530, -596, 558, -568, 1635, -597, 1633, -601, 1630, -603, 1628, -607, 1625, -596, 1633, -607, 1625, -605, 1626, -602, 1629, -600, 529, -602, 555, -592, 1607, -598, 1635, -634, 523, -572, 556, -574, 553, -573, 527, -596, 1635, -598, 1631, -596, 535, -599, 556, -567, 1633, -603, 1629, -604, 1627, -597 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
red: 100%
green: 0%
blue: 0%
white: 0%
effect: None
- platform: remote_receiver
name: "Remote GREEN"
raw:
code: [ -9042, 4433, -669, 488, -611, 517, -611, 517, -636, 492, -608, 519, -609, 518, -638, 490, -611, 517, -634, 1567, -636, 1596, -663, 1569, -633, 1597, -668, 1565, -637, 1591, -636, 1597, -637, 1592, -638, 1595, -641, 1588, -666, 492, -641, 1562, -665, 1565, -640, 518, -605, 522, -604, 523, -610, 518, -606, 522, -613, 1589, -633, 524, -610, 518, -604, 1598, -627, 1603, -641, 1591, -640 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
red: 0%
green: 100%
blue: 0%
white: 0%
effect: None
- platform: remote_receiver
name: "Remote BLUE"
raw:
code: [ -9041, 4434, -637, 521, -632, 494, -608, 521, -609, 519, -635, 493, -604, 524, -604, 523, -607, 521, -607, 1595, -664, 1567, -667, 1565, -664, 1568, -634, 1596, -635, 1598, -635, 1594, -669, 1566, -663, 1566, -634, 522, -637, 490, -607, 522, -636, 1565, -639, 519, -640, 487, -641, 487, -636, 491, -636, 1568, -666, 1564, -664, 1566, -666, 492, -640, 1562, -668, 1564, -671, 1559, -667 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
red: 0%
green: 0%
blue: 100%
white: 0%
effect: None
- platform: remote_receiver
name: "Remote WHITE"
raw:
code: [ -9057, 4433, -634, 524, -607, 523, -607, 521, -604, 525, -609, 520, -610, 518, -638, 491, -609, 521, -607, 1595, -637, 1595, -637, 1596, -640, 1594, -628, 1604, -638, 1596, -635, 1598, -637, 1593, -640, 1595, -635, 522, -606, 1600, -632, 524, -603, 1601, -637, 520, -609, 521, -607, 521, -604, 526, -610, 1593, -631, 527, -601, 1603, -661, 499, -607, 1593, -638, 1595, -666, 1567, -636 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
red: 0%
green: 0%
blue: 0%
white: 100%
effect: None
- platform: remote_receiver
name: "Remote FLASH"
raw:
code: [ -9011, 4485, -592, 537, -594, 536, -592, 536, -594, 537, -593, 537, -593, 536, -593, 537, -593, 536, -593, 1641, -594, 1642, -593, 1642, -592, 1644, -592, 1642, -592, 1644, -591, 1642, -594, 1640, -596, 1639, -594, 536, -594, 1641, -593, 1642, -593, 536, -593, 537, -594, 1641, -592, 537, -594, 536, -593, 1641, -594, 536, -594, 534, -597, 1639, -594, 1641, -592, 537, -593, 1643, -592 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
effect: "In Alarm"
- platform: remote_receiver
name: "Remote STROBE"
raw:
code: [ -8971, 4511, -559, 565, -562, 568, -561, 565, -562, 566, -563, 564, -563, 567, -563, 564, -562, 565, -563, 1670, -563, 1668, -562, 1671, -560, 1671, -563, 1670, -560, 1669, -565, 1667, -563, 1673, -558, 567, -561, 564, -562, 566, -565, 563, -561, 569, -562, 567, -585, 540, -563, 571, -558, 1669, -561, 1671, -560, 1669, -563, 1670, -561, 1670, -564, 1668, -561, 1671, -560, 1672, -562 ]
on_press:
then:
- light.turn_on:
id: ${device_name}
effect: "Default Strobe"
light:
- platform: rgbw
name: ${friendly_name} # Put the name that you want to see in Home Assistant.
id: ${device_name}
red: red_channel
green: green_channel
blue: blue_channel
white: white_channel
effects: # Add few effects : Slow and fast random colors and an "in alarm" mode.
- random:
name: "Slow Random Colors"
transition_length: 30s
update_interval: 30s
- random:
name: "Fast Random Colors"
transition_length: 4s
update_interval: 5s
- strobe:
name: Default Strobe
- strobe:
name: In Alarm
colors:
- state: True
brightness: 100%
white: 0%
red: 100%
blue: 0%
green: 0%
duration: 150ms
- state: False
duration: 100ms
- state: True
brightness: 100%
white: 0%
red: 100%
blue: 0%
green: 0%
duration: 150ms
- state: False
duration: 100ms
- state: True
brightness: 100%
white: 0%
red: 0%
blue: 100%
green: 0%
duration: 150ms
- state: False
duration: 100ms
- state: True
brightness: 100%
white: 0%
red: 0%
blue: 100%
green: 0%
duration: 150ms
- state: False
duration: 100ms
output:
- platform: esp8266_pwm
id: red_channel
pin: GPIO12
- platform: esp8266_pwm
id: green_channel
pin: GPIO5
- platform: esp8266_pwm
id: blue_channel
pin: GPIO13
- platform: esp8266_pwm
id: white_channel
pin: GPIO15
switch:
- platform: restart
name: "${device_name} Neustart"
sensor:
- platform: wifi_signal
name: "${device_name} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${device_name} Uptime"
update_interval: 60s
+301
View File
@@ -0,0 +1,301 @@
substitutions:
devicename: og-sz-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "78f0e056acef6b72d384251c368455f7"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.92
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "Q80sOv2BQybI"
captive_portal:
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: RGB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "Status LED 01"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 0
- platform: partition
name: "Status LED 02"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 1
to: 1
- platform: partition
name: "Status LED 03"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 2
to: 2
- platform: partition
name: "Status LED 04"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Status LED 05"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 06"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 07"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 08"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 09"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 10"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 11"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 12"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
status_led:
pin:
number: GPIO2
inverted: True
globals:
- id: initial_zero
type: float
restore_value: yes
# NOTE: make sure to align this value to the one used in "calibrate_linear" below!
#initial_value: '-481989'
initial_value: '-906042'
- id: auto_tare_enabled
type: bool
restore_value: yes
initial_value: 'true'
- id: auto_tare_difference
type: float
restore_value: yes
initial_value: '0'
- id: manual_tare_flag
type: bool
restore_value: no
initial_value: 'false'
switch:
- platform: restart
name: "${devicename} Neustart"
## Switch to enable/disable the auto tare feature
- platform: template
id: smart_scale_continuous_tare_enabled
name: "Smart Scale Continuous Tare Enabled"
lambda: |-
return id(auto_tare_enabled);
turn_on_action:
- lambda: |-
id(auto_tare_enabled) = true;
turn_off_action:
- lambda: |-
id(auto_tare_enabled) = false;
## Switch used to initiate a manual tare
- platform: template
id: smart_scale_manual_tare_action_switch
name: "Smart Scale Manual Tare Action"
lambda: |-
return id(manual_tare_flag);
turn_on_action:
- lambda: |-
id(auto_tare_difference) = id(initial_zero) - id(smart_scale_hx711_value_raw).state;
- switch.turn_off: smart_scale_manual_tare_action_switch
turn_off_action:
- lambda: |-
id(manual_tare_flag) = false;
## Sensor Configuration ##
sensor:
# template sensors from global variables
- platform: template
id: smart_scale_initial_zero
name: "Smart Scale Initial Zero"
lambda: |-
return id(initial_zero);
update_interval: 1s
- platform: template
id: smart_scale_auto_tare_difference
name: "Smart Scale Auto Tare Difference"
lambda: |-
return id(auto_tare_difference);
update_interval: 1s
# sensors imported from home assistant
- platform: homeassistant
id: homeassistant_initial_zero
entity_id: input_number.smart_scale_initial_zero
on_value:
then:
- lambda: |-
id(initial_zero) = x;
# RAW Scale input
- platform: hx711
id: smart_scale_hx711_value_raw
internal: True
dout_pin: D2
clk_pin: D3
gain: 128
unit_of_measurement: kg
accuracy_decimals: 3
update_interval: 0.2s
filters:
- sliding_window_moving_average:
window_size: 3
send_every: 1
on_value:
then:
- sensor.template.publish:
id: smart_scale_hx711_value
state: !lambda 'return id(smart_scale_hx711_value_raw).state;'
- if:
condition:
and:
- lambda: 'return id(auto_tare_enabled);'
# current smart scale value is below approx. 10KG (raw value -275743) aka nobody is standing on the scale
- lambda: 'return id(smart_scale_hx711_value).state < 10.0;'
then:
- if:
condition:
# current raw scale value is below expected zero value
- lambda: 'return id(smart_scale_hx711_value_raw).state < (id(initial_zero) - id(auto_tare_difference));'
then:
# INcrease Auto-Tare offset to slowly align real zero value with expected zero value
- lambda: |-
id(auto_tare_difference) += 10;
else:
# DEcrease Auto-Tare offset to slowly align real zero value with expected zero value
- lambda: |-
id(auto_tare_difference) -= 10;
# Mapped value to KG
- platform: template
id: smart_scale_hx711_value
name: "Smart Scale HX711 Value"
internal: False
filters:
# apply auto_tare difference
- lambda: 'return x + id(auto_tare_difference);'
# apply rough calibration
- calibrate_linear:
# retrieve these values by evaluating the raw values with loads of known mass.
# note that a bigger difference between measurements usually results in higher resolution,
# so measure 0 Kg and the highest known mass you have (like f.ex. your own weight, measured by a normal scale with good accuracy)
#- 481989 -> 0
#- 1339163 -> 88.3
- 906042 -> 0
- 903647 -> 0.523
- 866398 -> 1.027
# map values below 0.1 to 0 (to decrease value changes due to random fluctuation)
- lambda: |-
if (x <= 0.1) {
return 0.0;
} else {
return x;
}
unit_of_measurement: kg
accuracy_decimals: 2
update_interval: 0.2s
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-te-le-ambi
wledname: WLED-WZ-Ambi
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "k+OJTmte6ZfB9cJijUWUTt0THVvzYA7A0S3Xtc8DcU4="
ota:
password: "6c3039d12b4f3fcfc36cabfbced53ff6"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.47
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "xxuctjzLMaJg"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 150
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 149
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+311
View File
@@ -0,0 +1,311 @@
substitutions:
devicename: og-te-ro-sun
friendly_name: og-te-ro-sun
devicestring: Terrasse Rollo
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
esp8266_restore_from_flash: true
on_boot:
priority: 550.0
then:
# 1. Set stepper current position as stored in memory
# 2. Present down value set for down_position (where is "down")
# 3. If it is the same as down position, update the state of the switch
- lambda: |-
id(my_stepper).report_position(id(last_known_position));
id(bed_down_pos).publish_state(id(down_position));
if (id(last_known_position)==id(down_position)){
id(rollerblind_bed_down).publish_state(true);
}
globals:
# The actual position of the rollerblind
- id: last_known_position
type: int
restore_value: true
initial_value: '1'
# The number of steps to reach to the down position of the rollerblind
- id: down_position
type: int
restore_value: true
initial_value: '0'
# Enable logging
logger:
level: DEBUG
# Enable Home Assistant API
api:
encryption:
key: "1b5VG2dp8E+p1b7tlxLILWbvArqOVdnlh0+/yZ9Irms="
ota:
password: "ee384bfbcfc7b49c8d6e6632c19a8a36"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.195
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "iyoRMuoMH8Wi"
captive_portal:
stepper:
- platform: uln2003
id: my_stepper
# Reversed order as it turned the wrong way
# pin_a: D4
# pin_b: D2
# pin_c: D3
# pin_d: D1
pin_a: D1
pin_b: D2
pin_c: D3
pin_d: D4
max_speed: 675 steps/s
sleep_when_done: true
# Optional:
acceleration: inf
deceleration: inf
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
- platform: template
name: $devicestring Down position
id: bed_down_pos
- platform: template
name: $devicestring Percentage position
id: bed_perc_pos
- platform: template
name: $devicestring Last position
id: bed_last_pos
switch:
- platform: restart
name: "${devicename} Neustart"
# Save current position to 0
- platform: template
name: $devicestring Save Top Position
id: reset_switch
turn_on_action:
then:
# Reset DOWN
- switch.template.publish:
id: move_down
state: OFF
# Reset UP
- switch.template.publish:
id: move_up
state: OFF
# Reset stepper position
- stepper.report_position:
id: my_stepper
position: 0
- stepper.set_target:
id: my_stepper
target: 0
# Save global variable for reboot
- lambda: |-
id(last_known_position) = 0;
# Save current position to max down
- platform: template
name: $devicestring Save Down Position
id: save_down_switch
turn_on_action:
then:
# Reset DOWN
- switch.template.publish:
id: move_down
state: OFF
# Reset UP
- switch.template.publish:
id: move_up
state: OFF
# Save global variable for reboot down_position
# Save current position
# Update sensor with stored value
# Set position as in DOWN state (switch)
- lambda: |-
id(down_position) = id(my_stepper).current_position;
id(last_known_position) = id(down_position);
id(bed_down_pos).publish_state(id(down_position));
id(rollerblind_bed_down).publish_state(true);
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
- logger.log:
format: "Saving down position %.1i"
args: [ 'id(down_position)']
- platform: template
name: $devicestring Down
id: move_down
turn_on_action:
# Enable switch
- switch.template.publish:
id: move_down
state: ON
# Reset back
- switch.template.publish:
id: move_up
state: OFF
# Reset master
- switch.template.publish:
id: rollerblind_bed_down
state: OFF
# Set current position to last_known
- lambda: |-
id(down_position) = id(my_stepper).current_position;
id(last_known_position) = id(down_position);
id(bed_down_pos).publish_state(id(down_position));
id(rollerblind_bed_down).publish_state(true);
id(last_known_position) = id(my_stepper).current_position;
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
# Set to move long
- lambda: |-
id(my_stepper).set_target(1000000);
turn_off_action:
- switch.template.publish:
id: move_down
state: OFF
# Stop motor and report position
- lambda: |-
id(last_known_position) = id(my_stepper).current_position;
id(my_stepper).set_target(id(last_known_position));
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
- logger.log:
format: "Current position (down) %.1i"
args: [ 'id(last_known_position)']
- platform: template
name: $devicestring Up
id: move_up
turn_on_action:
# Enable switch
- switch.template.publish:
id: move_up
state: ON
# Reset down
- switch.template.publish:
id: move_down
state: OFF
# Reset master
- switch.template.publish:
id: rollerblind_bed_down
state: OFF
# Set current position to last_known
- lambda: |-
id(last_known_position) = id(my_stepper).current_position;
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
# Set to move long
- lambda: |-
id(my_stepper).set_target(-1000000);
turn_off_action:
- switch.template.publish:
id: move_up
state: OFF
# Stop motor and report position
- lambda: |-
id(last_known_position) = id(my_stepper).current_position;
id(my_stepper).set_target(id(last_known_position));
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
- logger.log:
format: "Current position (up) %.1i"
args: [ 'id(last_known_position)']
- platform: template
name: $devicestring Closed
id: rollerblind_bed_down
turn_on_action:
# Reset DOWN and UP manual
- switch.template.publish:
id: move_up
state: OFF
- switch.template.publish:
id: move_down
state: OFF
# Enable switch
- switch.template.publish:
id: rollerblind_bed_down
state: ON
# Set last_known_position to the final position
# It might not necessarily be the final position and
# Can be a challenge if power breaks upon moving
- lambda: |-
id(last_known_position) = id(down_position);
id(my_stepper).set_target(id(down_position));
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state(round((id(down_position) / id(last_known_position)) * 100));
turn_off_action:
- switch.template.publish:
id: rollerblind_bed_down
state: OFF
# Set last_known_position to the start position (0)
# It might not necessarily be the start position and
# Can be a challenge if power breaks upon moving
- lambda: |-
id(last_known_position) = 0;
id(my_stepper).set_target(0);
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state(round((id(down_position) / id(last_known_position)) * 100));
# On a regular basis store the position of the roller blind
# Don't do it too frequently as it might impact the move of the blind
time:
- platform: sntp
id: sntp_time
on_time:
# Every 5 minutes
- seconds: 0
minutes: /5
then:
- lambda: |-
id(last_known_position) = id(my_stepper).current_position;
id(bed_last_pos).publish_state(id(last_known_position));
# id(bed_perc_pos).publish_state((id(down_position) / id(last_known_position)) * 100);
# Example configuration entry
cover:
- platform: template
name: "OG_te_RO_sun"
lambda: |-
if (id(rollerblind_bed_down).state) {
return COVER_CLOSED;
} else {
return COVER_OPEN;
}
open_action:
- switch.turn_off: rollerblind_bed_down
close_action:
- switch.turn_on: rollerblind_bed_down
stop_action:
- switch.turn_off: move_up
- switch.turn_off: move_down
optimistic: true
+140
View File
@@ -0,0 +1,140 @@
substitutions:
devicename: og-te-us-weather
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
on_boot:
then:
# - rtttl.play: 'MissionImp:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,a#,g,2d,32p,a#,g,2c#,32p,a#,g,2c,a#5,8c,2p,32p,a#5,g5,2f#,32p,a#5,g5,2f,32p,a#5,g5,2e,d#,8d'
# - rtttl.play: 'mario:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6'
# - rtttl.play: 'back:d=4,o=6,b=200:4g4,4a#5,4d#5,4a#4,4a#5,4g4,4a#5,4d#5,4a#5,4d#6,4a#4,32g4,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,2g6,4c7,2a#.6,4g6,1a#.6,2d7,2g.6,1f.6,2g.6,2a#.6,2d7,2c.7,2a#.6,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,'
- rtttl.play: 'BackToTheFuture:d=4,o=5,b=160:p,8c.,16p,g,16p,16c.6,16p,a#.,16p,16a,16p,16g,16p,8a,16p,8g,16p,8f,16p,1g.,1p,g.,16p,c.,16p,2f#.,16p,32g.,32p,32a.,32p,8g,32p,8e,32p,8c,32p,f#,16p,32g.,32p,32a.,32p,8g.,32p,8d.,32p,8g.,32p,8d.6,32p,d6,16p,c#6,16p,32b.,32p,32c#.6,32p,2d6'
# - rtttl.play: 'PlayedAl:d=4,o=5,b=355:8g#,p,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.,f,8g#,g,g,8p,8d#,2g,8p,8g,p,g,8p,8d#,g.,d#,8g,d#,d#,8p,8c,2d#,8p,8d#,p,d#,8p,8c,d#.,c,8d#,f,c#6,8p,8f,2c#6,8p,8f,p,c#6,8p,8f,c6,8p,a#,8g#,g#,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.'
# - rtttl.play: 'Ghostbus:d=16,o=5,b=112:g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,8a,8g,4d.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.';
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
ota:
password: "85149b960ad66890af767aef382e81d3"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.91
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "kADB2x6olwVd"
captive_portal:
# analog: humana
# HC-SR04
# GPIO → Trigger: D7
# GPIO ← Echo, 5V: D8
# Pumpe Relais D4 Garage
# Wasserverbrauch D5 Pulse
# SDS011
# GPIO ← TX: D3 BLUE
# GPIO → RX(optional): D2 GREEN/WHITE
uart:
rx_pin: D2
tx_pin: D3
baud_rate: 9600
# D1 dallas
# Temp_Sonne
# Temp_Schatten
dallas:
- pin: D1
sensor:
- platform: sds011
pm_2_5:
name: "${devicename} PM <2.5µm Concentration"
pm_10_0:
name: "${devicename} PM <10.0µm Concentration"
update_interval: 5min
- platform: dallas
address: 0x640516a331ceff28
name: "${devicename} Sun"
- platform: dallas
address: 0x160416a2c85bff28
name: "${devicename} Shade"
#Logs auslesen
# DHT11/12/22 SONOFF2301/7021
# temp_hum
# D0 / DHT22
- platform: dht
pin: D0
temperature:
name: "${devicename} Temperature"
humidity:
name: "${devicename} Humidity"
update_interval: 60s
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
- platform: adc
pin: A0
name: "${devicename} Soil Moisture"
update_interval: 10s
unit_of_measurement: "%"
filters:
- median:
window_size: 7
send_every: 4
send_first_at: 1
- calibrate_linear:
- 1.25 -> 100.00
- 2.8 -> 0.00
- lambda: if (x < 1) return 0; else return (x);
accuracy_decimals: 0
switch:
- platform: restart
name: "${devicename} Neustart"
# Buzzer D6
output:
- platform: esp8266_pwm
pin: D6
frequency: 1000 Hz
id: rtttl_out
rtttl:
output: rtttl_out
on_finished_playback:
- logger.log: 'Song ended!'
+117
View File
@@ -0,0 +1,117 @@
substitutions:
devicename: og-wz-eh-ring
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "55ce775e3e40f10d38d43421dcefc476"
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
# Optional manual IP
manual_ip:
static_ip: 192.168.1.191
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "anO1GGY2nsmz"
captive_portal:
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB #GRB
variant: WS2812
pin: RX
num_leds: 18
internal: false
# brightness: 100%
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
status_led:
pin:
number: GPIO2
inverted: True
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
- platform: hx711
name: "Bed Weight (L)"
id: bed_weight_l
dout_pin: D2
clk_pin: D3
filters:
- calibrate_linear:
- 909154 -> 0
# - 887502 -> 1.0
# - 840704 -> 2.0
- 531330 -> 10.86
# - 70000 -> 0
# - 145000 -> 5.6
- sliding_window_moving_average:
window_size: 5
send_every: 5
update_interval: 2s
unit_of_measurement: kg
accuracy_decimals: 2
binary_sensor:
- platform: template
name: "Bed Occupancy (Left)"
device_class: occupancy
lambda: |-
if (id(bed_weight_l).state > 10) {
return true;
} else {
return false;
}
- platform: gpio
pin: D5
name: "${devicename} Red"
- platform: gpio
pin: D6
name: "${devicename} Green"
- platform: gpio
pin: D7
name: "${devicename} Blue"
# buzzer von vwbus und weather klauen welcher port
# D6
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-wz-le-ambi
wledname: WLED-WZ-Ambi
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "3eO3n/qG8ZU0aaOO2Q1ddWggttPX6b3PfKkOWaUkVZI="
ota:
password: "f27f0320cbd22c076f857be24fef535b"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.35
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "w2i936ayhQxg"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 100
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 99
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-wz-le-christmas
wledname: WLED-WZ-Christmas
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "DJVHh10pHp/WUd8RWqdtfaLoJqpGduBfS+lY/3qlct4="
ota:
password: "7c061eccbbf68967637e670cce829b4d"
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.48
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "2ApuhllJxslN"
captive_portal:
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 74
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 73
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+28
View File
@@ -0,0 +1,28 @@
esphome:
name: og-wz-le-magic
esp8266:
board: esp01_1m
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "lgIG7+HJccmUvPluQIv1+vU5EgaZwuC0wl9oA2gFunM="
ota:
password: "766b2bbecbacdece0b1007fd93598967"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Og-Wz-Le-Magic Fallback Hotspot"
password: "LTE8dcbEvsey"
captive_portal:
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-wz-le-rahmen
wledname: WLED-WZ-Rahmen
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "eS4RBrUY1MWdn3Uv8/peXpxIkRt7YvkX6teTcsTtu70="
ota:
password: "9819b73940ab907997fac11415967f8d"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.40
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "OD3m9CLLa1oP"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 144
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 143
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+78
View File
@@ -0,0 +1,78 @@
substitutions:
devicename: og-wz-le-stern
wledname: WLED-WZ-Stern
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: "CdE1ru+E7yA7DT71xdDgsVtMZZLVnykHDG2/z0y2Oro="
ota:
password: "cc1e13c454e3e33865db40cf4a1474e2"
captive_portal:
wifi:
ssid: !secret wifi_wled_ssid
password: !secret wifi_wled_password
manual_ip:
static_ip: 192.168.1.93
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "hKRAb2oOlmbJ"
wled:
e131:
method: multicast # default: register E1.31 to Multicast group
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: GRB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "${devicename} WLED"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 11
effects:
- wled:
port: 19446
- e131:
universe: 1
channels: RGB
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+205
View File
@@ -0,0 +1,205 @@
substitutions:
devicename: og-wz-us-bulli
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
on_boot:
then:
# - rtttl.play: 'MissionImp:d=16,o=6,b=95:32d,32d#,32d,32d#,32d,32d#,32d,32d#,32d,32d,32d#,32e,32f,32f#,32g,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,g,8p,g,8p,a#,p,c7,p,g,8p,g,8p,f,p,f#,p,a#,g,2d,32p,a#,g,2c#,32p,a#,g,2c,a#5,8c,2p,32p,a#5,g5,2f#,32p,a#5,g5,2f,32p,a#5,g5,2e,d#,8d'
# - rtttl.play: 'mario:d=4,o=5,b=100:16e6,16e6,32p,8e6,16c6,8e6,8g6,8p,8g,8p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,16p,8c6,16p,8g,16p,8e,16p,8a,8b,16a#,8a,16g.,16e6,16g6,8a6,16f6,8g6,8e6,16c6,16d6,8b,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16c7,16p,16c7,16c7,p,16g6,16f#6,16f6,16d#6,16p,16e6,16p,16g#,16a,16c6,16p,16a,16c6,16d6,8p,16d#6,8p,16d6,8p,16c6'
# - rtttl.play: 'back:d=4,o=6,b=200:4g4,4a#5,4d#5,4a#4,4a#5,4g4,4a#5,4d#5,4a#5,4d#6,4a#4,32g4,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,2g6,4c7,2a#.6,4g6,1a#.6,2d7,2g.6,1f.6,2g.6,2a#.6,2d7,2c.7,2a#.6,4g6,1a#.6,2d7,2g.6,2f.6,4g6,1a#.6,2d7,'
- rtttl.play: 'BackToTheFuture:d=4,o=5,b=160:p,8c.,16p,g,16p,16c.6,16p,a#.,16p,16a,16p,16g,16p,8a,16p,8g,16p,8f,16p,1g.,1p,g.,16p,c.,16p,2f#.,16p,32g.,32p,32a.,32p,8g,32p,8e,32p,8c,32p,f#,16p,32g.,32p,32a.,32p,8g.,32p,8d.,32p,8g.,32p,8d.6,32p,d6,16p,c#6,16p,32b.,32p,32c#.6,32p,2d6'
# - rtttl.play: 'PlayedAl:d=4,o=5,b=355:8g#,p,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.,f,8g#,g,g,8p,8d#,2g,8p,8g,p,g,8p,8d#,g.,d#,8g,d#,d#,8p,8c,2d#,8p,8d#,p,d#,8p,8c,d#.,c,8d#,f,c#6,8p,8f,2c#6,8p,8f,p,c#6,8p,8f,c6,8p,a#,8g#,g#,g#,8p,8f,2g#,8p,8g#,p,g#,8p,8f,g#.'
# - rtttl.play: 'Ghostbus:d=16,o=5,b=112:g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,8a,8g,4d.,g,g,8b,8g,8a,4f.,g,g,g,g,8f,4g.';
- light.turn_off: bulli_left_blinker
- light.turn_off: bulli_right_blinker
- light.turn_off: bulli_left_headlight
- light.turn_off: bulli_right_headlight
- light.turn_off: bulli_left_backlight
- light.turn_off: bulli_right_backlight
- light.turn_off: bulli_interior_lighting
- delay: 2s
- light.turn_on: bulli_left_blinker
- delay: 2s
- light.turn_off: bulli_left_blinker
- light.turn_on: bulli_right_blinker
- delay: 2s
- light.turn_off: bulli_right_blinker
- light.turn_on: bulli_left_headlight
- delay: 2s
- light.turn_off: bulli_left_headlight
- light.turn_on: bulli_right_headlight
- delay: 2s
- light.turn_off: bulli_right_headlight
- light.turn_on: bulli_left_backlight
- delay: 2s
- light.turn_off: bulli_left_backlight
- light.turn_on: bulli_right_backlight
- delay: 2s
- light.turn_off: bulli_right_backlight
- light.turn_on: bulli_interior_lighting
- delay: 2s
- light.turn_off: bulli_interior_lighting
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: play_rtttl
variables:
song_str: string
then:
- rtttl.play:
rtttl: !lambda 'return song_str;'
- service: blink
then:
- light.turn_off: bulli_left_blinker
- light.turn_off: bulli_right_blinker
- light.turn_off: bulli_left_headlight
- light.turn_off: bulli_right_headlight
- light.turn_off: bulli_left_backlight
- light.turn_off: bulli_right_backlight
- light.turn_off: bulli_interior_lighting
- delay: 2s
- light.turn_on: bulli_left_blinker
- delay: 2s
- light.turn_off: bulli_left_blinker
- light.turn_on: bulli_right_blinker
- delay: 2s
- light.turn_off: bulli_right_blinker
- light.turn_on: bulli_left_headlight
- delay: 2s
- light.turn_off: bulli_left_headlight
- light.turn_on: bulli_right_headlight
- delay: 2s
- light.turn_off: bulli_right_headlight
- light.turn_on: bulli_left_backlight
- delay: 2s
- light.turn_off: bulli_left_backlight
- light.turn_on: bulli_right_backlight
- delay: 2s
- light.turn_off: bulli_right_backlight
- light.turn_on: bulli_interior_lighting
- delay: 2s
- light.turn_off: bulli_interior_lighting
ota:
password: "3d5584e2ee6a8adda315ae545bdf117c"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.96
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "FkyRO7G4neIE"
captive_portal:
light:
- platform: binary
output: output_bulli_left_blinker
id: bulli_left_blinker
name: "Bulli left blinker"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_right_blinker
id: bulli_right_blinker
name: "Bulli right blinker"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_left_headlight
id: bulli_left_headlight
name: "Bulli left headlight"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_right_headlight
id: bulli_right_headlight
name: "Bulli right headlight"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_left_backlight
id: bulli_left_backlight
name: "Bulli left backlight"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_right_backlight
id: bulli_right_backlight
name: "Bulli right backlight"
restore_mode: ALWAYS_OFF
- platform: binary
output: output_bulli_interior_lighting
id: bulli_interior_lighting
name: "Bulli interior lighting"
restore_mode: ALWAYS_OFF
output:
- platform: gpio
pin: D1
id: output_bulli_left_blinker
- platform: gpio
pin: D2
id: output_bulli_right_blinker
- platform: gpio
pin: D3
id: output_bulli_left_headlight
- platform: gpio
pin: D4
id: output_bulli_right_headlight
- platform: gpio
pin: D5
id: output_bulli_left_backlight
- platform: gpio
pin: D6
id: output_bulli_right_backlight
- platform: gpio
pin: D7
id: output_bulli_interior_lighting
# Buzzer D6
- platform: esp8266_pwm
pin: D8
frequency: 1000 Hz
id: rtttl_out
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
rtttl:
output: rtttl_out
on_finished_playback:
- logger.log: 'Song ended!'
+163
View File
@@ -0,0 +1,163 @@
substitutions:
devicename: og-wz-us-room
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
# encryption:
# key: "/4G+RLEH9pq9vc3lCO1RDXK8DmM4PyGuS0Hf7+jdobs="
ota:
password: "9238a989206f8f05e5dfe8b741eb0005"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.100
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "DSFKr3I1aBXy"
captive_portal:
# Example configuration entry
light:
- platform: neopixelbus
id: neopixel
name: "NeoPixel Light"
type: RGB
variant: WS2812
pin: RX
num_leds: 12
internal: true
- platform: partition
name: "Status LED 01"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 0
to: 0
- platform: partition
name: "Status LED 02"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 1
to: 1
- platform: partition
name: "Status LED 03"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 2
to: 2
- platform: partition
name: "Status LED 04"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 3
to: 3
- platform: partition
name: "Status LED 05"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 4
to: 4
- platform: partition
name: "Status LED 06"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 5
to: 5
- platform: partition
name: "Status LED 07"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 6
to: 6
- platform: partition
name: "Status LED 08"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 7
to: 7
- platform: partition
name: "Status LED 09"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 8
to: 8
- platform: partition
name: "Status LED 10"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 9
to: 9
- platform: partition
name: "Status LED 11"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 10
to: 10
- platform: partition
name: "Status LED 12"
segments:
# Use first 10 LEDs from the light with ID light1
- id: neopixel
from: 11
to: 11
binary_sensor:
- platform: gpio
pin:
number: D3
mode: INPUT_PULLUP
name: "${devicename} Radar Sensor"
device_class: motion
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
+144
View File
@@ -0,0 +1,144 @@
substitutions:
devicename: og-wz-us-tag
esphome:
name: ${devicename}
platform: ESP8266
board: nodemcuv2
# Enable logging
logger:
# Enable Home Assistant API
api:
services:
- service: write_tag_random
then:
- lambda: |-
static const char alphanum[] = "0123456789abcdef";
std::string uri = "//www.home-assistant.io/tag/";
for (int i = 0; i < 8; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
for (int j = 0; j < 3; j++) {
for (int i = 0; i < 4; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
uri += "-";
}
for (int i = 0; i < 12; i++)
uri += alphanum[random_uint32() % (sizeof(alphanum) - 1)];
auto message = new nfc::NdefMessage();
message->add_uri_record(uri);
ESP_LOGD("tagreader", "Writing payload: %s", uri.c_str());
id(pn532_board).write_mode(message);
- service: write_tag_id
variables:
tag_id: string
then:
- lambda: |-
auto message = new nfc::NdefMessage();
std::string uri = "//www.home-assistant.io/tag/";
uri += tag_id;
message->add_uri_record(uri);
id(pn532_board).write_mode(message);
- service: clean_tag
then:
- lambda: 'id(pn532_board).clean_mode();'
- service: cancel_writing
then:
- lambda: 'id(pn532_board).read_mode();'
ota:
password: "f0e515a756b864724c599f2d077461a8"
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
manual_ip:
static_ip: 192.168.1.97
gateway: 192.168.1.1
subnet: 255.255.255.0
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "${devicename}"
password: "1GVz2hcMlG2o"
captive_portal:
switch:
- platform: restart
name: "${devicename} Neustart"
sensor:
- platform: wifi_signal
name: "${devicename} Wi-Fi Signal"
update_interval: 60s
- platform: uptime
name: "${devicename} Uptime"
update_interval: 60s
# Reader
# GPIO ⇄ SDA: D1
# GPIO → SCL: D2
# Reset PIN D5
# PN 532
# 0x3C (60) Display
# 0x3C (61) Reader ???
# schau mal beim sensor esp05 og-az-us-room
i2c:
sda: D1
scl: D2
scan: true
id: bus_a
pn532_i2c:
update_interval: 1s
id: pn532_board
on_tag:
then:
- homeassistant.tag_scanned: !lambda |
if (!tag.has_ndef_message()) {
ESP_LOGD("tagreader", "No NDEF");
return x;
}
auto message = tag.get_ndef_message();
auto records = message->get_records();
for (auto &record : records) {
std::string payload = record->get_payload();
size_t pos = payload.find("//www.home-assistant.io/tag/");
if (pos != std::string::npos) {
return payload.substr(pos + 34);
}
}
ESP_LOGD("tagreader", "Bad NDEF, fallback to uid");
return x;
binary_sensor:
- platform: pn532
uid: 74-10-37-94
name: "${devicename} NFC Tag"
text_sensor:
- platform: homeassistant
entity_id: "sensor.og_wz_us_tag_display_text"
name: "${devicename} Display Text"
id: info_state
display:
- platform: ssd1306_i2c
model: "SSD1306 128x64"
#reset_pin: D0
address: 0x3C
rotation: 180
lambda: |-
//Printf "Alarm State: <state>" in top center
it.printf(64, 0, id(my_font), TextAlign::TOP_RIGHT, "Info: %s", id(info_state).state.c_str());
font:
- file: "fonts/Comic Sans MS.ttf"
id: my_font
size: 20