# # solis-esphome-emw3080.yaml -- Ginlong Solis Inverter ESPhome definition for EMW3080 MCUs. # # The hardware described in this file (MCU and GPIO) corresponds to that of the Solis S3 WiFi stick. # # (C) 2023-2026 Hajo Noerenberg # # Usage: # 1. Depending on your type of device (INV, ESINV or EPM), # include modbus definition in 'packages' section below # 2. Compile and upload # https://docs.libretiny.eu/docs/projects/esphome/#build-upload # # Important: # Some versions of ESPHome and/or LibreTiny are buggy, check # https://github.com/hn/ginlong-solis/issues and especially # https://github.com/hn/ginlong-solis/issues/76 for advice. # # http://www.noerenberg.de/ # https://github.com/hn/ginlong-solis # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3.0 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # esphome: name: solis-emw3080 friendly_name: Ginlong Solis Inverter platformio_options: board_build.mcu: rtl8710bn board_build.f_cpu: 125000000L platform_packages: - framework-arduino-api @ https://github.com/hn/ArduinoCore-API#RingBufferFix rtl87xx: board: generic-rtl8710bx-4mb-980k framework: version: latest logger: packages: # Uncomment exactly one line depending on your device type #inv: !include common/solis-modbus-inv.yaml #esinv: !include common/solis-modbus-esinv.yaml #epm: !include common/solis-modbus-epm.yaml # Uncomment for optional INV inverter addon: Single Phase ACR10R energy meter #inv-acr10r-1ph: !include common/solis-modbus-inv-addon-acr10r-1ph.yaml # Uncomment for optional ESINV inverter addon: timers for battery charge and discharge periods #esinv-timer: !include common/solis-modbus-esinv-addon-timer.yaml time: - platform: homeassistant id: network_time api: encryption: key: !secret api_encryption_key ota: - platform: esphome password: !secret ota_password wifi: ssid: !secret wifi_ssid password: !secret wifi_password ap: ssid: "Ginlong Solis Inverter" password: !secret wifi_ap_password captive_portal: interval: - interval: 1s then: if: condition: wifi.connected: then: if: condition: switch.is_off: led_green_net then: - switch.turn_on: led_green_net else: if: condition: switch.is_on: led_green_net then: - switch.turn_off: led_green_net script: - mode: restart id: modbus_activity then: - switch.turn_on: led_orange_com - if: condition: api.connected: then: - switch.turn_on: wdt_reset uart: id: modbus_uart tx_pin: PA23 rx_pin: PA18 baud_rate: 9600 modbus: flow_control_pin: PA19 send_wait_time: 300ms id: modbus_hw modbus_controller: - id: modbus_master address: 0x1 modbus_id: modbus_hw setup_priority: -10 button: - platform: factory_reset name: Restart with factory default settings id: reset_all - platform: restart name: Reboot device switch: - platform: gpio restore_mode: ALWAYS_OFF pin: PA12 id: led_orange_com on_turn_on: - delay: 500ms - switch.turn_off: led_orange_com - platform: gpio restore_mode: ALWAYS_OFF pin: PA05 id: led_green_net - platform: gpio pin: PA00 id: wdt_reset on_turn_on: - delay: 100ms - switch.turn_off: wdt_reset binary_sensor: - platform: gpio pin: number: PA08 inverted: true id: button_reset on_click: min_length: 5s max_length: 300s then: - button.press: reset_all sensor: - platform: wifi_signal name: "WiFi Signal"