204 lines
3.4 KiB
YAML
204 lines
3.4 KiB
YAML
esphome:
|
|
name: kc868-a8
|
|
friendly_name: KC868-A8
|
|
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
type: arduino
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
encryption:
|
|
key: "3iphXwtysZ+BHDKmxmTnXKCjASbfFW+W1r6la1n9OIA="
|
|
|
|
ota:
|
|
- platform: esphome
|
|
password: "402f0dc3631f8d2379d60af0df352763"
|
|
|
|
# wifi:
|
|
# ssid: !secret wifi_ssid
|
|
# password: !secret wifi_password
|
|
|
|
# # Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
# ap:
|
|
# ssid: "Kc868-A8 Fallback Hotspot"
|
|
# password: "II3iptTzripY"
|
|
|
|
|
|
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
|
|
|
|
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-light1"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 0
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light2"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 1
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light3"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 2
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light4"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 3
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light5"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 4
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light6"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 5
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light7"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 6
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-light8"
|
|
pin:
|
|
pcf8574: pcf8574_hub_out_1
|
|
number: 7
|
|
mode: OUTPUT
|
|
inverted: true
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
name: "a8-input1"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 0
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input2"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 1
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input3"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 2
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input4"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 3
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input5"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 4
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input6"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 5
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input7"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 6
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- platform: gpio
|
|
name: "a8-input8"
|
|
pin:
|
|
pcf8574: pcf8574_hub_in_1
|
|
number: 7
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
- 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
|
|
|
|
sensor:
|
|
- platform: dallas_temp
|
|
address: 0x1c0000031edd2a28 #replace with your sensor's ID
|
|
name: "ds18b20-1"
|
|
|