/KD-WVC-R3-Inverter-data-to-Home-Assistant

A project to get WVC-R3 Inverter data into Home Assistant using MQTT

Primary LanguageC++

KD- WVC R3 Inverter Data to Home Assistant using MQTT

Getting local data from the WVC R3 Life edition inverters into Home Assistant.
(Currently tested and working on the WVC700 R3 Life Edition)
Thanks to Damian Burrin for his project and all the information that got me started.
https://github.com/damianburrin/WVC-Life-Edition-Data-Collector
Inverter R3 Lid off

Current understanding - thanks to Damian

The Wifi chip is a HF-LPT270 and fairly well documented online.
http://www.hi-flying.com/hf-lpt270
and here
https://manuals.plus/m/5176309d280b9892c2bce6f24685fa4b934f7f79a321716bc0bc6c0f4dfe03bf_optim.pdf

KD WVC UART WIFI chip pin out 2


The LIFE edition seems to have no connection from the UART RX to the J4 header on the board- I'm sure the UART takes an input in as you can power down and change the power limits remotely via the cloud intelligence app. I want to locally change the power level but I haven't worked this out yet so only Tx is connected to ESP32.


It first makes a connection to the WIFI and It's server (alicloud) on power up

+ILOPCONNECT=WIFI_CONNECT
+ILOPCONNECT=SERVER_CONNECT

It Then sends a cycled serial connection on a permentent loop.

The Main data is sent
AT+SENDICA=property,PV_Volt,50.8,PV_Current,1.09,PV_Power,55.4,AC_Volt,243.2,AC_Current,0.20,Out_Power,51.0,Temperature,30.0,Power_adjustment,100,Energy,94.89 +ok

And then this additional data
AT+SENDICA=property,PowerSwitch,1,Plant,0.16,Emission,0.09,Time,30,P_adj,66,TEMP_SET,67 +ok

or this - note the extra Daily value
AT+SENDICA=property,PowerSwitch,1,Daily,0.10,Plant,0.16,Emission,0.09,Time,30,P_adj,66,TEMP_SET,67 +ok

I soldered to the HF-LPT270 UART TX and RX pins along with 3.3v and ground to power the ESP32 board.
(Looking at photo I now see the soldering doesn't look good but it works :-)) Inverter connection pins

I then tested UART output using Putty software on my pc with a cheap aliexpress USB to TTL reader.
USB to TTL
These are the settings used.
image

Only Ground and HF-LPT270 UART TX to the USB-TTL RX are required to be connected.
(MAKE SURE 3.3V is selected on the USB-TTL board or the magic smoke will appear.) UART reader

This is the data received. Note: You only get data if a solar panel is connected and working (No data at night). Reader output on putty software

Implementing The ESP32 Using LOLIN ESP32 - A mini wifi boards based on WEMOS ESP32-S2FN4R2S2 called S2 mini about US$2 image

Overview connection

Ground to GND, 3.3v to 3.3v and HF-LPT270 UART TX to the ESP32 RX (GPIO 37). ESP32 LOLIN S2 connection

I've not connected from the HF-LPT270 UART RX pin of the Inverter to the ESP32 TX yet as when I do it stops sending data???
I've not worked out why this occurs or what command to send to the Inverter yet to change the power setting.
This is received when power adj command sent via phone app.
+ILOPDATA=ICA,Power_adjustment,100
I'm hoping this is the echo of the change command???

I then wrote the Arduino code with the help of ChatGPT and many hours trial and error.
I'm no expert but it works surprising well.
Below is the MQTT output. It updates approx every ~5 seconds.

Inverter MQTT

The uploaded code shows as separate files but they should be tabbed as below. image

Add inverter.yaml to Home Assistant to see MQTT data.

image