228 lines
3.9 KiB
YAML
228 lines
3.9 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
|
|
|
|
uart:
|
|
- id: rs485
|
|
tx_pin: GPIO27
|
|
rx_pin: GPIO14
|
|
baud_rate: 9600
|
|
- id: rs232
|
|
tx_pin: GPIO17
|
|
rx_pin: GPIO16
|
|
baud_rate: 9600
|
|
|
|
spi:
|
|
clk_pin: GPIO18
|
|
mosi_pin: GPIO23
|
|
miso_pin: GPIO19
|
|
# cs pin: GPIO5
|
|
|
|
i2c:
|
|
sda: GPIO4
|
|
scl:
|
|
number: GPIO15
|
|
ignore_strapping_warning: true
|
|
|
|
pcf8574:
|
|
- id: inputs
|
|
address: 0x22
|
|
- id: outputs
|
|
address: 0x24
|
|
|
|
time:
|
|
- platform: ds1307
|
|
id: rtc_time
|
|
|
|
binary_sensor:
|
|
- platform: gpio
|
|
id: "sw420_vibration"
|
|
name: vibration
|
|
pin:
|
|
number: GPIO26
|
|
mode: INPUT
|
|
device_class: vibration
|
|
filters:
|
|
- delayed_off: 5s
|
|
|
|
|
|
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-1"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 0
|
|
mode: INPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-2"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 1
|
|
mode: INPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-3"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 2
|
|
mode: INPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-4"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 3
|
|
mode: INPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-5"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 4
|
|
mode: INPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-IN-6"
|
|
pin:
|
|
pcf8574: inputs
|
|
number: 5
|
|
mode: INPUT
|
|
inverted: true
|
|
|
|
switch:
|
|
- platform: gpio
|
|
name: "KC868-A6-RELAY-1"
|
|
id: relay_1
|
|
pin:
|
|
pcf8574: outputs
|
|
number: 0
|
|
mode: OUTPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-RELAY-2"
|
|
id: relay_2
|
|
pin:
|
|
pcf8574: outputs
|
|
number: 1
|
|
mode: OUTPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-RELAY-3"
|
|
id: relay_3
|
|
pin:
|
|
pcf8574: outputs
|
|
number: 2
|
|
mode: OUTPUT
|
|
inverted: true
|
|
- platform: gpio
|
|
name: "KC868-A6-RELAY-4"
|
|
id: relay_4
|
|
pin:
|
|
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
|
|
|
|
one_wire:
|
|
- platform: gpio
|
|
pin: GPIO32
|
|
id: bus32
|
|
|
|
- platform: gpio
|
|
pin: GPIO33
|
|
id: bus33
|
|
|
|
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: bus32
|
|
name: "DS18B20_motor"
|
|
update_interval: 2s
|
|
|
|
- platform: dallas_temp
|
|
one_wire_id: bus33
|
|
name: "DS18B20_temp2"
|
|
update_interval: 10s
|
|
|
|
|
|
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 |