After pulling out most of my hair I’ve decided to bite the bullet and ask the Home Assistant community for help.
As the title indicates I want to collect inverter data from my INVT iMars BG12KTR-US inverter. For the time being I collect the data via the Solarman API, but it only updates about every 5 to 15 minutes, and I want realtime data.
The thought is to connect to the inverter using Modbus RTU over WiFi, but it seems as if I am missing something in the setup somewhere. I’ve tried to reach out to both INVT and my dealer to get stop bit, parity, flow control and the register map for the inverter, but have not got any response. Nevertheless, I think that after som researching on the web, I have got the Serial Port Settings right. The Elfin-EW11A is set up as a TCP-server, and I’ve tried using the Windows-app called Modbus Poll to connect to the inverter, but all I get is timeout errors. When setting up a modbus sensor in HA its only state is “Unknown”.
I guess that the adress might be wrong, but it’s the best guess I could make after viewing a few videos on YouTube…
However, when I set the Protocol Settings on Elfin-EW11A to “None” (instead of “Modbus”) I am able to connect to the inverter and read inverter data using iMars WinExpert and iMars PhoneExpert.
This got me thinking that it might be possible to somehow find out how to communicate with the inverter by investigating how theese apps does it. I did decompile the apk found on INVT website, but unfortunately soon concluded that it is beyond my current skill level to investigate how the app communicates with the inverter. Maybe some of you would be willing to help me out? Or maybe some of you can tell me what I do wrong?
So… After A LOT of head-scratching I finally managed to find a way to collect at least some of the inverter data from my INVT inverter. I had to dig into the code of the Android APK, and found a file with hints of what addresses to use. The ones that I managed to find, and that I found useful is 5797 (real time power), 5633 (peak effect today) and 5655 (production today)
I have placed the a personalized version of the below code into my configuration.yaml, and the sensors has worked as I want for a few days now.
It’s worth mentioning that in order to get reliable readings from my inverter I had to unplug the 4G logger (the one sending info to Solarman) from the RS485-port on the inverter. Failing to do so led to intermittent readings and also some wrong readings, mostly in form of unrealistic spikes. The Elfin device is connected to the EXT port oft the INVT inverter.
Please refer to the below screenshots for how to set up the Elfin-EW11A device.
Hello there!
Because of a fault on my BG12KTR-US inverter, it was replaced with an XG10KTR-Z in February (and will soon be replaced again by the 12 kW version…). I just wanted to update anyone who might be interested on how I got the new inverter into Home Assistant.
The iMars apps doesn’t work with my new inverter, so I had to find another way to obtain the correct addresses. After a few days of waiting, I finally received the INVT XG&XD Inverter Modbus RTU Protocol from my dealer. The addresses I found were in HEX format, so I had to convert them to decimal numbers.
Unfortunately, I have been unable to find the reading for the peak power so far, but the addresses that I managed to find and have found useful are 14364 (real-time power), 14483 (production today), and 14385 (cumulative total production).
My code in the configuration.yaml file now looks like the following, and has been working for a few days now:
Hi! I wanted to say thanks a lot for this guide! Bought the Elfin-EW11A and set it up with your values on our INVT BG7KTR at it is working perfectly!
I had to remove the values close_comm_on_error, retry_on_empty and retries from the config.
Thank you very much
I also added device_class and state_class to the sensors to enable using the sensors in the energy dashboard and enable long term statistics. Here is my config: