342 lines
6.3 KiB
YAML
342 lines
6.3 KiB
YAML
esphome:
|
|
name: generator
|
|
friendly_name: generator
|
|
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
type: esp-idf
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
encryption:
|
|
key: "/EFz4JsOw/FQu2RGJEmHg9+xm5/UdBeNbTd6mQbDN/U="
|
|
|
|
ota:
|
|
- platform: esphome
|
|
password: "0dac1ac3f1bae5208cc8ea81356da792"
|
|
|
|
wifi:
|
|
ssid: "SmartHome"
|
|
password: ""
|
|
use_address: 192.168.88.27
|
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
# ap:
|
|
# ssid: "Kc868-A8 Fallback Hotspot"
|
|
# password: "gCJlyJ5kec3y"
|
|
|
|
manual_ip:
|
|
static_ip: 192.168.88.27
|
|
gateway: 192.168.88.1
|
|
subnet: 255.255.255.0
|
|
|
|
remote_receiver:
|
|
pin: 15
|
|
dump:
|
|
- rc_switch
|
|
tolerance: 100%
|
|
filter: 250us
|
|
idle: 4ms
|
|
buffer_size: 4kb
|
|
|
|
remote_transmitter:
|
|
pin: 2
|
|
# RF uses a 100% carrier signal
|
|
carrier_duty_percent: 100%
|
|
|
|
|
|
|
|
i2c:
|
|
sda: 4
|
|
scl: 5
|
|
scan: true
|
|
id: bus_a
|
|
|
|
# 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:
|
|
- id: 'pcf8574_hub_out_1' # for output channel 1-8
|
|
address: 0x24
|
|
|
|
- id: 'pcf8574_hub_in_1' # for input channel 1-8
|
|
address: 0x22
|
|
|
|
|
|
# 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:
|
|
- platform: remote_receiver
|
|
name: "remoter1"
|
|
rc_switch_raw:
|
|
protocol: 3
|
|
code: '000000111110110100001'
|
|
on_press:
|
|
- switch.turn_off: switch_output7
|
|
- switch.turn_on: switch_output6
|
|
filters:
|
|
- delayed_off: 20ms
|
|
|
|
- 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
|
|
name: "a8-input1"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 0
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output1
|
|
on_release:
|
|
- switch.toggle: switch_output1
|
|
|
|
- platform: gpio
|
|
name: "a8-input2"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 1
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output2
|
|
on_release:
|
|
- switch.toggle: switch_output2
|
|
|
|
- platform: gpio
|
|
name: "a8-input3"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 2
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output3
|
|
on_release:
|
|
- switch.toggle: switch_output3
|
|
|
|
- platform: gpio
|
|
name: "a8-input4"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 3
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output4
|
|
on_release:
|
|
- switch.toggle: switch_output4
|
|
|
|
- platform: gpio
|
|
name: "a8-input5"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 4
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output5
|
|
on_release:
|
|
- switch.toggle: switch_output5
|
|
|
|
- platform: gpio
|
|
name: "a8-input6"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 5
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output6
|
|
on_release:
|
|
- switch.toggle: switch_output6
|
|
|
|
- platform: gpio
|
|
name: "a8-input7"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 6
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output7
|
|
on_release:
|
|
- switch.toggle: switch_output7
|
|
|
|
- platform: gpio
|
|
name: "a8-input8"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 7
|
|
mode: INPUT
|
|
inverted: true
|
|
on_press:
|
|
- switch.toggle: switch_output8
|
|
on_release:
|
|
- switch.toggle: switch_output8
|
|
|
|
- platform: gpio
|
|
name: "a8-s3"
|
|
pin:
|
|
number: 32
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-s4"
|
|
pin:
|
|
number: 33
|
|
inverted: true
|
|
|
|
|
|
one_wire:
|
|
- platform: gpio
|
|
pin: GPIO14
|
|
id: bus14
|
|
|
|
sensor:
|
|
- platform: ina219
|
|
address: 0x40
|
|
shunt_resistance: 0.1 ohm
|
|
current:
|
|
name: "INA219 Current"
|
|
unit_of_measurement: "A"
|
|
power:
|
|
name: "INA219 Power"
|
|
unit_of_measurement: "W"
|
|
filters:
|
|
- multiply: 10
|
|
bus_voltage:
|
|
name: "INA219 Bus Voltage"
|
|
unit_of_measurement: "V"
|
|
shunt_voltage:
|
|
name: "INA219 Shunt Voltage"
|
|
unit_of_measurement: "V"
|
|
max_voltage: 32.0V
|
|
max_current: 3.2A
|
|
update_interval: 1s
|
|
|
|
- platform: dallas_temp
|
|
one_wire_id: bus14
|
|
name: "DS18B20"
|
|
update_interval: 2s
|
|
on_value_range:
|
|
- above: 27.0
|
|
then:
|
|
- delay: 10s
|
|
- switch.turn_on: switch_output8
|
|
- below: 26.5
|
|
then:
|
|
- delay: 10s
|
|
- switch.turn_off: switch_output8
|
|
|
|
|
|
web_server:
|
|
port: 80
|
|
auth:
|
|
username: "silver"
|
|
password: "cbvgcjy0"
|
|
|
|
|
|
# mqtt:
|
|
# broker: 192.168.88.4
|
|
# username: 'miroca'
|
|
# password: 'cbvgcjy0'
|
|
# discovery: False # disable entity discovery
|
|
# discover_ip: True # enable device discovery |