From 197ca0d3ca42a78eeb2939a1b6956591db005565 Mon Sep 17 00:00:00 2001 From: Bart Geesink Date: Mon, 18 Sep 2023 19:23:17 +0200 Subject: [PATCH] Add esphome config files --- esphome/deurbel.yml | 32 +++++++++++++++ esphome/nibemodbus.yaml | 88 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 esphome/deurbel.yml create mode 100644 esphome/nibemodbus.yaml diff --git a/esphome/deurbel.yml b/esphome/deurbel.yml new file mode 100644 index 0000000..989656a --- /dev/null +++ b/esphome/deurbel.yml @@ -0,0 +1,32 @@ +esphome: + name: deurbel + +esp8266: + board: d1_mini + +# Enable logging +logger: + +# Enable Home Assistant API +api: + password: "ncc1701D" + +ota: + password: "ncc1701D" + +wifi: + ssid: "BARTANIET" + password: "ncc1701D" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + ssid: "Deurbel Fallback Hotspot" + password: "jeXv60iAylaV" + +captive_portal: + +binary_sensor: + - platform: gpio + pin: D3 + name: "deurbelsignaal" + device_class: opening diff --git a/esphome/nibemodbus.yaml b/esphome/nibemodbus.yaml new file mode 100644 index 0000000..78b0423 --- /dev/null +++ b/esphome/nibemodbus.yaml @@ -0,0 +1,88 @@ +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