89 lines
1.6 KiB
YAML
89 lines
1.6 KiB
YAML
esphome:
|
|
name: nibemodbus
|
|
|
|
esp32:
|
|
board: esp32dev
|
|
framework:
|
|
type: arduino
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
password: ""
|
|
|
|
ota:
|
|
password: ""
|
|
|
|
wifi:
|
|
power_save_mode: none
|
|
ssid: "BARTANIET"
|
|
password: "ncc1701D"
|
|
|
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
ap:
|
|
ssid: "Nibemodbus Fallback Hotspot"
|
|
password: "UgU5PVw37Yec"
|
|
|
|
captive_portal:
|
|
|
|
# Load nibe component
|
|
external_components:
|
|
- source: github://elupus/esphome-nibe
|
|
|
|
# Set pins required for LilyGo T-CAN485 board
|
|
output:
|
|
- platform: gpio
|
|
id: ENABLE_PIN # Enable the chip
|
|
pin:
|
|
number: GPIO19
|
|
inverted: true
|
|
- platform: gpio
|
|
id: SE_PIN # Enable autodirection
|
|
pin:
|
|
number: GPIO17
|
|
inverted: true
|
|
- platform: gpio
|
|
id: ENABLE_5V_PIN # Enable 5V pin for RS485 chip
|
|
pin:
|
|
number: GPIO16
|
|
inverted: true
|
|
|
|
# Configure uart that will be used
|
|
uart:
|
|
rx_pin: GPIO21
|
|
tx_pin: GPIO22
|
|
baud_rate: 9600
|
|
|
|
# Configure NibeGW
|
|
nibegw:
|
|
udp:
|
|
# The target address(s) to send data to. May be a multicast address.
|
|
target:
|
|
- ip: 10.86.0.108
|
|
port: 10090
|
|
|
|
# List of source address to accept data from, may be empty for no filter
|
|
source:
|
|
|
|
acknowledge:
|
|
- MODBUS40
|
|
|
|
# Constant replies to certain requests cabe made
|
|
constants:
|
|
- address: MODBUS40
|
|
token: ACCESSORY
|
|
data: [
|
|
0x0A, # MODBUS version low
|
|
0x00, # MODBUS version high
|
|
0x01, # MODBUS address?
|
|
]
|
|
|
|
# Some helper functions to restart ESPHome from HA
|
|
button:
|
|
- platform: restart
|
|
name: Nibegw Restart
|
|
- platform: safe_mode
|
|
name: Nibegw Safe Mode Boot
|