ESPHome - SolarPV inverter - Energy sensor not available [SOLVED]

Hi guys, I finally connected an old Aurora Inverter to home assistant using ESPHome, following this project.
The integration show many data related to energy production (weekly, yearly, daily) but the Energy Dashboard is not showing the exposed sensor.

I the change the device class to energy via customize.yaml.
Do you have any idea to solve this problem?

This my customize.yaml (in the first rows I changed the device class of and other product that is working fine)

# Impostare la device_class dei sensori GAS ed Energia di Veissmann -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

sensor.caldaia_dhw_gas_consumption_today:
  device_class: gas
sensor.caldaia_heating_gas_consumption_today:
  device_class: gas
sensor.caldaia_consumo_energetico_del_riscaldamento_a_gas_giorno_corrente:
  device_class: energy
sensor.caldaia_consumo_energetico_del_riscaldamento_a_gas_dell_acqua_calda_giorno_corrente:
  device_class: energy

# Impostare la device_class dei sensori Energia di Inverter-Aurora -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

sensor.esp32_s2_inverter_aurora_cumulated_energy_today:
  device_class: energy
sensor.esp32_s2_inverter_aurora_cumulated_energy_week:
  device_class: energy
sensor.esp32_s2_inverter_aurora_cumulated_energy_month:
  device_class: energy
sensor.esp32_s2_inverter_aurora_cumulated_energy_year:
  device_class: energy
sensor.esp32_s2_inverter_aurora_cumulated_energy_total:
  device_class: energy

Hi,
I can’t help you with your query I’m afraid, although you may be able to help me.

I am going through the process of connecting an Aurora PowerOne following that same project, and when compiling I get an error regarding the Wire.h file not existing. Is this file required?

I have removed the line ‘#include <wire.h>’ from the ‘ABBAurora.h’ file and it now compiles without any errors.

I haven’t been able to test the connection with the invertor yet but I’d be interested in how you dealt with this issue.

Hi, yes no problem. Can you share your ESPHome .yaml and a photo that show how you include the xxxx.h file in your configuration??

Have you tried the Aurora powerone integration running directly in home assistant?

No I didn’t because my inverter miss the connection module that costs around 200€. I just use esphome board (less than 10€). It works but the entity doesn’t pop-up in the energy dashboard

Hi, I wonder if you could help me? I am trying to connect to my Aurora PowerOne invertor and can’t seem to get it communicate. How are you connecting to the PowerOne? Are you using the USB connection, the RJ11 connection, or the terminal block? If you could provide some wiring details from your TTL to RS485 module (i’m using the 485 to serial port UART https://amzn.eu/d/aQhoFgH) to the invertor, it would be greatly appreciated.

By the way, have you tried using the Powercalc integration to create an energy entity from you generated watts entity? You may find that this then allows you to bring the Energy Entity (kWh) into the energy dashboard.

Hi, to connect the Inverter to Home Assistant I’m using ESPHome integration by NabuCasa. For the hardware I’m using a ESP32 Board (in my case this one wemos esp32-s2) and a RS-485 module (link). You can find wiring scheme in this repo.

The RS-485 is connected to the Inverter RS485 board and the ESP32 simply read them and push to Home Assistant.

The problem is that i can see all entities about daily, weekly consumption and so on as describe in the my first post but I’m not able to add to the Home Assistant Energy Dashboard.

In the repo you can find also installation guidelines but if you need help write me.

Thanks for the information and images. I will compare my setup with yours and post some images of my setup.

Once I establish some communications I should be able to help you with your energy dashboard issue.

If the sensors aren’t showing as available in the energy dashboard, I suggest checking the following on each entity:

  • Make sure the units are correct, should be kWh or Wh.
  • Make sure the device class is set to Energy
  • Make sure the state class is set to Total Increasing

If the entities are being created by ESPHome, you may need to change your ESP device configuration.
Examples here:

You can also experiment with the sensor types by creating a template sensor. On this sensor you can experiment and set the above options to see what enables visibility on the energy dashboard.

Hi,

this is the yaml that I Installed in my ESPhome. Can you help me understand what’s wrong?

esphome:
  name: esp32-s2-inverter-aurora
  friendly_name: esp32-s2-inverter-aurora
  includes:
    - esp32-s2-inverter-aurora/ABBAuroraStrings.cpp
    - esp32-s2-inverter-aurora/ABBAuroraStrings.h
    - esp32-s2-inverter-aurora/ABBAuroraEnums.h
    - esp32-s2-inverter-aurora/ABBAurora.cpp
    - esp32-s2-inverter-aurora/ABBAurora.h
    - esp32-s2-inverter-aurora/InverterMonitor.h
    - esp32-s2-inverter-aurora/ABBAurora.cpp  
  libraries:
    - Wire

esp32:
  board: esp32-s2-saola-1
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  encryption:
    key: "90vfcUJLhGIyqom1/Yuyp7+zTC+EPfoReKlzIHC9wr8="

ota:
  password: "031574bb6ab0a4224aa030f7e4e42052"

wifi:
  networks:
  - ssid: !secret wifi_ssid
    password: !secret wifi_password
  power_save_mode: none
  manual_ip:
    static_ip: 192.168.0.205
    gateway: 192.168.0.254
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Nodemcu-Inverter-Aurora"
    password: "XXX"

captive_portal:

sensor:
  - platform: custom
    lambda: |-
      auto monitor = InverterMonitor::get_instance();
      App.register_component(monitor);
      App.register_sensor(monitor->v_in_1);
      App.register_sensor(monitor->v_in_2);
      App.register_sensor(monitor->i_in_1);
      App.register_sensor(monitor->i_in_2);
      App.register_sensor(monitor->power_in_1);
      App.register_sensor(monitor->power_in_2);
      App.register_sensor(monitor->power_in_total);
      App.register_sensor(monitor->power_peak_today);
      App.register_sensor(monitor->power_peak_max);
      App.register_sensor(monitor->temperature_inverter);
      App.register_sensor(monitor->temperature_booster);
      App.register_sensor(monitor->cumulated_energy_today);
      App.register_sensor(monitor->cumulated_energy_week);
      App.register_sensor(monitor->cumulated_energy_month);
      App.register_sensor(monitor->cumulated_energy_year);
      App.register_sensor(monitor->cumulated_energy_total);

      return {
        monitor->v_in_1,
        monitor->v_in_2,
        monitor->i_in_1,
        monitor->i_in_2,
        monitor->power_in_1,
        monitor->power_in_2,
        monitor->power_in_total,
        monitor->power_peak_today,
        monitor->power_peak_max,
        monitor->temperature_inverter,
        monitor->temperature_booster,
        monitor->cumulated_energy_today,
        monitor->cumulated_energy_week,
        monitor->cumulated_energy_month,
        monitor->cumulated_energy_year,
        monitor->cumulated_energy_total
      };
    sensors: 
      #Voltage
      - name: v_in_1
        unit_of_measurement: V
        accuracy_decimals: 2
        icon: "mdi:lightning-bolt-outline"
      - name: v_in_2
        unit_of_measurement: V
        accuracy_decimals: 2
        icon: "mdi:lightning-bolt-outline"
      #Current
      - name: i_in_1
        unit_of_measurement: A
        accuracy_decimals: 2
        icon: "mdi:current-ac"
      - name: i_in_2
        unit_of_measurement: A
        accuracy_decimals: 2
        icon: "mdi:current-ac"
      #Power
      - name: power_in_1
        unit_of_measurement: W
        accuracy_decimals: 0
        icon: "mdi:solar-power"
      - name: power_in_2
        unit_of_measurement: W
        accuracy_decimals: 0
        icon: "mdi:solar-power"
      - name: power_in_total
        unit_of_measurement: W
        accuracy_decimals: 0
        icon: "mdi:solar-power"
      - name: power_peak_today
        unit_of_measurement: W
        accuracy_decimals: 0
        icon: "mdi:solar-power"
      - name: power_peak_max
        unit_of_measurement: W
        accuracy_decimals: 0
        icon: "mdi:solar-power"
      #Temperatures
      - name: inverter_temp
        unit_of_measurement: "°C"
        accuracy_decimals: 2
        icon: "mdi:thermometer"
      - name: booster_temp
        unit_of_measurement: "°C"
        accuracy_decimals: 2
        icon: "mdi:thermometer"
      #Energy
      - name: cumulated_energy_today
        unit_of_measurement: "Wh"
        accuracy_decimals: 0
        icon: "mdi:car-battery"
      - name: cumulated_energy_week
        unit_of_measurement: "Wh"
        accuracy_decimals: 0
        icon: "mdi:car-battery"
      - name: cumulated_energy_month
        unit_of_measurement: "Wh"
        accuracy_decimals: 0
        icon: "mdi:car-battery"
      - name: cumulated_energy_year
        unit_of_measurement: "Wh"
        accuracy_decimals: 0
        icon: "mdi:car-battery"
      - name: cumulated_energy_total
        unit_of_measurement: "Wh"
        accuracy_decimals: 0
        icon: "mdi:car-battery"

text_sensor:
  - platform: custom
    lambda: |-
      auto monitor = InverterMonitor::get_instance();
      App.register_text_sensor(monitor->connection_status);
      return { monitor->connection_status };
    text_sensors: 
      #Status
      - name: connection_status
        icon: "mdi:connection"
    ```

I expect you need to set the state class and device_class for your energy sensors.

     - name: cumulated_energy_total
       unit_of_measurement: "Wh"
       accuracy_decimals: 0
       icon: "mdi:car-battery"
       state_class: "total_increasing"
       device_class: "energy"

Note that it is the energy (not power, voltage etc) sensors that can be used in the energy dashboard.

Thank you!

I added the missing lines to my yaml and now the entity is visible!! Thank you so much

Hello! i have an old Aurora One inverter too and your instructions are great! tanks!

the entity “cumulated_energy_total” works only for the inverter with batteres? i dont’ have any backup battery…