From 5d47748ca6cb03c84ab8df837c47557d23200def Mon Sep 17 00:00:00 2001 From: Victor Alexandrovich Tsyrenschikov <77172321+tsyrenschikov@users.noreply.github.com> Date: Sat, 30 Aug 2025 00:12:55 +0500 Subject: [PATCH] EspHome --- config/co2-podval.yaml | 70 +++++ config/gas-kitchen-wemos.yaml | 75 +++++ config/gas-kocheg-wemos.yaml | 58 ++++ config/gas-podval-wemos.yaml | 81 +++++ config/icebox.yaml | 92 ++++++ config/kc868-a6.yaml | 251 ++++++++++++++++ config/kontroller-kocheg-a16.yaml | 482 ++++++++++++++++++++++++++++++ config/kontroller-kocheg-a8.yaml | 223 ++++++++++++++ config/secrets.yaml | 2 + config/teplica-a8.yaml | 231 ++++++++++++++ config/test-kc868-a16.yaml | 114 +++++++ 11 files changed, 1679 insertions(+) create mode 100644 config/co2-podval.yaml create mode 100644 config/gas-kitchen-wemos.yaml create mode 100644 config/gas-kocheg-wemos.yaml create mode 100644 config/gas-podval-wemos.yaml create mode 100644 config/icebox.yaml create mode 100644 config/kc868-a6.yaml create mode 100644 config/kontroller-kocheg-a16.yaml create mode 100644 config/kontroller-kocheg-a8.yaml create mode 100644 config/secrets.yaml create mode 100644 config/teplica-a8.yaml create mode 100644 config/test-kc868-a16.yaml diff --git a/config/co2-podval.yaml b/config/co2-podval.yaml new file mode 100644 index 0000000..b851e7a --- /dev/null +++ b/config/co2-podval.yaml @@ -0,0 +1,70 @@ +esphome: + name: co2-podval + friendly_name: CO2_Podval + +esp8266: + board: esp01_1m + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "ecCAgKCMmTyXFCLxkqhVrQBS4OEUzgyZaSNbF46LpDM=" + +ota: + - platform: esphome + password: "d23e81827fbebdd563f53bce3ca73a6e" + +wifi: + ssid: "SmartHome" + password: "" + # networks: + # ssid: "SmartHome" + # password: "" + # bssid: 78:9A:18:88:E0:79 + # channel: 1 + power_save_mode: none + + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + # ssid: "Gas-Kitchen Fallback Hotspot" + # password: "0n8oXqMAAFPU" + + use_address: 192.168.88.28 + + manual_ip: + static_ip: 192.168.88.28 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + # dns1: 8.8.8.8 + # dns2: 8.8.4.4 + +captive_portal: + +# MQ2 Smoke Gas Sensor +sensor: + - platform: adc + pin: A0 + name: "WeMos D1 Mini Gas Sensor" + unit_of_measurement: "ppm" + icon: "mdi:meter-gas-outline" + update_interval: 1s + filters: + - multiply: 100 + + +# 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 \ No newline at end of file diff --git a/config/gas-kitchen-wemos.yaml b/config/gas-kitchen-wemos.yaml new file mode 100644 index 0000000..3fb091e --- /dev/null +++ b/config/gas-kitchen-wemos.yaml @@ -0,0 +1,75 @@ +esphome: + name: gas-kitchen-wemos + friendly_name: Gas_Kitchen_WeMos + + +esp8266: + board: esp01_1m + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "kBrycQHq/8zzcKw9dcv06c7taI9MOBnXRHKqFcBBRnM=" + +ota: + - platform: esphome + password: "8028833c244a6ebdc6f44b8506ead784" + + + + +wifi: + ssid: "SmartHome" + password: "" + # networks: + # ssid: "SmartHome" + # password: "" + # bssid: 78:9A:18:88:E0:79 + # channel: 1 + power_save_mode: none + + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + # ssid: "Gas-Kitchen Fallback Hotspot" + # password: "0n8oXqMAAFPU" + + use_address: 192.168.88.21 + + manual_ip: + static_ip: 192.168.88.21 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + # dns1: 8.8.8.8 + # dns2: 8.8.4.4 + + + +# # MQ2 Smoke Gas Sensor +sensor: + - platform: adc + pin: A0 + name: "WeMos D1 Mini Gas Sensor" + unit_of_measurement: "ppm" + icon: "mdi:meter-gas-outline" + update_interval: 1s + filters: + - multiply: 100 + + + +# 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 \ No newline at end of file diff --git a/config/gas-kocheg-wemos.yaml b/config/gas-kocheg-wemos.yaml new file mode 100644 index 0000000..ac58619 --- /dev/null +++ b/config/gas-kocheg-wemos.yaml @@ -0,0 +1,58 @@ +esphome: + name: gas-kocheg-wemos + friendly_name: Gas_Kocheg_WeMos + +esp8266: + board: esp01_1m + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "Z+6sofitW8uHBtamgb6BZahY7oEi4eB1PMicfN3uIgo=" + +ota: + - platform: esphome + password: "a0f2390ead71a8493dc8d8850e60b7e7" + +wifi: + ssid: "SmartHome" + password: "" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + # ssid: "Gas-Kitchen Fallback Hotspot" + # password: "0n8oXqMAAFPU" + + use_address: 192.168.88.22 + + manual_ip: + static_ip: 192.168.88.22 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + +captive_portal: + +# MQ2 Smoke Gas Sensor +sensor: + - platform: adc + pin: A0 + name: "WeMos D1 Mini Gas Sensor" + update_interval: 1s + filters: + - multiply: 100 + unit_of_measurement: "ppm" + icon: "mdi:meter-gas-outline" + + +mqtt: + broker: 192.168.88.4 + username: 'miroca' + password: 'cbvgcjy0' + discovery: False # disable entity discovery + discover_ip: True # enable device discovery + +# web_server: +# port: 80 \ No newline at end of file diff --git a/config/gas-podval-wemos.yaml b/config/gas-podval-wemos.yaml new file mode 100644 index 0000000..03a6cea --- /dev/null +++ b/config/gas-podval-wemos.yaml @@ -0,0 +1,81 @@ +esphome: + name: gas-podval-wemos + friendly_name: Gas_Podval_Wemos + +esp8266: + board: nodemcuv2 + framework: + version: recommended + +one_wire: + - platform: gpio + pin: GPIO14 + + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "Yb18t21iU23T4V+RGQZGdY1Vc54YrIFvoCBYgQ9WqcY=" + +ota: + - platform: esphome + password: "0ebcebf661f3e4ad8d3123a5d0ba9fce" + +wifi: + ssid: "SmartHome" + password: "" + # networks: + # ssid: "SmartHome" + # password: "" + # bssid: 78:9A:18:88:E0:79 + # channel: 1 + power_save_mode: none + + + # Enable fallback hotspot (captive portal) in case wifi connection fails + ap: + # ssid: "Gas-Kitchen Fallback Hotspot" + # password: "0n8oXqMAAFPU" + + 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: 8.8.8.8 + # dns2: 8.8.4.4 + +captive_portal: + +# MQ2 Smoke Gas Sensor +sensor: + - platform: adc + pin: A0 + name: "WeMos D1 Mini Gas Sensor" + unit_of_measurement: "ppm" + icon: "mdi:meter-gas-outline" + update_interval: 1s + filters: + - multiply: 100 + + - platform: dallas_temp + address: 0xb6000000bd766928 + name: "Temperature" + update_interval: 2s + +# 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 \ No newline at end of file diff --git a/config/icebox.yaml b/config/icebox.yaml new file mode 100644 index 0000000..696c67f --- /dev/null +++ b/config/icebox.yaml @@ -0,0 +1,92 @@ +substitutions: + device_name: icebox + +esphome: + name: ${device_name} + friendly_name: ${device_name} + +bk72xx: + board: cbu + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "TJrP8SvFc28OkOZXBpEdrzwmsDBVNLzyNTQHOnwcMwA=" + +ota: + - platform: esphome + password: "7ca52a2f120b01d35476a7df8597199a" + +wifi: + ssid: SmartHome + password: "" + use_address: 192.168.88.50 + + # Enable fallback hotspot (captive portal) in case wifi connection fails + # ap: + # ssid: "Icebox Fallback Hotspot" + # password: "zGa3diAiL6T7" + manual_ip: + static_ip: 192.168.88.50 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + +captive_portal: + +# status_led: +# pin: +# number: GPIO9 +# inverted: true + + +switch: + - platform: gpio + pin: P7 + id: relay1 + - platform: gpio + pin: P8 + id: relay2 + - platform: gpio + pin: P9 + id: relay3 + +# binary_sensor: +# - platform: gpio +# pin: +# number: P6 +# mode: INPUT_PULLUP +# inverted: True +# name: ${device_name} switch 1 +# on_press: +# - light.toggle: relay1 +# on_release: +# - light.toggle: relay1 +# - platform: gpio +# pin: +# number: P24 +# mode: INPUT_PULLUP +# inverted: True +# name: ${device_name} switch 2 +# on_press: +# - light.toggle: relay2 +# on_release: +# - light.toggle: relay2 +# - platform: gpio +# pin: +# number: P26 +# mode: INPUT_PULLUP +# inverted: True +# name: ${device_name} switch 3 +# on_press: +# - light.toggle: relay3 +# on_release: +# - light.toggle: relay3 + +web_server: + port: 80 + auth: + username: "silver" + password: "cbvgcjy0" \ No newline at end of file diff --git a/config/kc868-a6.yaml b/config/kc868-a6.yaml new file mode 100644 index 0000000..1b79059 --- /dev/null +++ b/config/kc868-a6.yaml @@ -0,0 +1,251 @@ +esphome: + name: ventilation + friendly_name: Ventilation + +esp32: + board: esp32dev + framework: + type: arduino + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "/Tq+moXS9oIsH4e7/QMtww6zqAdP23DCzeTaM+6KxdM=" + +ota: + - platform: esphome + password: "64c599445a6dddc9a3cfc44a1413086e" + +wifi: + ssid: 'SmartHome' + password: '' + use_address: 192.168.88.23 + + manual_ip: + static_ip: 192.168.88.23 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + + # Enable fallback hotspot (captive portal) in case wifi connection fails + # ap: + # ssid: "Kc868-A6 Fallback Hotspot" + # password: "Eqh4eO1YIQUi" + +uart: + #RS485 + - id: uart_modbus + tx_pin: GPIO27 + rx_pin: GPIO14 + baud_rate: 9600 + stop_bits: 1 + + + #RS2332 + - id: rs232 + tx_pin: GPIO17 + rx_pin: GPIO16 + baud_rate: 9600 + +spi: + clk_pin: GPIO18 + mosi_pin: GPIO23 + miso_pin: GPIO19 + # cs pin: GPIO5 + +modbus: + uart_id: uart_modbus + id: modbus1 + +modbus_controller: + - id: modbus_sensor + address: 0x01 # device address + modbus_id: modbus1 + update_interval: 2s + +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 + name: "KC868-A6-IN-1" + pin: + pcf8574: inputs + number: 0 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output1 + on_release: + - switch.toggle: switch_output1 + + - platform: gpio + name: "KC868-A6-IN-2" + pin: + pcf8574: inputs + number: 1 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output2 + on_release: + - switch.toggle: switch_output2 + + - platform: gpio + name: "KC868-A6-IN-3" + pin: + pcf8574: inputs + number: 2 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output3 + on_release: + - switch.toggle: switch_output3 + + - platform: gpio + name: "KC868-A6-IN-4" + pin: + pcf8574: inputs + number: 3 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output4 + on_release: + - switch.toggle: switch_output4 + + - platform: gpio + name: "KC868-A6-IN-5" + pin: + pcf8574: inputs + number: 4 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output5 + on_release: + - switch.toggle: switch_output5 + + - platform: gpio + name: "KC868-A6-IN-6" + pin: + pcf8574: inputs + number: 5 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output6 + on_release: + - switch.toggle: switch_output6 + +switch: + - platform: gpio + name: "KC868-A6-RELAY-1" + id: switch_output1 + pin: + pcf8574: outputs + number: 0 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "KC868-A6-RELAY-2" + id: switch_output2 + pin: + pcf8574: outputs + number: 1 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "KC868-A6-RELAY-3" + id: switch_output3 + pin: + pcf8574: outputs + number: 2 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "KC868-A6-RELAY-4" + id: switch_output4 + pin: + pcf8574: outputs + number: 3 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "KC868-A6-RELAY-5" + id: switch_output5 + pin: + pcf8574: outputs + number: 4 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "KC868-A6-RELAY-6" + id: switch_output6 + pin: + pcf8574: outputs + number: 5 + mode: OUTPUT + inverted: true + +sensor: + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "Temperature SHT30" + id: temperature_sensor + address: 0x0000 + register_type: holding + value_type: U_WORD + unit_of_measurement: "°C" + accuracy_decimals: 1 + filters: + - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1; + + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "Humidity_SHT30" + id: humidity_sensor + address: 0x0001 + register_type: holding + value_type: U_WORD + unit_of_measurement: "%" + accuracy_decimals: 1 + filters: + - multiply: 0.1 + + + +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 \ No newline at end of file diff --git a/config/kontroller-kocheg-a16.yaml b/config/kontroller-kocheg-a16.yaml new file mode 100644 index 0000000..91b0a19 --- /dev/null +++ b/config/kontroller-kocheg-a16.yaml @@ -0,0 +1,482 @@ +esphome: + name: kontroller-kocheg-a16 + friendly_name: Kontroller_Kocheg_a16 + +esp32: + board: esp32dev + framework: + type: esp-idf + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "cjSokZz0SdHshCFIhZ2m/kz9nyKzVDhK4IP3GXeuPe4=" + +ota: + - platform: esphome + password: "b8cd17679860ec655bec01d924f92a91" + +ethernet: + type: LAN8720 + mdc_pin: GPIO23 + mdio_pin: GPIO18 + clk_mode: GPIO17_OUT + phy_addr: 0 + use_address: 192.168.88.25 + + manual_ip: + static_ip: 192.168.88.25 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + +# wifi: +# # ssid: !secret wifi_ssid +# # password: !secret wifi_password +# ssid: "SmartHome" +# password: "" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + # ap: + # ssid: "Kc868-A16 Fallback Hotspot" + # password: "gCJlyJ5kec3y" + + +uart: + - id: uart_modbus + tx_pin: GPIO13 + rx_pin: GPIO16 + baud_rate: 9600 + + +# Config Modbus +modbus: + uart_id: uart_modbus + id: modbus1 + +modbus_controller: + - id: modbus_sensor + address: 0x01 # device address + modbus_id: modbus1 + update_interval: 10s + +remote_receiver: + pin: + number: GPIO2 + ignore_strapping_warning: true + +remote_transmitter: + pin: + number: GPIO15 + ignore_strapping_warning: true + carrier_duty_percent: 100% + +i2c: + sda: GPIO4 + scl: + number: GPIO5 + ignore_strapping_warning: true + +pcf8574: + - id: inputs_1_8 + address: 0x22 + pcf8575: false + - id: inputs_9_16 + address: 0x21 + pcf8575: false + - id: outputs_1_8 + address: 0x24 + pcf8575: false + - id: outputs_9_16 + address: 0x25 + pcf8575: false + + +one_wire: + - platform: gpio + pin: GPIO32 + id: bus32 + + +binary_sensor: + - platform: gpio + name: "KC868-A16-HT2" + pin: + number: GPIO33 + inverted: true + + + - platform: gpio + name: "KC868-A16-HT3" + pin: + number: GPIO14 + inverted: true + + - platform: gpio + name: "input1_veranda_osv" + pin: + pcf8574: inputs_1_8 + number: 0 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output4 + on_release: + - switch.toggle: switch_output4 + + - platform: gpio + name: "input2_veranda_stolb_krylco" + pin: + pcf8574: inputs_1_8 + number: 1 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output7 + on_release: + - switch.toggle: switch_output7 + + - platform: gpio + name: "input3_veranda_osvechen" + pin: + pcf8574: inputs_1_8 + number: 2 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output6 + on_release: + - switch.toggle: switch_output6 + + - platform: gpio + name: "input4_krylco_stolb" + pin: + pcf8574: inputs_1_8 + number: 3 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output7 + on_release: + - switch.toggle: switch_output7 + + - platform: gpio + name: "input5_krylco_podsvetka" + pin: + pcf8574: inputs_1_8 + number: 4 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output6 + on_release: + - switch.toggle: switch_output6 + + - platform: gpio + name: "input6_krylco_osv" + pin: + pcf8574: inputs_1_8 + number: 5 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output4 + on_release: + - switch.toggle: switch_output4 + + - platform: gpio + name: "input7_veranda_rozetka" + pin: + pcf8574: inputs_1_8 + number: 6 + mode: INPUT + inverted: true + on_click: + if: + condition: + - switch.is_off: switch_output8 + then: + - switch.turn_on: switch_output8 + else: + - switch.turn_off: switch_output8 + + + - platform: gpio + name: "input8_podval_osv" + pin: + pcf8574: inputs_1_8 + number: 7 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output3 + on_release: + - switch.toggle: switch_output3 + + - platform: gpio + name: "input9_nasos" + pin: + pcf8574: inputs_9_16 + number: 0 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output2 + on_release: + - switch.toggle: switch_output2 + + - platform: gpio + name: "input10_boiler" + pin: + pcf8574: inputs_9_16 + number: 1 + mode: INPUT + inverted: true + on_press: + - switch.toggle: switch_output1 + on_release: + - switch.toggle: switch_output1 + + - platform: gpio + name: "KC868-A16-X11" + pin: + pcf8574: inputs_9_16 + number: 2 + mode: INPUT + inverted: true + + - platform: gpio + name: "KC868-A16-X12" + pin: + pcf8574: inputs_9_16 + number: 3 + mode: INPUT + inverted: true + + - platform: gpio + name: "KC868-A16-X13" + pin: + pcf8574: inputs_9_16 + number: 4 + mode: INPUT + inverted: true + + - platform: gpio + name: "KC868-A16-X14" + pin: + pcf8574: inputs_9_16 + number: 5 + mode: INPUT + inverted: true + + - platform: gpio + name: "KC868-A16-X15" + pin: + pcf8574: inputs_9_16 + number: 6 + mode: INPUT + inverted: true + + - platform: gpio + name: "KC868-A16-X16" + pin: + pcf8574: inputs_9_16 + number: 7 + mode: INPUT + inverted: true + + +switch: + - platform: gpio + name: "Output01_podval_boiler" + id: switch_output1 + pin: + pcf8574: outputs_1_8 + number: 0 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output02_podval_nasos" + id: switch_output2 + pin: + pcf8574: outputs_1_8 + number: 1 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output03_podval_svet" + id: switch_output3 + pin: + pcf8574: outputs_1_8 + number: 2 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output04_veranda_svet" + id: switch_output4 + pin: + pcf8574: outputs_1_8 + number: 3 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output05_teplica" + id: switch_output5 + pin: + pcf8574: outputs_1_8 + number: 4 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output06_podsvetka" + id: switch_output6 + pin: + pcf8574: outputs_1_8 + number: 5 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output07_stolb" + id: switch_output7 + pin: + pcf8574: outputs_1_8 + number: 6 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output08_rozetka" + id: switch_output8 + pin: + pcf8574: outputs_1_8 + number: 7 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output09" + id: switch_output9 + pin: + pcf8574: outputs_9_16 + number: 0 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output10" + id: switch_output10 + pin: + pcf8574: outputs_9_16 + number: 1 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output11" + id: switch_output11 + pin: + pcf8574: outputs_9_16 + number: 2 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output12" + id: switch_output12 + pin: + pcf8574: outputs_9_16 + number: 3 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output13" + id: switch_output13 + pin: + pcf8574: outputs_9_16 + number: 4 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output14" + id: switch_output14 + pin: + pcf8574: outputs_9_16 + number: 5 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output15" + id: switch_output15 + pin: + pcf8574: outputs_9_16 + number: 6 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "Output16" + id: switch_output16 + pin: + pcf8574: outputs_9_16 + number: 7 + mode: OUTPUT + inverted: true + +# substitutions: +# update_interval: 1s + +sensor: + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "Temperature Sensor" + id: temperature_sensor + address: 0x0001 + register_type: read + value_type: U_WORD + unit_of_measurement: "°C" + accuracy_decimals: 1 + filters: + - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1; + + + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "Humidity Sensor" + id: humidity_sensor + address: 0x0002 + register_type: read + value_type: U_WORD + unit_of_measurement: "%" + accuracy_decimals: 1 + filters: + - multiply: 0.1 + + - platform: dallas_temp + one_wire_id: bus32 + name: "DS18B20" + update_interval: 30s + + +# 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 \ No newline at end of file diff --git a/config/kontroller-kocheg-a8.yaml b/config/kontroller-kocheg-a8.yaml new file mode 100644 index 0000000..1c7f8a5 --- /dev/null +++ b/config/kontroller-kocheg-a8.yaml @@ -0,0 +1,223 @@ +esphome: + name: kontroller-kocheg-a8 + friendly_name: Kontroller_Kocheg_a8 + +esp32: + board: esp32dev + framework: + type: esp-idf + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "fLsIKyVhqlbxu8nVcb/Nn2nUoETpucfLcF6+G/sZDKw=" + +ota: + - platform: esphome + password: "1d28579639e8fc6e113c751c4cda7ff5" + +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.26 + + manual_ip: + static_ip: 192.168.88.26 + gateway: 192.168.88.1 + subnet: 255.255.255.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-output1" + pin: + pcf8574: pcf8574_hub_out_1 + number: 0 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output2" + pin: + pcf8574: pcf8574_hub_out_1 + number: 1 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output3" + pin: + pcf8574: pcf8574_hub_out_1 + number: 2 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output4" + pin: + pcf8574: pcf8574_hub_out_1 + number: 3 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output5" + pin: + pcf8574: pcf8574_hub_out_1 + number: 4 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output6" + pin: + pcf8574: pcf8574_hub_out_1 + number: 5 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output7" + pin: + pcf8574: pcf8574_hub_out_1 + number: 6 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output8" + 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 + id: bus14 + + - platform: gpio + pin: GPIO13 + id: bus13 + +sensor: + - platform: dallas_temp + one_wire_id: bus14 + name: "DS18B20_kontroller" + update_interval: 10s + + - platform: dallas_temp + one_wire_id: bus13 + name: "DS18B20_server" + 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 \ No newline at end of file diff --git a/config/secrets.yaml b/config/secrets.yaml new file mode 100644 index 0000000..00584f7 --- /dev/null +++ b/config/secrets.yaml @@ -0,0 +1,2 @@ +wifi_ssid: "SmartHome" +wifi_password: "" \ No newline at end of file diff --git a/config/teplica-a8.yaml b/config/teplica-a8.yaml new file mode 100644 index 0000000..2912385 --- /dev/null +++ b/config/teplica-a8.yaml @@ -0,0 +1,231 @@ +esphome: + name: teplica8 + friendly_name: Teplica_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 +# ssid: "SmartHome" +# password: "" + + # Enable fallback hotspot (captive portal) in case wifi connection fails + # ap: + # ssid: "Kc868-A8 Fallback Hotspot" + # password: "gCJlyJ5kec3y" + +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.24 + + manual_ip: + static_ip: 192.168.88.24 + gateway: 192.168.88.1 + subnet: 255.255.255.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-output1" + pin: + pcf8574: pcf8574_hub_out_1 + number: 0 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output2" + pin: + pcf8574: pcf8574_hub_out_1 + number: 1 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output3" + pin: + pcf8574: pcf8574_hub_out_1 + number: 2 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output4" + pin: + pcf8574: pcf8574_hub_out_1 + number: 3 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output5" + pin: + pcf8574: pcf8574_hub_out_1 + number: 4 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output6" + pin: + pcf8574: pcf8574_hub_out_1 + number: 5 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output7" + pin: + pcf8574: pcf8574_hub_out_1 + number: 6 + mode: OUTPUT + inverted: true + + - platform: gpio + name: "a8-output8" + 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 + id: bus14 + +sensor: + - platform: dallas_temp + one_wire_id: bus14 + name: "DS18B20" + update_interval: 2s + + - platform: adc + pin: 34 + name: "A8S A1" + device_class: 'humidity' + update_interval: 5s + unit_of_measurement: "%" + attenuation: 12db + filters: + - median: + window_size: 7 + send_every: 4 + send_first_at: 1 + - calibrate_linear: + - 0.23 -> 100.00 + - 0.43 -> 0.00 + - lambda: if (x < 0) return 0; else if (x > 100) return 100;else return (x); + accuracy_decimals: 0 \ No newline at end of file diff --git a/config/test-kc868-a16.yaml b/config/test-kc868-a16.yaml new file mode 100644 index 0000000..13a5af3 --- /dev/null +++ b/config/test-kc868-a16.yaml @@ -0,0 +1,114 @@ +esphome: + name: test-kc868-a16 + friendly_name: Test-KC868-A16 + +esp32: + board: esp32dev + framework: + type: esp-idf + +# Enable logging +logger: + +# Enable Home Assistant API +api: + encryption: + key: "D/MuChEBR8XVbCR8SpQIml+bxj3Huh5tKlwLpZ1QqeU=" + +ota: + - platform: esphome + password: "df5a4ea7cc6a8b628f781e27751c43cf" + +# ethernet: +# type: LAN8720 +# mdc_pin: GPIO23 +# mdio_pin: GPIO18 +# clk_mode: GPIO17_OUT +# phy_addr: 0 +# use_address: 192.168.88.25 + +wifi: + # ssid: !secret wifi_ssid + # password: !secret wifi_password + ssid: "SmartHome" + password: "" + use_address: 192.168.88.172 + + manual_ip: + static_ip: 192.168.88.172 + gateway: 192.168.88.1 + subnet: 255.255.255.0 + + # Enable fallback hotspot (captive portal) in case wifi connection fails + # ap: + # ssid: "Kc868-A16 Fallback Hotspot" + # password: "gCJlyJ5kec3y" + + +uart: + - id: uart_modbus + tx_pin: GPIO13 + rx_pin: GPIO16 + baud_rate: 9600 + +remote_receiver: + pin: + number: GPIO2 + ignore_strapping_warning: true + +remote_transmitter: + pin: + number: GPIO15 + ignore_strapping_warning: true + carrier_duty_percent: 100% + +i2c: + sda: GPIO4 + scl: + number: GPIO5 + ignore_strapping_warning: true + +# Config Modbus +modbus: + uart_id: uart_modbus + id: modbus1 + +modbus_controller: + - id: modbus_sensor + address: 0x01 # device address + modbus_id: modbus1 + update_interval: 10s + +sensor: + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "RS485 Temperature Sensor" + id: temperature_sensor + address: 0x0001 + register_type: read + value_type: U_WORD + unit_of_measurement: "°C" + accuracy_decimals: 1 + filters: + - lambda: if (x < 10000) return x * 0.1; else return -1 * (x - 10000) * 0.1; + + + - platform: modbus_controller + modbus_controller_id: modbus_sensor + name: "RS485 Humidity Sensor" + id: humidity_sensor + address: 0x0002 + register_type: read + value_type: U_WORD + unit_of_measurement: "%" + accuracy_decimals: 1 + filters: + - multiply: 0.1 + + + +web_server: + port: 80 + auth: + username: "silver" + password: "cbvgcjy0" \ No newline at end of file