ABB Aurora web inverter centraline (WIC): debug and notification – 4

Spread the love

ABB PowerOne Aurora Web Inverter Centraline Debug and notification
ABB PowerOne Aurora Web Inverter Centraline Debug and notification

I use Serial communication to interface our device with inverter so for “debug” we are using the secondary UART offered by WeMos D1 mini, you can find deteiled information in my article “WeMos D1 mini (esp8266), debug on secondary UART“.

You can find WeMos D1 mini to WeMos D1 mini - NodeMCU V2 V2.1 V3 - esp01 - esp01 programmer

So in the board I add a pin to this, you can use standard CH340G Module to interface to It,

CH340G Module It is my forced choice

You can find the correct USB to TTL to AliExpress USB to TTL CH340G - AliExpress USB to TTL FT232RL

and you must check that debug is enable in the code.

// Uncomment to enable printing out nice debug messages.

// Define where debug output will be printed.
#define DEBUG_PRINTER Serial1

// Setup debug printing macros.
	#define DEBUG_PRINT(...) { DEBUG_PRINTER.print(__VA_ARGS__); }
	#define DEBUG_PRINTLN(...) { DEBUG_PRINTER.println(__VA_ARGS__); }
	#define DEBUG_PRINT(...) {}
	#define DEBUG_PRINTLN(...) {}

With this system you can grab the ip given from DHCP, (you can use a network sniffer also). If you want I expose i2c pin also, so you can attach a screen where to show IP or other information.

ABB Aurora Web Inverter Centraline PCB debug pin
ABB Aurora Web Inverter Centraline PCB debug pin


For notification system I use my library created to send email, It’s simple configurable and rapid to use.

For the library you can refer to my article “Send email with attachments“, where I explain better the library usage.

I’m going to store the parameter in a config file inside the SPIFFS (I hope that this file change very few times), first you must configure your SMTP server.

ABB Aurora SMTP params

Than I’m going to manage all 4 types of alarm that are generated from Inverter.

ABB Aurora inverter states

You can configure a different set of notifications for each actor and remember that you probably haven’t linked all channels, so be careful to disable the configuration for the unused channel.

ABB Aurora inverter notification configuration

You can specify the settings for every email, and you can select to send email every time there is a change or only when something goes wrong.

You can do this for every unit monitored:

  • Alarm: when an alarm is returned
  • State: when the state of the grid is changed
  • Channels: when a change is occurred on a specified channel.
ABB Aurora inverter notification configuration states

