Initial commit
This commit is contained in:
5
Kuba/packages/i2c.yaml
Normal file
5
Kuba/packages/i2c.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
i2c:
|
||||
sda: 13
|
||||
scl: 16
|
||||
scan: True
|
||||
frequency: 200kHz
|
||||
97
Kuba/packages/main-hub.yaml
Normal file
97
Kuba/packages/main-hub.yaml
Normal file
@@ -0,0 +1,97 @@
|
||||
esphome:
|
||||
name: main-hub
|
||||
friendly_name: main-hub
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
logger:
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: "eyBNZWDUaBDCTIZsSIUzwHFpUcm/Kbc9UAWjX++ToL4="
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: "000f95472f1adc514d45abdc280a3903"
|
||||
|
||||
#wifi:
|
||||
# ssid: !secret wifi_ssid
|
||||
# password: !secret wifi_password
|
||||
#
|
||||
# ap:
|
||||
# ssid: "Main-Hub Fallback Hotspot"
|
||||
# password: "y0LGSOyT5tjJ"
|
||||
|
||||
#captive_portal:
|
||||
|
||||
web_server:
|
||||
port: 80
|
||||
|
||||
ethernet:
|
||||
type: LAN8720
|
||||
mdc_pin: GPIO23
|
||||
mdio_pin: GPIO18
|
||||
clk_mode: GPIO17_OUT
|
||||
phy_addr: 0
|
||||
power_pin: GPIO12
|
||||
|
||||
button:
|
||||
- platform: restart
|
||||
name: "main-hub Restart"
|
||||
|
||||
packages:
|
||||
i2c: !include packages/i2c.yaml
|
||||
pca9685: !include packages/pca9685.yaml
|
||||
mcp23017_outputs: !include packages/mcp23017_outputs.yaml
|
||||
mcp23017_inputs: !include packages/mcp23017_inputs.yaml
|
||||
scripts: !include packages/scripts.yaml
|
||||
|
||||
esp32_ble_tracker:
|
||||
|
||||
sensor:
|
||||
- platform: uptime
|
||||
type: seconds
|
||||
name: Uptime Sensor
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "A4:C1:38:C5:11:58"
|
||||
temperature:
|
||||
name: "Biuro Temperatura"
|
||||
humidity:
|
||||
name: "Biuro Nawilżenie"
|
||||
battery_level:
|
||||
name: "Biuro Bateria"
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "A4:C1:38:5C:4F:38"
|
||||
temperature:
|
||||
name: "Serwer Temperatura"
|
||||
humidity:
|
||||
name: "Serwer Nawilżenie"
|
||||
battery_level:
|
||||
name: "Serwer Bateria"
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "A4:C1:38:67:6B:94"
|
||||
temperature:
|
||||
name: "Kuchnia Temperatura"
|
||||
humidity:
|
||||
name: "Kuchnia Nawilżenie"
|
||||
battery_level:
|
||||
name: "Kuchnia Bateria"
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "A4:C1:38:C9:FE:CA"
|
||||
temperature:
|
||||
name: "WC Temperatura"
|
||||
humidity:
|
||||
name: "WC Nawilżenie"
|
||||
battery_level:
|
||||
name: "WC Bateria"
|
||||
- platform: atc_mithermometer
|
||||
mac_address: "A4:C1:38:63:6D:DB"
|
||||
temperature:
|
||||
name: "Łazienka Temperatura"
|
||||
humidity:
|
||||
name: "Łazienka Nawilżenie"
|
||||
battery_level:
|
||||
name: "Łazienka Bateria"
|
||||
884
Kuba/packages/mcp23017_inputs.yaml
Normal file
884
Kuba/packages/mcp23017_inputs.yaml
Normal file
@@ -0,0 +1,884 @@
|
||||
mcp23017:
|
||||
- id: "mcp23xxx_hub1_IN"
|
||||
address: 0x20
|
||||
- id: "mcp23xxx_hub2_IN"
|
||||
address: 0x22
|
||||
- id: "mcp23xxx_hub3_IN"
|
||||
address: 0x24
|
||||
|
||||
|
||||
binary_sensor:
|
||||
##################
|
||||
#mcp23xxx_hub1_IN#
|
||||
##################
|
||||
|
||||
# Wejście 1 — single: halogeny wejście, triple: wyłącz lampy, long: wyłącz wentylatory
|
||||
- platform: gpio
|
||||
name: "hub1_in0"
|
||||
id: hub1_in0
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 0
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out15
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Wejście 3 — brak automatyzacji w Node-RED
|
||||
- platform: gpio
|
||||
name: "hub1_in1"
|
||||
id: hub1_in1
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 1
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
|
||||
# Wejście 2 — single: hub1_out14, triple: WLED korytarz kinkiety
|
||||
- platform: gpio
|
||||
name: "hub1_in2"
|
||||
id: hub1_in2
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 2
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out14
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_korytarz_kinkiety_toggle
|
||||
|
||||
# Sypialnia 3 — single: turn_on hub2_out12+hub2_out1, double: toggle hub2_out12+hub2_out1
|
||||
- platform: gpio
|
||||
name: "hub1_in3"
|
||||
id: hub1_in3
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 3
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.turn_on: hub2_out12
|
||||
- light.turn_on: hub2_out1
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out12
|
||||
- light.toggle: hub2_out1
|
||||
|
||||
# Sypialnia 1 — single: sypialnia LED
|
||||
- platform: gpio
|
||||
name: "hub1_in4"
|
||||
id: hub1_in4
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 4
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: sypialnia_led
|
||||
|
||||
# Sypialnia 2 — single: hub2_out7
|
||||
- platform: gpio
|
||||
name: "hub1_in5"
|
||||
id: hub1_in5
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 5
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out7
|
||||
|
||||
# Sypialnia Łóżko Prawa Strona — single: hub2_out1, double: hub2_out12+hub2_out1, long: wyłącz wszystkie
|
||||
- platform: gpio
|
||||
name: "hub1_in6"
|
||||
id: hub1_in6
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 6
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out1
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out12
|
||||
- light.toggle: hub2_out1
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Sypialnia Łóżko Lewa Strona — single: hub2_out12, double: hub2_out12+hub2_out1, long: wyłącz wszystkie
|
||||
- platform: gpio
|
||||
name: "hub1_in7"
|
||||
id: hub1_in7
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 7
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out12
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out12
|
||||
- light.toggle: hub2_out1
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Niebieski Pokój Lewy — single: hub2_out10, double: hub1_out7
|
||||
- platform: gpio
|
||||
name: "hub1_in8"
|
||||
id: hub1_in8
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 8
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out10
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out7
|
||||
|
||||
# Niebieski Pokój Prawy — bezpośredni toggle pokój dla gości LED (bez gestów)
|
||||
- platform: gpio
|
||||
name: "hub1_in9"
|
||||
id: hub1_in9
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 9
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_click:
|
||||
min_length: 50ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- light.toggle: pokoj_dla_gosci_led
|
||||
|
||||
# Nie podpięte
|
||||
- platform: gpio
|
||||
name: "hub1_in10"
|
||||
id: hub1_in10
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 10
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub1_in11"
|
||||
id: hub1_in11
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 11
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub1_in12"
|
||||
id: hub1_in12
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 12
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub1_in13"
|
||||
id: hub1_in13
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 13
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub1_in14"
|
||||
id: hub1_in14
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 14
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub1_in15"
|
||||
id: hub1_in15
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub1_IN
|
||||
number: 15
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
|
||||
##################
|
||||
#mcp23xxx_hub2_IN#
|
||||
##################
|
||||
|
||||
# Korytarz 2 — single: hub1_out15
|
||||
- platform: gpio
|
||||
name: "hub2_in0"
|
||||
id: hub2_in0
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 0
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out15
|
||||
|
||||
# Korytarz 3 — single: WLED korytarz kinkiety, long: wyłącz wszystkie
|
||||
- platform: gpio
|
||||
name: "hub2_in1"
|
||||
id: hub2_in1
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 1
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_korytarz_kinkiety_toggle
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Korytarz 1 — single: hub1_out14, long: wyłącz wszystkie
|
||||
- platform: gpio
|
||||
name: "hub2_in2"
|
||||
id: hub2_in2
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 2
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out14
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Mały Korytarz — brak automatyzacji w Node-RED
|
||||
- platform: gpio
|
||||
name: "hub2_in3"
|
||||
id: hub2_in3
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 3
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
|
||||
# Garderoba Mała — single: hub2_out14, double: hub3_out2 (wentylator)
|
||||
- platform: gpio
|
||||
name: "hub2_in4"
|
||||
id: hub2_in4
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 4
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out14
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub3_out2
|
||||
|
||||
# Kuchnia 3_1 — single: hub1_out8
|
||||
- platform: gpio
|
||||
name: "hub2_in5"
|
||||
id: hub2_in5
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 5
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out8
|
||||
|
||||
# Kuchnia 3_2 — single: jadalnia LED
|
||||
- platform: gpio
|
||||
name: "hub2_in6"
|
||||
id: hub2_in6
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 6
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: jadalnia_led
|
||||
|
||||
# Kuchnia 2_1 — single: hub1_out3, triple: wyłącz lampy, long: wyłącz wentylatory
|
||||
- platform: gpio
|
||||
name: "hub2_in7"
|
||||
id: hub2_in7
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 7
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out3
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Kuchnia 2_2 — single: kuchnia łezka LED
|
||||
- platform: gpio
|
||||
name: "hub2_in8"
|
||||
id: hub2_in8
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 8
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: kuchnia_lezka_led
|
||||
|
||||
# Kuchnia 1_1 — single: hub2_out11, double: WLED salon wentylator
|
||||
- platform: gpio
|
||||
name: "hub2_in9"
|
||||
id: hub2_in9
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 9
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out11
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_salon_wentylator_toggle
|
||||
|
||||
# Kuchnia 1_2 — single: WLED komin+salon kinkiety toggle, double: WLED komin on, long: WLED komin on
|
||||
- platform: gpio
|
||||
name: "hub2_in10"
|
||||
id: hub2_in10
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 10
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_komin_toggle
|
||||
- script.execute: wled_salon_kinkiety_toggle
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_komin_on
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_komin_on
|
||||
|
||||
# Schody 3 — single: WLED oczka taras + skrzynia + tunel + zwis schody toggle
|
||||
- platform: gpio
|
||||
name: "hub2_in11"
|
||||
id: hub2_in11
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 11
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_schody_all_toggle
|
||||
|
||||
# Schody 1 — single: hub2_out11
|
||||
- platform: gpio
|
||||
name: "hub2_in12"
|
||||
id: hub2_in12
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 12
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out11
|
||||
|
||||
# Schody 2 — single: WLED salon kinkiety toggle, double: WLED salon kinkiety off, long: WLED komin toggle
|
||||
- platform: gpio
|
||||
name: "hub2_in13"
|
||||
id: hub2_in13
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 13
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_salon_kinkiety_toggle
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_salon_kinkiety_off
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: wled_komin_toggle
|
||||
|
||||
# Nie podpięte
|
||||
- platform: gpio
|
||||
name: "hub2_in14"
|
||||
id: hub2_in14
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 14
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub2_in15"
|
||||
id: hub2_in15
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub2_IN
|
||||
number: 15
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
|
||||
##################
|
||||
#mcp23xxx_hub3_IN#
|
||||
##################
|
||||
|
||||
# Garderoba Duża Lewy — single: hub1_out7
|
||||
- platform: gpio
|
||||
name: "hub3_in0"
|
||||
id: hub3_in0
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 0
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out7
|
||||
|
||||
# Garderoba Duża Prawy — single: hub1_out7
|
||||
- platform: gpio
|
||||
name: "hub3_in1"
|
||||
id: hub3_in1
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 1
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out7
|
||||
|
||||
# SPA Lewy — single: hub2_out13, triple: hub1_out4 (wentylator)
|
||||
- platform: gpio
|
||||
name: "hub3_in2"
|
||||
id: hub3_in2
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 2
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out13
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out4
|
||||
|
||||
# SPA Prawy — single: hub1_out4+hub1_out10, triple: SPA Ledy
|
||||
- platform: gpio
|
||||
name: "hub3_in3"
|
||||
id: hub3_in3
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 3
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out4
|
||||
- light.toggle: hub1_out10
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: spa_ledy
|
||||
|
||||
# Biała Łazienka Ściana — single: hub2_out0, double: biała łazienka wanna LED, long: hub2_out8 (wentylator)
|
||||
- platform: gpio
|
||||
name: "hub3_in4"
|
||||
id: hub3_in4
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 4
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out0
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: biala_lazienka_wanna_led
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out8
|
||||
|
||||
# Małe WC Lustro Prawy — bezpośredni toggle hub2_out2 + WLED wc_led + hub2_out5 (wentylator)
|
||||
- platform: gpio
|
||||
name: "hub3_in5"
|
||||
id: hub3_in5
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 5
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_click:
|
||||
min_length: 50ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- light.toggle: hub2_out2
|
||||
- light.toggle: hub2_out5
|
||||
- script.execute: wled_wc_led_toggle
|
||||
|
||||
# Małe WC Lustro Lewy — bezpośredni toggle hub1_out9
|
||||
- platform: gpio
|
||||
name: "hub3_in6"
|
||||
id: hub3_in6
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 6
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_click:
|
||||
min_length: 50ms
|
||||
max_length: 1000ms
|
||||
then:
|
||||
- light.toggle: hub1_out9
|
||||
|
||||
# Biała Łazienka Skos — single: hub2_out4
|
||||
- platform: gpio
|
||||
name: "hub3_in7"
|
||||
id: hub3_in7
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 7
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub2_out4
|
||||
|
||||
# SPA Lustro Lewy — single: hub1_out5
|
||||
- platform: gpio
|
||||
name: "hub3_in8"
|
||||
id: hub3_in8
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 8
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out5
|
||||
|
||||
# SPA Lustro Prawy — single: hub1_out1
|
||||
- platform: gpio
|
||||
name: "hub3_in9"
|
||||
id: hub3_in9
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 9
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out1
|
||||
|
||||
# Biuro Skos — single: hub1_out2, double: serwer LED wyłącz
|
||||
- platform: gpio
|
||||
name: "hub3_in10"
|
||||
id: hub3_in10
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 10
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out2
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.turn_off: serwer_led
|
||||
|
||||
# Serwer Prawy — single: serwer LED, double: hub1_out2, triple: hub3_out2 (wentylator)
|
||||
- platform: gpio
|
||||
name: "hub3_in11"
|
||||
id: hub3_in11
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 11
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: serwer_led
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out2
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub3_out2
|
||||
|
||||
# Serwer Lewy — single: hub1_out14, triple: wyłącz lampy, long: wyłącz wentylatory
|
||||
- platform: gpio
|
||||
name: "hub3_in12"
|
||||
id: hub3_in12
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 12
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
on_multi_click:
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- light.toggle: hub1_out14
|
||||
- timing:
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at most 350ms
|
||||
- ON for at most 350ms
|
||||
- OFF for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_lights
|
||||
- timing:
|
||||
- ON for at least 350ms
|
||||
then:
|
||||
- script.execute: off_all_fans
|
||||
|
||||
# Nie podpięte
|
||||
- platform: gpio
|
||||
name: "hub3_in13"
|
||||
id: hub3_in13
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 13
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub3_in14"
|
||||
id: hub3_in14
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 14
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
- platform: gpio
|
||||
name: "hub3_in15"
|
||||
id: hub3_in15
|
||||
pin:
|
||||
mcp23xxx: mcp23xxx_hub3_IN
|
||||
number: 15
|
||||
mode: INPUT
|
||||
inverted: True
|
||||
407
Kuba/packages/mcp23017_outputs.yaml
Normal file
407
Kuba/packages/mcp23017_outputs.yaml
Normal file
@@ -0,0 +1,407 @@
|
||||
mcp23017:
|
||||
- id: "mcp23xxx_hub1_OUT"
|
||||
address: 0x21
|
||||
- id: "mcp23xxx_hub2_OUT"
|
||||
address: 0x23
|
||||
- id: "mcp23xxx_hub3_OUT"
|
||||
address: 0x25
|
||||
|
||||
|
||||
output:
|
||||
# MCP23017 GPIO outputs — hub1
|
||||
- platform: gpio
|
||||
id: hub1_out0_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 0, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out1_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 1, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out2_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 2, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out3_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 3, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out4_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 4, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out5_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 5, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out6_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 6, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out7_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 7, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out8_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 8, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out9_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 9, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out10_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 10, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out11_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 11, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out12_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 12, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out13_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 13, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out14_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 14, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub1_out15_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub1_OUT, number: 15, mode: OUTPUT, inverted: False}
|
||||
|
||||
# MCP23017 GPIO outputs — hub2
|
||||
- platform: gpio
|
||||
id: hub2_out0_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 0, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out1_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 1, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out2_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 2, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out3_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 3, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out4_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 4, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out5_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 5, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out6_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 6, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out7_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 7, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out8_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 8, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out9_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 9, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out10_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 10, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out11_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 11, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out12_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 12, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out13_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 13, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out14_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 14, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub2_out15_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub2_OUT, number: 15, mode: OUTPUT, inverted: False}
|
||||
|
||||
# MCP23017 GPIO outputs — hub3
|
||||
- platform: gpio
|
||||
id: hub3_out0_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 0, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out1_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 1, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out2_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 2, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out3_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 3, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out4_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 4, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out5_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 5, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out6_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 6, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out7_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 7, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out8_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 8, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out9_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 9, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out10_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 10, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out11_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 11, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out12_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 12, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out13_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 13, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out14_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 14, mode: OUTPUT, inverted: False}
|
||||
- platform: gpio
|
||||
id: hub3_out15_gpio
|
||||
pin: {mcp23xxx: mcp23xxx_hub3_OUT, number: 15, mode: OUTPUT, inverted: False}
|
||||
|
||||
|
||||
light:
|
||||
# hub1 outputs
|
||||
- platform: binary
|
||||
name: "hub1_out0"
|
||||
id: hub1_out0
|
||||
output: hub1_out0_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out1"
|
||||
id: hub1_out1
|
||||
output: hub1_out1_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out2"
|
||||
id: hub1_out2
|
||||
output: hub1_out2_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out3"
|
||||
id: hub1_out3
|
||||
output: hub1_out3_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out4" # Fan: SPA/Łazienka
|
||||
id: hub1_out4
|
||||
output: hub1_out4_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out5"
|
||||
id: hub1_out5
|
||||
output: hub1_out5_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out6"
|
||||
id: hub1_out6
|
||||
output: hub1_out6_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out7"
|
||||
id: hub1_out7
|
||||
output: hub1_out7_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out8"
|
||||
id: hub1_out8
|
||||
output: hub1_out8_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out9"
|
||||
id: hub1_out9
|
||||
output: hub1_out9_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out10"
|
||||
id: hub1_out10
|
||||
output: hub1_out10_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out11"
|
||||
id: hub1_out11
|
||||
output: hub1_out11_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out12"
|
||||
id: hub1_out12
|
||||
output: hub1_out12_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out13"
|
||||
id: hub1_out13
|
||||
output: hub1_out13_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out14"
|
||||
id: hub1_out14
|
||||
output: hub1_out14_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub1_out15"
|
||||
id: hub1_out15
|
||||
output: hub1_out15_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
# hub2 outputs
|
||||
- platform: binary
|
||||
name: "hub2_out0"
|
||||
id: hub2_out0
|
||||
output: hub2_out0_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out1"
|
||||
id: hub2_out1
|
||||
output: hub2_out1_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out2"
|
||||
id: hub2_out2
|
||||
output: hub2_out2_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out3"
|
||||
id: hub2_out3
|
||||
output: hub2_out3_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out4"
|
||||
id: hub2_out4
|
||||
output: hub2_out4_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out5" # Fan: Małe WC
|
||||
id: hub2_out5
|
||||
output: hub2_out5_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out6"
|
||||
id: hub2_out6
|
||||
output: hub2_out6_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out7"
|
||||
id: hub2_out7
|
||||
output: hub2_out7_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out8" # Fan: Biała Łazienka
|
||||
id: hub2_out8
|
||||
output: hub2_out8_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out9"
|
||||
id: hub2_out9
|
||||
output: hub2_out9_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out10"
|
||||
id: hub2_out10
|
||||
output: hub2_out10_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out11"
|
||||
id: hub2_out11
|
||||
output: hub2_out11_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out12"
|
||||
id: hub2_out12
|
||||
output: hub2_out12_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out13"
|
||||
id: hub2_out13
|
||||
output: hub2_out13_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out14"
|
||||
id: hub2_out14
|
||||
output: hub2_out14_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub2_out15"
|
||||
id: hub2_out15
|
||||
output: hub2_out15_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
|
||||
# hub3 outputs
|
||||
- platform: binary
|
||||
name: "hub3_out0"
|
||||
id: hub3_out0
|
||||
output: hub3_out0_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out1"
|
||||
id: hub3_out1
|
||||
output: hub3_out1_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out2" # Fan: Biuro/Serwer
|
||||
id: hub3_out2
|
||||
output: hub3_out2_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out3"
|
||||
id: hub3_out3
|
||||
output: hub3_out3_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out4"
|
||||
id: hub3_out4
|
||||
output: hub3_out4_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out5"
|
||||
id: hub3_out5
|
||||
output: hub3_out5_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out6"
|
||||
id: hub3_out6
|
||||
output: hub3_out6_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out7"
|
||||
id: hub3_out7
|
||||
output: hub3_out7_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out8"
|
||||
id: hub3_out8
|
||||
output: hub3_out8_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out9"
|
||||
id: hub3_out9
|
||||
output: hub3_out9_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out10"
|
||||
id: hub3_out10
|
||||
output: hub3_out10_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out11"
|
||||
id: hub3_out11
|
||||
output: hub3_out11_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out12"
|
||||
id: hub3_out12
|
||||
output: hub3_out12_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out13"
|
||||
id: hub3_out13
|
||||
output: hub3_out13_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out14"
|
||||
id: hub3_out14
|
||||
output: hub3_out14_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
- platform: binary
|
||||
name: "hub3_out15"
|
||||
id: hub3_out15
|
||||
output: hub3_out15_gpio
|
||||
restore_mode: ALWAYS_OFF
|
||||
221
Kuba/packages/pca9685.yaml
Normal file
221
Kuba/packages/pca9685.yaml
Normal file
@@ -0,0 +1,221 @@
|
||||
pca9685:
|
||||
- frequency: 1500
|
||||
address: 0x40
|
||||
id: "pca9685_hub1"
|
||||
- frequency: 1500
|
||||
address: 0x41
|
||||
id: "pca9685_hub2"
|
||||
|
||||
|
||||
output:
|
||||
# Status RGB LED (ledc)
|
||||
- platform: ledc
|
||||
id: output_blue
|
||||
pin: 5
|
||||
- platform: ledc
|
||||
id: output_green
|
||||
pin: 14
|
||||
- platform: ledc
|
||||
id: output_red
|
||||
pin: 15
|
||||
|
||||
# PCA9685 Hub1 — kanały PWM
|
||||
- platform: pca9685
|
||||
id: 'PWM1_1_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 0
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM1_2_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 1
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM2_1_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 2
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM2_2_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 3
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM3_1_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 4
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM3_2_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 8
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM4_1_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 6
|
||||
min_power: 0%
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM4_2_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 7
|
||||
min_power: 0%
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM5_1_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 12
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM5_2_Hub1'
|
||||
pca9685_id: 'pca9685_hub1'
|
||||
channel: 13
|
||||
max_power: 75%
|
||||
|
||||
# PCA9685 Hub2 — kanały PWM
|
||||
- platform: pca9685
|
||||
id: 'PWM1_1_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 0
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM1_2_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 1
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM2_1_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 2
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM2_2_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 3
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM3_1_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 4
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM3_2_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 5
|
||||
max_power: 95%
|
||||
- platform: pca9685
|
||||
id: 'PWM4_1_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 10
|
||||
max_power: 95%
|
||||
- platform: pca9685
|
||||
id: 'PWM4_2_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 13
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM5_1_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 11
|
||||
max_power: 75%
|
||||
- platform: pca9685
|
||||
id: 'PWM5_2_Hub2'
|
||||
pca9685_id: 'pca9685_hub2'
|
||||
channel: 15
|
||||
max_power: 75%
|
||||
|
||||
|
||||
light:
|
||||
- platform: rgb
|
||||
name: "Status LED"
|
||||
red: output_red
|
||||
green: output_green
|
||||
blue: output_blue
|
||||
effects:
|
||||
- pulse:
|
||||
name: "Fast Pulse"
|
||||
transition_length: 0.5s
|
||||
update_interval: 0.5s
|
||||
- pulse:
|
||||
name: "Slow Pulse"
|
||||
transition_length: 1s
|
||||
update_interval: 1s
|
||||
- random:
|
||||
name: "Random Effect"
|
||||
transition_length: 1s
|
||||
update_interval: 2s
|
||||
|
||||
- platform: cwww
|
||||
name: "Serwer LED"
|
||||
id: serwer_led
|
||||
cold_white: PWM2_1_Hub1
|
||||
warm_white: PWM2_2_Hub1
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: cwww
|
||||
name: "Jadalnia LED"
|
||||
id: jadalnia_led
|
||||
cold_white: PWM4_2_Hub1
|
||||
warm_white: PWM4_1_Hub1
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: cwww
|
||||
name: "Biała Łazienka wanna LED"
|
||||
id: biala_lazienka_wanna_led
|
||||
cold_white: PWM5_2_Hub1
|
||||
warm_white: PWM5_1_Hub1
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: monochromatic
|
||||
name: "Kuchnia Łezka LED"
|
||||
id: kuchnia_lezka_led
|
||||
output: PWM2_1_Hub2
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: cwww
|
||||
name: "SPA Ledy"
|
||||
id: spa_ledy
|
||||
cold_white: PWM5_2_Hub2
|
||||
warm_white: PWM5_1_Hub2
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: cwww
|
||||
name: "Pokój dla gości LED"
|
||||
id: pokoj_dla_gosci_led
|
||||
cold_white: PWM3_2_Hub2
|
||||
warm_white: PWM4_1_Hub2
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
default_transition_length: 2.0s
|
||||
|
||||
- platform: monochromatic
|
||||
name: "TEST LED 1"
|
||||
id: test_led_1
|
||||
output: PWM1_2_Hub2
|
||||
|
||||
- platform: monochromatic
|
||||
name: "TEST LED 2"
|
||||
id: test_led_2
|
||||
output: PWM3_1_Hub2
|
||||
|
||||
- platform: rgbww
|
||||
name: "Sypialnia LED"
|
||||
id: sypialnia_led
|
||||
red: PWM1_1_Hub1
|
||||
green: PWM1_2_Hub1
|
||||
blue: PWM3_1_Hub1
|
||||
cold_white: PWM3_2_Hub1
|
||||
warm_white: PWM1_1_Hub2
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
color_interlock: false
|
||||
default_transition_length: 2.0s
|
||||
114
Kuba/packages/scripts.yaml
Normal file
114
Kuba/packages/scripts.yaml
Normal file
@@ -0,0 +1,114 @@
|
||||
script:
|
||||
# ── Wyłącz wszystkie lampy ───────────────────────────────────────────────
|
||||
- id: off_all_lights
|
||||
then:
|
||||
- light.turn_off: serwer_led
|
||||
- light.turn_off: jadalnia_led
|
||||
- light.turn_off: biala_lazienka_wanna_led
|
||||
- light.turn_off: kuchnia_lezka_led
|
||||
- light.turn_off: spa_ledy
|
||||
- light.turn_off: pokoj_dla_gosci_led
|
||||
- light.turn_off: test_led_1
|
||||
- light.turn_off: test_led_2
|
||||
- light.turn_off: sypialnia_led
|
||||
- light.turn_off: hub1_out0
|
||||
- light.turn_off: hub1_out1
|
||||
- light.turn_off: hub1_out2
|
||||
- light.turn_off: hub1_out3
|
||||
- light.turn_off: hub1_out5
|
||||
- light.turn_off: hub1_out6
|
||||
- light.turn_off: hub1_out7
|
||||
- light.turn_off: hub1_out8
|
||||
- light.turn_off: hub1_out9
|
||||
- light.turn_off: hub1_out10
|
||||
- light.turn_off: hub1_out11
|
||||
- light.turn_off: hub1_out12
|
||||
- light.turn_off: hub1_out13
|
||||
- light.turn_off: hub1_out14
|
||||
- light.turn_off: hub1_out15
|
||||
- light.turn_off: hub2_out0
|
||||
- light.turn_off: hub2_out1
|
||||
- light.turn_off: hub2_out2
|
||||
- light.turn_off: hub2_out3
|
||||
- light.turn_off: hub2_out4
|
||||
- light.turn_off: hub2_out6
|
||||
- light.turn_off: hub2_out7
|
||||
- light.turn_off: hub2_out9
|
||||
- light.turn_off: hub2_out10
|
||||
- light.turn_off: hub2_out11
|
||||
- light.turn_off: hub2_out12
|
||||
- light.turn_off: hub2_out13
|
||||
- light.turn_off: hub2_out14
|
||||
- light.turn_off: hub2_out15
|
||||
- light.turn_off: hub3_out0
|
||||
- light.turn_off: hub3_out1
|
||||
- light.turn_off: hub3_out3
|
||||
- light.turn_off: hub3_out4
|
||||
- light.turn_off: hub3_out5
|
||||
- light.turn_off: hub3_out6
|
||||
- light.turn_off: hub3_out7
|
||||
- light.turn_off: hub3_out8
|
||||
- light.turn_off: hub3_out9
|
||||
- light.turn_off: hub3_out10
|
||||
- light.turn_off: hub3_out11
|
||||
- light.turn_off: hub3_out12
|
||||
- light.turn_off: hub3_out13
|
||||
- light.turn_off: hub3_out14
|
||||
- light.turn_off: hub3_out15
|
||||
|
||||
# ── Wyłącz wszystkie wentylatory ─────────────────────────────────────────
|
||||
- id: off_all_fans
|
||||
then:
|
||||
- light.turn_off: hub3_out2 # Fan: Biuro/Serwer
|
||||
- light.turn_off: hub1_out4 # Fan: SPA/Łazienka
|
||||
- light.turn_off: hub2_out5 # Fan: Małe WC
|
||||
- light.turn_off: hub2_out8 # Fan: Biała Łazienka
|
||||
|
||||
# ── WLED placeholders (TODO: zastąpić sterowaniem WLED przez HA/MQTT) ───
|
||||
- id: wled_korytarz_kinkiety_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: korytarz_kinkiety toggle"
|
||||
|
||||
- id: wled_komin_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: komin_led toggle"
|
||||
|
||||
- id: wled_komin_on
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: komin_led turn_on"
|
||||
|
||||
- id: wled_salon_kinkiety_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: salon_kinkiety_led toggle"
|
||||
|
||||
- id: wled_salon_kinkiety_off
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: salon_kinkiety_led turn_off"
|
||||
|
||||
- id: wled_schody_all_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: oczka_taras + skrzynia + tunel + zwis_schody toggle"
|
||||
|
||||
- id: wled_wc_led_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: wc_led toggle"
|
||||
|
||||
- id: wled_salon_wentylator_toggle
|
||||
then:
|
||||
- logger.log:
|
||||
level: INFO
|
||||
format: "WLED PLACEHOLDER: salon_wentylator toggle"
|
||||
Reference in New Issue
Block a user