Arduino, esp32 and esp8266 library for ABB (ex PowerOne) Aurora Inverter, implement a full methods to retrieve data from the Inverter via RS-485

Support forum Aurora Inverter English
Forum supporto Aurora Inverter italiano

ABB Aurora protocol

You can refer the complete documentation on my site

ABB Aurora PV inverter library for Arduino, esp8266 and esp32

I create this library to develop this Web Monitor interface.

Here the base information of RS485 ABB Aurora communication Protocol.

ABB PowerOne Aurora communication protocol Library arduino esp8266 esp32 Main

ABB PowerOne Aurora communication protocol Library arduino esp8266 esp32 Main

The communication between Host and processor works via a Serial Interface RS485 or RS232. Configuration parameters in both cases are:

  • 19200 baud (default value)
  • 1 stop bit
  • no parity

The structure of the answer has also fixed length (6 Bytes + 2 Bytes for Checksum) :

Transmission State is coded as follows:

0 = Everything is OK.

51 = Command is not implemented

52 = Variable does not exist

53 = Variable value is out of range

54 = EEprom not accessible

55 = Not Toggled Service Mode

56 = Can not send the command to internal micro

57 = Command not Executed

58 = The variable is not available, retry

Global State shows the state of the addressed device, the details are specified in the description of the commands.

Arduino UNO and MAX485

You can use an Arduino UNO and a MAX485 IC, if you prefer can buy a module.

You can find IC on AliExpress

You can find module on AliExpress

You can ArduinoUNO on AliExpress

Here the simple connection schema, the resistor must be 120Ω, i use 104Ω.

MAX485 Arduino connection schema

I create a library derived from a project that you can find in the web created by drhack, It’s a fantastic works (thanks to drhack) but I find It quite difficult to use, with specific hardware and not so reusable.

So I try to standardize the library and made It simple (the people that use my library know that “simplify first” It’s my motto.

esp8266 and MAX3485

If you want use an esp8266 (I create a centraline with Wemos D1 mini) you must buy a MAX3485 tha work at the correct voltage.

You can find IC on AliExpress eBay

You can find module on AliExpress eBay

You can find WeMos D1 mini on AliExpress

Here the simple connection schema, the resistor must be 120Ω, i use 104Ω.

MAX3485 and esp8266 connection schema

As you can see It’s quite simple to connect.

Constructor

As usual I try to create It more generic as possible, so If you want use HardwareSerial or SoftwareSerial you are free to choiche.

You must specify an address, that address normally is 2, but you must check It in your inverter menu.

You can create a chain of inverters that communicate via RS485. An address can be chosen from 2 to 63. The address on the inverter is set through the display and the pushbutton panel.

To change address go to SETTINGS --> Insert password (default 0000) --> Address.

This menu allows you to set the serial port addresses of the individual inverters connected to the RS485 line. The addresses that can be assigned are 2 to 63. The UP and DOWN buttons scroll through the numerical scale. ‘AUTO’ selection cannot be used at present.

HardwareSerial

// Aurora(byte inverterAddress, HardwareSerial* serial, byte serialCommunicationControlPin) Aurora inverter = Aurora(2, &Serial, 5);
  • inverterAddress: as described is the inverter address set on device.
  • serial: is the HardwareSerial.
  • serialCommunicationControlPin: is the pin that activate transmission of serial communication.

SoftwareSerial

// Aurora(byte inverterAddress, byte rxPin, byte txPin, byte serialCommunicationControlPin) Aurora inverter = Aurora(2, 10, 11, 5);
  • inverterAddress: as described is the inverter address set on device.
  • rxPin: is the SoftwareSerial RX pin.
  • txPin: is the SoftwareSerial TX pin.
  • serialCommunicationControlPin: is the pin that activate transmission of serial communication.

For software serial you can pass external SoftwareSerial instance.

// Aurora(byte inverterAddress, SoftwareSerial* serial, byte serialCommunicationControlPin) |

Usage

You can refer the complete documentation on my site ABB Aurora PV inverter library for Arduino, esp8266 and esp32

First you must startup the communication with begin command:

inverter.begin();|

Than there are a lot of command that you can use to make query to your Inverter:

        void begin();

        void clearReceiveData();
        DataState readState();
        DataVersion readVersion();
        DataDSP readDSP(byte type, byte global = (byte)1);
        DataTimeDate readTimeDate();
        bool writeTimeDate(unsigned long epochTime);
        DataLastFourAlarms readLastFourAlarms();
        DataJunctionBoxState readJunctionBoxState(byte nj);
        bool readJunctionBoxVal(byte nj, byte par);
        DataSystemPN readSystemPN();
        DataSystemSerialNumber readSystemSerialNumber();
        DataManufacturingWeekYear readManufacturingWeekYear();
        DataFirmwareRelease readFirmwareRelease();
        DataCumulatedEnergy readCumulatedEnergy(byte par);
        bool writeBaudRateSetting(byte baudcode);
        DataConfigStatus readConfig();
        DataTimeCounter readTimeCounter(byte param);

        // Central
        bool readFlagsSwitchCentral();
        bool readCumulatedEnergyCentral(byte var, byte ndays_h, byte ndays_l, byte global);
        bool readFirmwareReleaseCentral(byte var);
        bool readBaudRateSettingCentral(byte baudcode, byte serialline);
        bool readSystemInfoCentral(byte var);
        bool readJunctionBoxMonitoringCentral(byte cf, byte rn, byte njt, byte jal, byte jah);
        bool readSystemPNCentral();
        bool readSystemSerialNumberCentral();

Example code

Here an example of reading via Arduino.

/*
 Test Arduino MAX485 Aurora ABB connection
 by Mischianti Renzo <https://www.mischianti.org>
 
 https://www.mischianti.org/
*/
 
#include "Arduino.h"
#include <Aurora.h>
#include <SoftwareSerial.h>
#include <MemoryFree.h>
 
//SoftwareSerial mySerial(10, 11); // RX, TX
//Aurora inverter = Aurora(2, &amp;Serial1, 5);
Aurora inverter = Aurora(2, 10, 11, 5);
 
void SerialPrintData(byte *data) {
  for (int i = 0; i < 8; i++) {
    Serial.print((int)data[i]);
    Serial.print(F(" "));
  }
  Serial.println(F(" "));
 
}
 
void setup()
{
    Serial.begin(19200);
    inverter.begin();
}
 
// The loop function is called in an endless loop
void loop()
{
    Serial.print(F("freeMemory(1)="));Serial.println(freeMemory());
 
    Aurora::DataCumulatedEnergy cumulatedEnergy = inverter.readCumulatedEnergy((byte)1);
    Serial.println(F("------------------------------------------"));
    Serial.println(F("INVERTER 2"));
    Serial.print(F("          Data ROW = ")); SerialPrintData(inverter.receiveData);
    Serial.print(F("        Read State = ")); Serial.println(cumulatedEnergy.state.readState);
    Serial.print(F("Transmission State = ")); Serial.println(cumulatedEnergy.state.getTransmissionState());
    Serial.print(F("      Global State = ")); Serial.println(cumulatedEnergy.state.getGlobalState());
    Serial.print(F("           Energia = ")); Serial.print(cumulatedEnergy.energy); Serial.println(" Wh");
//    free(&amp;cumulatedEnergy);
    Serial.println(F("------------------------------------------"));
 
 
    Aurora::DataLastFourAlarms lastFour = inverter.readLastFourAlarms();
 
    Serial.println(F("INVERTER 2"));
    Serial.print(F("          Data ROW = "));  SerialPrintData(inverter.receiveData);
    Serial.print(F("        Read State = "));  Serial.println(lastFour.state.readState);
    Serial.print(F("Transmission State = "));  Serial.println(lastFour.state.getTransmissionState());
    Serial.print(F("      Global State = "));  Serial.println(lastFour.state.getGlobalState());
    Serial.print(F("          Alarms 1 = "));  Serial.println(lastFour.getAlarm1State());
    Serial.print(F("          Alarms 2 = "));  Serial.println(lastFour.getAlarm2State());
    Serial.print(F("          Alarms 3 = "));  Serial.println(lastFour.getAlarm3State());
    Serial.print(F("          Alarms 4 = "));  Serial.println(lastFour.getAlarm4State());
//  free(&amp;lastFour);
 
    Serial.println(F("------------------------------------------"));
 
    Aurora::DataVersion version = inverter.readVersion();
    Serial.println("INVERTER 2");
    Serial.print(F("          Data ROW = ")); SerialPrintData(inverter.receiveData);
    Serial.print(F("        Read State = ")); Serial.println(version.state.readState);
    Serial.print(F("Transmission State = ")); Serial.println(version.state.getTransmissionState());
    Serial.print(F("      Global State = ")); Serial.println(version.state.getGlobalState());
    Serial.print(F("           Version = ")); Serial.print(version.getModelName().name); Serial.print(F(" ")); Serial.print(version.getIndoorOutdoorAndType()); Serial.print(F(" ")); Serial.print(version.getGridStandard()); Serial.print(F(" ")); Serial.print(version.getTrafoOrNonTrafo()); Serial.print(F(" ")); Serial.println(version.getWindOrPV());
    Serial.println(F("------------------------------------------"));
//  free(&amp;version);
 
    Aurora::DataConfigStatus configStatus = inverter.readConfig();
 
    Serial.print(F("          Data ROW = ")); SerialPrintData(inverter.receiveData);
    Serial.print(F("        Read State = ")); Serial.println(configStatus.state.readState);
    Serial.print(F("Transmission State = ")); Serial.println(configStatus.state.getTransmissionState());
    Serial.print(F("      Global State = ")); Serial.println(configStatus.state.getGlobalState());
    Serial.print(F("      config       = ")); Serial.println(configStatus.getConfigStatus());
    Serial.println(F("------------------------------------------"));
//  free(&amp;version);
    Serial.print(F("freeMemory(2)="));Serial.println(freeMemory());
 
    Aurora::DataTimeCounter timeCounter = inverter.readTimeCounter(CT_TOTAL_RUN);
 
    Serial.print(F("          Data ROW = ")); SerialPrintData(inverter.receiveData);
    Serial.print(F("        Read State = ")); Serial.println(timeCounter.state.readState);
    Serial.print(F("Transmission State = ")); Serial.println(timeCounter.state.getTransmissionState());
    Serial.print(F("      Global State = ")); Serial.println(timeCounter.state.getGlobalState());
    Serial.print(F("      time in sec  = ")); Serial.println(timeCounter.upTimeInSec);
    Serial.print(F("      time in verb  = ")); Serial.print(timeCounter.getSecondsInDateElements()[0]); Serial.print(F("Y ")); Serial.print(timeCounter.getSecondsInDateElements()[1]); Serial.print(F("D "));Serial.print(timeCounter.getSecondsInDateElements()[2]);Serial.print(F("H "));Serial.print(timeCounter.getSecondsInDateElements()[3]);+Serial.print(F("M "));Serial.print(timeCounter.getSecondsInDateElements()[4]);Serial.println(F("S "));
    Serial.println(F("------------------------------------------"));
//  free(&amp;version);
    Serial.print(F("freeMemory(2)="));Serial.println(freeMemory());
 
    delay(4000);
 
}

As you can see the usage is quite simple.

Here the video of the result call.

Watch the video

Thanks

Owner
Renzo Mischianti
Software developer but I love electronics, wood, nature, and everything else as well.
Renzo Mischianti
Comments
  • no result from readDSP

    no result from readDSP

    I am implementing your library within my ESPHome application to connect to my ABB PVI-3.0-TL-OUTD-S. The readCumulatedEnergy seems to work (although not use the values are correct.) however the readDSP seems not to to work and state.readState is always 0. Any pointers on what should I check to get it working?

  • Meaning of the multipler in the inverter struct

    Meaning of the multipler in the inverter struct

    Hi,

    I see that in the InverterModel struct there is a variable called multipler. The values of this variables are constants defined in the following conversion function that takes the model ID and coverts it to the model name.

    I'm not finding any reference to that values in the documentation, where does that numbers come from and what is their meaning?

    Thank you and congrats for the great code!

  • Communication problem

    Communication problem

    Hello, I am trying to read the power output of my inverter (ABB PVI-3.0-TL-OUTD) and I flashed your example code as it is, changing the pin mapping. The only change I made to the code is to replace the calls to freeMemory with ESP.getFreeHeap(), as for some reason the code is not compiling for me on the ESP if using the MemoryFree library.

    I am using a Wemos D1 mini board, connected to an RS485 to TTL Arduino board (MAX485) through a level shifter. Connections are made as following:

    [Board to module]
    rxPin (0) -> RO
    txPin (5) -> DI
    sCCPin (4) -> RE, DE
    
    [Module to inverter]
    A -> +T/R
    B -> -T/R
    RTN -> GND
    LNK disconnected
    

    Output I'm getting on the console:

    15:54:43.429 -> INVERTER 2
    15:54:43.478 ->           Data ROW = 255 255 0 0 0 0 0 0  
    15:54:43.478 ->         Read State = 0
    15:54:43.478 -> Transmission State = Unknown
    15:54:43.512 ->       Global State = Unknown
    15:54:43.512 ->            Version = Unknown Unknown Unknown Unknown
    15:54:43.545 -> ------------------------------------------
    15:54:47.578 -> ------------------------------------------
    15:54:47.578 -> INVERTER 2
    15:54:47.578 ->           Data ROW = 255 255 0 0 0 0 0 0  
    15:54:47.611 ->         Read State = 0
    15:54:47.611 -> Transmission State = Unknown
    15:54:47.645 ->       Global State = Unknown
    15:54:47.645 ->            Energia = 0 Wh
    15:54:47.678 -> ------------------------------------------
    15:54:47.678 -> freeMemory()=47080
    15:54:47.711 -> freeMemory()=47080
    15:54:47.711 -> INVERTER 2
    15:54:47.711 ->           Data ROW = 255 255 255 255 255 255 0 0  
    15:54:47.745 ->         Read State = 0
    15:54:47.745 -> Transmission State = Unknown
    15:54:47.778 ->       Global State = Unknown
    15:54:47.778 ->           Alarms 1 = Unknown
    15:54:47.811 ->           Alarms 2 = Unknown
    15:54:47.811 ->           Alarms 3 = Unknown
    15:54:47.845 ->           Alarms 4 = Unknown
    15:54:47.845 -> ------------------------------------------
    

    The inverter address is correctly set and the terminator resistance is set to ON.

    I must be missing something, thank you for your help.

  • "Current day Energy" not resetting each day

    It's certainly not your software related but I'm lost! :-(

    On one of mine 3 aurora inverters ET (Current day Energy) reading on some random day starts unusually high (79170) even when previous day last reading was (32966). Seems like ET is not reset correctly. Faulty firmware is C.0.0.6. Other two inverter with C.0.0.5 work fine.

    Any ideas on how to solve this? Thank you! Grazie!

  • Manage multiple inverters

    Manage multiple inverters

    The only way to manage multiple inverters is to instantiate more Aurora objects when the only thing that changes is the inverterAddress, so a setter for this value would be useful

A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)
A library for writing modern websockets applications with Arduino (ESP8266 and ESP32)

Arduino Websockets A library for writing modern websockets applications with Arduino (see prerequisites for supported platforms). This project is base

Dec 26, 2022
An Arduino library with additions to vanilla Serial.print(). Chainable methods and verbosity levels. Suitable for debug messages.

advancedSerial This library provides some additions to vanilla Serial.print(): 1. Chainable print() and println() methods: // you can chain print() a

Dec 13, 2022
Library for ESP32 and ESP8266 to work with the Fernando K app

App Fernando K This library is meant to work with the Fernando K app https://play.google.com/store/apps/details?id=com.appfernandok https://apps.apple

Aug 5, 2020
Simple web interface builder for esp8266 and ESP32
Simple web interface builder for esp8266 and ESP32

GyverPortal Простой конструктор веб интерфейса для esp8266 и ESP32 Простой конструктор - делаем страницы без знаний HTML и CSS Библиотека является обё

Jan 8, 2023
Arduino library for sending email and SMS from nothing but the ESP8266!
Arduino library for sending email and SMS from nothing but the ESP8266!

Did you know your ESP8266 could send Email and SMS without any special hardware or paid services like Twilio? With AlertMe, your ESP8266 project can:

Feb 24, 2022
This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples
This Arduino IDE for ArduCAM ESP8266 UNO Board with Integrated ArduCAM Library and Examples

ArduCAM_ESP8266_UNO Please use josn board manager script from http://www.arducam.com/downloads/ESP8266_UNO/package_ArduCAM_index.json to download ESP8

Jan 7, 2023
Anto client library for ESP8266-Arduino

Anto client library for ESP8266-Arduino ESP8266-AntoIO provides common and easy way to connect your ESP8266 to Anto.io IoT platform service. Stable ve

Dec 1, 2021
A library to simplify the process of getting and storing data to Antares IoT Platform through HTTP on ESP8266.
A library to simplify the process of getting and storing data to Antares IoT Platform through HTTP on ESP8266.

Antares ESP8266 HTTP This is the documentation for Antares ESP8266 library. This library is meant to simplify the process of retrieving and deploying

Jul 2, 2021
A library to simplify the process of subscribing and publishing data to Antares IoT Platform through MQTT on ESP8266.
A library to simplify the process of subscribing and publishing data to Antares IoT Platform through MQTT on ESP8266.

Antares ESP8266 MQTT A Library to simplify the process of MQTT publication and subscription to Antares IoT Platform using ESP8266. This library works

Mar 9, 2022
Arduino Arduino library for the CloudStorage server project. The library provides easy access to server-stored values and operations.

Arduino-CloudStorage Arduino/ESP8266 library that allows you to easly store and retreive data from a remote (cloud) storage in a key/value fashion. Cl

Jan 30, 2022
ESP32-S2 and CC1101S 433Mhz usb stick to record and send car gates/garages data keys and open stuff
ESP32-S2 and CC1101S 433Mhz usb stick to record and send car gates/garages data keys and open stuff

HackZeGarage ESP32-S2 and CC1101S 433Mhz usb stick to record and send car gates/garages data keys and open stuff **HackZeGarage @sulfuroid / Dr CADIC

Mar 16, 2022
Arduino polyphonic synthesizer project (not a Moog) for ESP32 - STM32 - Teensy and more
Arduino polyphonic synthesizer project (not a Moog) for ESP32 - STM32 - Teensy and more

ml_synth_basic_example Arduino polyphonic synthesizer project (not a Moog) for ESP32 - STM32 - Teensy and more link to the video My intention was to m

Dec 7, 2022
Library for auto Light Emitting Diode (LED) control based on the timer function of the ESP8266

Library for auto Light Emitting Diode (LED) control based on the timer function of the ESP8266. The purpose is to have LED running for their own without the need to to such things like blinking on your own.

Jan 18, 2022
Arduino library for making an IHC in or output module using an Arduino

Introduction This is an Arduino library for making an IHC in or output module using an Arduino. (IHC controller is a home automation controller made b

Mar 26, 2020
ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT Cloud

ArduinoIoTCloud What? The ArduinoIoTCloud library is the central element of the firmware enabling certain Arduino boards to connect to the Arduino IoT

Dec 16, 2022
ESP8266 examples and toolchain setup

README These apps accomplish the following: -- ESP8266-EVB-blinkLED : Blink by green LED on ESP8266-EVB -- arduino_style : -- esphttpd : Advanced web-

Oct 22, 2022
Connecting an ESP8266 to a Google Calendar service to turn an useless "On Air" sign into a smart meeting indicator
Connecting an ESP8266 to a Google Calendar service to turn an useless

ESP8266-GoogleCalendar Intro I had an useless "On Air" sign hanging around my home, and I thought it would be cool to connect it to my Google Calendar

Jan 20, 2022
ESP8266 MQTT Sharp-fu-y30 air purifier controller
ESP8266 MQTT Sharp-fu-y30 air purifier controller

ESP8266 MQTT Sharp-fu-y30 air purifier controller Disclaimer Note: if you decide to do those changes to your air purifier, you take all the responsibi

Dec 6, 2022
Websocket client for Arduino, with fast data send

Websocket client for Arduino, with fast data send This is a simple library that implements a Websocket client running on an Arduino. Rationale For our

Aug 4, 2022