Here a piece of configuration file.

    "emailNotification": {
        "isNotificationEnabled": true,
        "subject": "Notifica inverter",
        "messageProblem": "Un problema è stato rilevato sull'inverter:",
        "messageNoProblem": "E' stato ripristinato lo stato del tuo inverter:",
        "emailList": [
                "email": "",
                "name": "Renzo Mischianti",
                "alarm": "on_problem",
                "ch1": "on_problem",
                "ch2": "none",
                "state": "on_problem"

In this piece of code It manage the sending of the alert email by reading the configuration file:


				if (lds.needNotify){
					DEBUG_PRINT(F("Open config file..."));
					fs::File configFile ="/mc/config.txt"), "r");
					if (configFile) {
						DynamicJsonDocument doc(CONFIG_FILE_HEAP);
						DeserializationError error = deserializeJson(doc, configFile);
						if (error) {
							// if the file didn't open, print an error:
							DEBUG_PRINT(F("Error parsing JSON "));

						// close the file:

						DEBUG_PRINT(F("MEM "));

						JsonObject rootObj =<JsonObject>();

						DEBUG_PRINT(F("After read config check serverSMTP and emailNotification "));
						DEBUG_PRINTLN(rootObj.containsKey(F("serverSMTP")) && rootObj.containsKey(F("emailNotification")));

						if (rootObj.containsKey(F("serverSMTP")) && rootObj.containsKey(F("emailNotification"))){
	//						JsonObject serverConfig = rootObj["server"];
							JsonObject serverSMTP = rootObj[F("serverSMTP")];
							JsonObject emailNotification = rootObj[F("emailNotification")];

							bool isNotificationEnabled = (emailNotification.containsKey(F("isNotificationEnabled")))?emailNotification[F("isNotificationEnabled")]:false;

							DEBUG_PRINT(F("isNotificationEnabled "));

							if (isNotificationEnabled){
								const char* serverSMTPAddr = serverSMTP[F("server")];
								uint16_t portSMTP = serverSMTP[F("port")];
								const char* loginSMTP = serverSMTP[F("login")];
								const char* passwordSMTP = serverSMTP[F("password")];
								const char* fromSMTP = serverSMTP[F("from")];

								DEBUG_PRINT(F("server "));
								DEBUG_PRINT(F("port "));
								DEBUG_PRINT(F("login "));
								DEBUG_PRINT(F("password "));
								DEBUG_PRINT(F("from "));

								EMailSender::EMailMessage message;
								const String sub = emailNotification[F("subject")];
								message.subject = sub;

								JsonArray emailList = emailNotification[F("emailList")];

								DEBUG_PRINT(F("Email list "));

								for (uint8_t i=0; i<emailList.size(); i++){
									JsonObject emailElem = emailList[i];

	//								byte asp = lastData[F("asp")];
	//								byte c1sp = lastData[F("c1sp")];
	//								byte c2sp = lastData[F("c2sp")];
	//								byte isp = lastData[F("isp")];

									const String alarm = emailElem[F("alarm")];
									const String ch1 = emailElem[F("ch1")];
									const String ch2 = emailElem[F("ch2")];
									const String state = emailElem[F("state")];

									DEBUG_PRINT(F("State value "));

									DEBUG_PRINT(F("State value on_problem comparison "));

									DEBUG_PRINT(F("Alarm value "));

									DEBUG_PRINT(F("Alarm all comparison "));

									bool allNotification = (
											(alarm==F("all") && lds.asp != dataState.alarmState)
											(ch1==F("all") && lds.c1sp != dataState.channel1State)
											(ch2==F("all") && lds.c2sp != dataState.channel2State)
											(state==F("all") && lds.isp != dataState.inverterState)

									bool onProblem = (
											(alarm==F("on_problem") && dataState.alarmState > 0)
											(ch1==F("on_problem") && dataState.channel1State != 2)
											(ch2==F("on_problem") && dataState.channel1State != 2)
											(state==F("on_problem") && (dataState.inverterState != 2 && dataState.inverterState != 1))

									DEBUG_PRINT(F("Check allNotification "));

									DEBUG_PRINT(F("Check onProblem "));

									DEBUG_PRINT(F("MEM "));

									if (
										const String mp = emailNotification[F("messageProblem")];
										const String mnp = emailNotification[F("messageNoProblem")];
										message.message = ((lds.inverterProblem)?mp:mnp)+
														F("<br>Alarm: ")+dataState.getAlarmState()+
														F("<br>CH1: ")+dataState.getDcDcChannel1State() +
														F("<br>CH2: ")+dataState.getDcDcChannel2State()+
														F("<br>Stato: ")+dataState.getInverterState();

										EMailSender::Response resp = emailSend.send(emailElem[F("email")], message);

										DEBUG_PRINTLN(F("Sending status: "));
										const String em = emailElem[F("email")];


So the code read the configuration and iterate for all emails inserted check if must be send a particular alert.


  1. ABB Aurora Web Inverter Monitor (WIM): project introduction
  2. ABB Aurora Web Inverter Monitor (WIM): wiring Arduino to RS-485
  3. ABB Aurora Web Inverter Monitor (WIM): storage devices
  4. ABB Aurora Web Inverter Monitor (WIM): debug and notification
  5. ABB Aurora Web Inverter Monitor (WIM): set time and UPS
  6. ABB Aurora Web Inverter Monitor (WIM): WIFI configuration and REST Server
  7. ABB Aurora Web Inverter Monitor (WIM): WebSocket and Web Server
  8. ABB Aurora Web Inverter Monitor (WIM): Wiring and PCB soldering
  9. ABB Aurora Web Inverter Monitor (WIM): upload the sketch and front end
  10. ABB Aurora web inverter Monitor (WIM): 3D printed case to complete project
  11. ABB Aurora web inverter monitor (WIM): repair E013 error

GitHub repository with all code BE and FE transpiled

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *