Esphome
This commit is contained in:
34
bak.yaml
34
bak.yaml
@@ -37,35 +37,15 @@ status_led:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# switch:
|
switch:
|
||||||
# - platform: gpio
|
- platform: gpio
|
||||||
# pin:
|
pin:
|
||||||
# number: GPIO5
|
number: GPIO5
|
||||||
# inverted: true
|
inverted: true
|
||||||
# name: Relay_komp
|
name: Relay
|
||||||
# id: relay
|
id: relay
|
||||||
# on_turn_off:
|
|
||||||
# then:
|
|
||||||
# - wait_until:
|
|
||||||
# condition:
|
|
||||||
# for:
|
|
||||||
# time: 5s
|
|
||||||
# condition:
|
|
||||||
# lambda: |-
|
|
||||||
# return id(relay).state == true;
|
|
||||||
# - lambda: |-
|
|
||||||
# id(relay).turn_off();
|
|
||||||
|
|
||||||
# one_wire:
|
|
||||||
# - platform: gpio
|
|
||||||
# pin: GPIO14
|
|
||||||
# id: bus14
|
|
||||||
|
|
||||||
# sensor:
|
|
||||||
# - platform: dallas_temp
|
|
||||||
# one_wire_id: bus14
|
|
||||||
# name: "DS18B20_kontroller"
|
|
||||||
# update_interval: 2s
|
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
|
|||||||
302
generator.yaml
302
generator.yaml
@@ -33,262 +33,152 @@ wifi:
|
|||||||
gateway: 192.168.88.1
|
gateway: 192.168.88.1
|
||||||
subnet: 255.255.255.0
|
subnet: 255.255.255.0
|
||||||
|
|
||||||
remote_receiver:
|
uart:
|
||||||
pin: 15
|
- id: rs485
|
||||||
dump:
|
tx_pin: GPIO27
|
||||||
- rc_switch
|
rx_pin: GPIO14
|
||||||
tolerance: 100%
|
baud_rate: 9600
|
||||||
filter: 250us
|
- id: rs232
|
||||||
idle: 4ms
|
tx_pin: GPIO17
|
||||||
buffer_size: 4kb
|
rx_pin: GPIO16
|
||||||
|
baud_rate: 9600
|
||||||
remote_transmitter:
|
|
||||||
pin: 2
|
|
||||||
# RF uses a 100% carrier signal
|
|
||||||
carrier_duty_percent: 100%
|
|
||||||
|
|
||||||
|
|
||||||
|
spi:
|
||||||
|
clk_pin: GPIO18
|
||||||
|
mosi_pin: GPIO23
|
||||||
|
miso_pin: GPIO19
|
||||||
|
# cs pin: GPIO5
|
||||||
|
|
||||||
i2c:
|
i2c:
|
||||||
sda: 4
|
sda: GPIO4
|
||||||
scl: 5
|
scl:
|
||||||
scan: true
|
number: GPIO15
|
||||||
id: bus_a
|
ignore_strapping_warning: true
|
||||||
|
|
||||||
# ethernet:
|
|
||||||
# type: LAN8720
|
|
||||||
# mdc_pin: GPIO23
|
|
||||||
# mdio_pin: GPIO18
|
|
||||||
# clk_mode: GPIO17_OUT
|
|
||||||
# phy_addr: 0
|
|
||||||
# use_address: 192.168.88.27
|
|
||||||
|
|
||||||
# manual_ip:
|
|
||||||
# static_ip: 192.168.88.27
|
|
||||||
# gateway: 192.168.88.1
|
|
||||||
# subnet: 255.255.255.0
|
|
||||||
# dns1: 192.168.88.1
|
|
||||||
|
|
||||||
pcf8574:
|
pcf8574:
|
||||||
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
- id: inputs
|
||||||
|
address: 0x22
|
||||||
|
- id: outputs
|
||||||
address: 0x24
|
address: 0x24
|
||||||
|
|
||||||
- id: 'pcf8574_hub_in_1' # for input channel 1-8
|
time:
|
||||||
address: 0x22
|
- platform: ds1307
|
||||||
|
id: rtc_time
|
||||||
|
|
||||||
# Individual outputs
|
|
||||||
switch:
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output1"
|
|
||||||
id: switch_output1
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 0
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output2"
|
|
||||||
id: switch_output2
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 1
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output3"
|
|
||||||
id: switch_output3
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 2
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output4"
|
|
||||||
id: switch_output4
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 3
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output5"
|
|
||||||
id: switch_output5
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 4
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output6"
|
|
||||||
id: switch_output6
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 5
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output7"
|
|
||||||
id: switch_output7
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 6
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
- platform: gpio
|
|
||||||
name: "a8-output8"
|
|
||||||
id: switch_output8
|
|
||||||
pin:
|
|
||||||
pcf8574: pcf8574_hub_out_1
|
|
||||||
number: 7
|
|
||||||
mode: OUTPUT
|
|
||||||
inverted: true
|
|
||||||
|
|
||||||
binary_sensor:
|
binary_sensor:
|
||||||
- platform: remote_receiver
|
- platform: gpio
|
||||||
name: "remoter1"
|
id: "sw420_vibration"
|
||||||
rc_switch_raw:
|
name: vibration
|
||||||
protocol: 3
|
pin:
|
||||||
code: '000000111110110100001'
|
number: GPIO26
|
||||||
on_press:
|
mode: INPUT
|
||||||
- switch.turn_off: switch_output7
|
device_class: vibration
|
||||||
- switch.turn_on: switch_output6
|
|
||||||
filters:
|
filters:
|
||||||
- delayed_off: 20ms
|
- delayed_off: 5s
|
||||||
|
|
||||||
- platform: remote_receiver
|
|
||||||
name: "remoter2"
|
|
||||||
rc_switch_raw:
|
|
||||||
protocol: 3
|
|
||||||
code: '000000111110110100010'
|
|
||||||
|
|
||||||
on_press:
|
|
||||||
- switch.turn_off: switch_output6
|
|
||||||
- switch.turn_on: switch_output7
|
|
||||||
filters:
|
|
||||||
- delayed_off: 20ms
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input1"
|
name: "KC868-A6-IN-1"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 0
|
number: 0
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output1
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output1
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input2"
|
name: "KC868-A6-IN-2"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 1
|
number: 1
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output2
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output2
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input3"
|
name: "KC868-A6-IN-3"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 2
|
number: 2
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output3
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output3
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input4"
|
name: "KC868-A6-IN-4"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 3
|
number: 3
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output4
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output4
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input5"
|
name: "KC868-A6-IN-5"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 4
|
number: 4
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output5
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output5
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input6"
|
name: "KC868-A6-IN-6"
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: inputs
|
||||||
number: 5
|
number: 5
|
||||||
mode: INPUT
|
mode: INPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output6
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output6
|
|
||||||
|
|
||||||
|
switch:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input7"
|
name: "KC868-A6-RELAY-1"
|
||||||
|
id: relay_1
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: outputs
|
||||||
number: 6
|
number: 0
|
||||||
mode: INPUT
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output7
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output7
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-input8"
|
name: "KC868-A6-RELAY-2"
|
||||||
|
id: relay_2
|
||||||
pin:
|
pin:
|
||||||
pcf8574: pcf8574_hub_in_1
|
pcf8574: outputs
|
||||||
number: 7
|
number: 1
|
||||||
mode: INPUT
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
on_press:
|
|
||||||
- switch.toggle: switch_output8
|
|
||||||
on_release:
|
|
||||||
- switch.toggle: switch_output8
|
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-s3"
|
name: "KC868-A6-RELAY-3"
|
||||||
|
id: relay_3
|
||||||
pin:
|
pin:
|
||||||
number: 32
|
pcf8574: outputs
|
||||||
|
number: 2
|
||||||
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
name: "a8-s4"
|
name: "KC868-A6-RELAY-4"
|
||||||
|
id: relay_4
|
||||||
pin:
|
pin:
|
||||||
number: 33
|
pcf8574: outputs
|
||||||
|
number: 3
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
- platform: gpio
|
||||||
|
name: "KC868-A6-RELAY-5"
|
||||||
|
id: relay_5
|
||||||
|
pin:
|
||||||
|
pcf8574: outputs
|
||||||
|
number: 4
|
||||||
|
mode: OUTPUT
|
||||||
|
inverted: true
|
||||||
|
- platform: gpio
|
||||||
|
name: "KC868-A6-RELAY-6"
|
||||||
|
id: relay_6
|
||||||
|
pin:
|
||||||
|
pcf8574: outputs
|
||||||
|
number: 5
|
||||||
|
mode: OUTPUT
|
||||||
inverted: true
|
inverted: true
|
||||||
|
|
||||||
|
|
||||||
one_wire:
|
one_wire:
|
||||||
- platform: gpio
|
- platform: gpio
|
||||||
pin: GPIO14
|
pin: GPIO32
|
||||||
id: bus14
|
id: bus32
|
||||||
|
|
||||||
|
- platform: gpio
|
||||||
|
pin: GPIO33
|
||||||
|
id: bus33
|
||||||
|
|
||||||
sensor:
|
sensor:
|
||||||
- platform: ina219
|
- platform: ina219
|
||||||
@@ -313,18 +203,14 @@ sensor:
|
|||||||
update_interval: 1s
|
update_interval: 1s
|
||||||
|
|
||||||
- platform: dallas_temp
|
- platform: dallas_temp
|
||||||
one_wire_id: bus14
|
one_wire_id: bus32
|
||||||
name: "DS18B20"
|
name: "DS18B20_motor"
|
||||||
update_interval: 2s
|
update_interval: 2s
|
||||||
on_value_range:
|
|
||||||
- above: 27.0
|
- platform: dallas_temp
|
||||||
then:
|
one_wire_id: bus33
|
||||||
- delay: 10s
|
name: "DS18B20_temp2"
|
||||||
- switch.turn_on: switch_output8
|
update_interval: 10s
|
||||||
- below: 26.5
|
|
||||||
then:
|
|
||||||
- delay: 10s
|
|
||||||
- switch.turn_off: switch_output8
|
|
||||||
|
|
||||||
|
|
||||||
web_server:
|
web_server:
|
||||||
|
|||||||
Reference in New Issue
Block a user