[App][Pro] Sofar (Release 1.1.36, Test 1.1.44)

Hey there! I’m new to this forum, so correct me when I’m doing something wrong. I have a Sofar 20K hybrid inverter and want to connect it to my homey. And have a list of registers. Can you do something for me? Thanks in advance!

Stefan Kraaijeveld

Netherlands

Yes, no problem, if you can send me the register list I will see what I can do.

1 Like

Hope this is oke for you?

I have just checked and your inverter should already be supported..

Could you open the app settings page and send me the Diagnostics Log

Heey Adrian, tanks for the answer! 3 days ago I become father so it takes all my time. I will try it today!

Congratulations :confetti_ball:. I hope all goes well with the little one.

Hi,

Your app does not update automatically; I have to restart the app for it to update and receive data from the inverter to Homey.
I have a Homey Pro 2019 with Sofar 1.1.35 installed, and my inverter is a Sofarsolar HYD10KTL 3PH with a Pylontech Force H1 25 kWh battery. The WiFi dongle is LSW-3.

How can I get your app to update the data automatically?

The app should request the data every 15 seconds as far as I can remember.

Can you open the app settings and enable the log.

After about 30 seconds, send the log.

The last update from the app was yesterday at 10:39, if I restart the app it works for a while then it stops working again.

have sent you the log.

Hmm, it seems it is just waiting for a response from a request. I think there should be timeouts on the calls, so I’m not sure why it should for so long. I will investigate further.

Hi there, I’ve got the same problems since a year. My unprofessional solution was a flow, wich starts the sofar app new every 10 minutes again. I don’t know why this happens because in the sofar solar man app are all data’s available…?

Daniel.

I have published a new test version. I have seen a way that an error could exit a function without clearing the busy flag and that could stop further updates. This version improves the error handling to prevent that, so fingers crossed it solves the issue.

Hi Adrian,

I created a new thread where I’m looking for a way to write to the inverter using the MODBUS protocol, meaning the ability to set battery charging when electricity prices are low, and to prevent the battery from discharging when the family’s EVs are charging, etc.

Is this something you might already be looking into?

Here’s the link to my post:

Hmm, interesting, ATM the app is read only so I will need to investigate that. Do you know which registers need to be written and what values they are.

AFAIK, my inverter doesn’t allow me to write to registers, so it might be trial and error, which worries me a bit as I don’t know what the consequences are if I get it wrong.

1 Like

Here’s the link to the original Home Assistant project Sofar2mqtt, which contains a lot of useful information:

There’s also HA‑Solarman, which might be helpful since it uses the WiFi stick to communicate with the inverter.

Link to the register file for the MODBUS protocol for the HYD 3PH:

Which registers need to be read is unfortunately beyond my current knowledge level — I need to spend more time on it myself.

1 Like

I have already contacted the Sofar hotline to ask whether they plan to allow or implement battery setting adjustments via API or app. According to their statement from January 2026, this is not planned.

One aspect of this concerns me—please correct me if I am wrong. Every change to the battery settings must be written to the EPROM, and these write operations are technically limited, correct?

Typically, EPROMs have between 100000 and 1 million write cycles. So, if you did 27 writes per day, it would take 10 years to reach 100000 cycles. Obviously, this is only a statistical estimate, so no guarantees.

You can use the SofarCloud app to control the inverter:

When creating an account, you need to register as an installer.

However, that doesn’t help in my case, since I want to control everything through automation with Homey.

1 Like

Hi Adrian,

Ist it Possible to use your App with Deye Inverter?

We Talk about 1 year ago.

Is it possible that you could have a look again?

SUN-12K-S DEYE 12KW Hybrid PV-Wechselrichter
3Phasig SUN-12K-SG04LP3-E
DEYE 12KW Hybrid Wechselrichter 3Phasig SUN-10K-SG04LP3-EU

https://github.com/user-attachments/files/18012521/modbus-en.pdf

registers = (
[ 62, ‘’, ‘Year / Month’, ‘u16’, 0, 1.00, ‘’, 0, 0 ],
[ 63, ‘’, ‘Day / Hour’, ‘u16’, 0, 1.00, ‘’, 0, 0 ],
[ 64, ‘’, ‘Minute / Second’, ‘u16’, 0, 1.00, ‘’, 0, 0 ],
[ 500, ‘’, ‘Run state’, ‘u16’, 0, 1.00, ‘’, 0, 0 ],
[ 514, ‘battery_charge_today_E’, ‘Battery charge today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 515, ‘battery_discharge_today_E’, ‘Battery discharge today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 516, ‘battery_charge_total_E’, ‘Battery charge total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 517, 516, ‘Battery charge total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 518, ‘battery_discharge_total_E’, ‘Battery discharge total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 519, 518, ‘Battery discharge total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 520, ‘grid_in_today_E’, ‘Grid buy energy today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 521, ‘grid_out_today_E’, ‘Grid sell energy today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 522, ‘grid_in_total_E’, ‘Grid buy energy total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 523, 522, ‘Grid buy energy total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 524, ‘grid_out_total_E’, ‘Grid sell energy total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 525, 524, ‘Grid sell energy total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 526, ‘load_today_E’, ‘Load energy today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 527, ‘load_total_E’, ‘Load energy total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 528, 527, ‘Load energy total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 529, ‘pv_today_E’, ‘PV energy today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 534, ‘pv_total_E’, ‘PV energy total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 535, 534, ‘PV energy total h’, ‘u16’, 0, 6553.6, ‘kWh’, 0, 0 ],
[ 536, ‘gen_today_E’, ‘Generator energy today’, ‘u16’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 537, ‘gen_total_E’, ‘Generator energy total l’, ‘u32’, 0, 0.10, ‘kWh’, 1, 0 ],
[ 538, 537, ‘Generator energy total h’, ‘u16’, 0, 0.10, ‘kWh’, 0, 0 ],
[ 540, ‘DC_transformer_T’, ‘DC Transformer temperature’, ‘u16’, -1000, 0.10, ‘°C’, 1, 0 ],
[ 541, ‘heatsink_T’, ‘Heat sink temperature’, ‘u16’, -1000, 0.10, ‘°C’, 1, 0 ],
[ 551, 1000, ‘Inverter power status on/off’, ‘bit’, 0, 1, ‘’, 2, 0 ],
[ 552, 1000, ‘AC relay status’, ‘bit’, 0, 2, ‘’, 2, 0 ],
[ 586, ‘battery_T’, ‘Battery temperature’, ‘u16’, -1000, 0.10, ‘°C’, 1, 0 ],
[ 587, ‘battery_V’, ‘Battery Voltage’, ‘u16’, 0, 0.01, ‘V’, 1, 0 ],
[ 588, ‘battery_SOC’, ‘Battery state of charge’, ‘u16’, 0, 1.00, ‘%’, 1, 0 ],
[ 590, ‘battery_P’, ‘Battery power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 591, ‘battery_I’, ‘Battery current’, ‘s16’, 0, 0.01, ‘W’, 1, 0 ],
[ 592, ‘’, ‘? Corrected AH’, ‘u16’, 0, 1.00, ‘AH’, 0, 0 ],
[ 598, ‘’, ‘Grid phase 1 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 599, ‘’, ‘Grid phase 2 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 600, ‘’, ‘Grid phase 3 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 604, ‘’, ‘Inner grid phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 605, ‘’, ‘Inner grid phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 606, ‘’, ‘Inner grid phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 607, ‘’, ‘Inner grid total power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 609, ‘grid_frq’, ‘Grid frequency’, ‘u16’, 0, 0.01, ‘Hz’, 1, 0 ],
[ 610, ‘’, ‘Inner grid phase 1 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 611, ‘’, ‘Inner grid phase 2 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 612, ‘’, ‘Inner grid phase 3 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 613, ‘’, ‘Out of grid phase 1 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 614, ‘’, ‘Out of grid phase 2 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 615, ‘’, ‘Out of grid phase 3 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 616, ‘’, ‘Grid phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 617, ‘’, ‘Grid phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 618, ‘’, ‘Grid phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 619, ‘grid_P’, ‘Grid total power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 627, ‘inverter_p1_V’, ‘Inverter phase 1 voltage’, ‘u16’, 0, 0.10, ‘V’, 1, 0 ],
[ 628, ‘inverter_p2_V’, ‘Inverter phase 2 voltage’, ‘u16’, 0, 0.10, ‘V’, 1, 0 ],
[ 629, ‘inverter_p3_V’, ‘Inverter phase 3 voltage’, ‘u16’, 0, 0.10, ‘V’, 1, 0 ],
[ 630, ‘’, ‘Inverter phase 1 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 631, ‘’, ‘Inverter phase 2 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 632, ‘’, ‘Inverter phase 3 current’, ‘s16’, 0, 0.01, ‘A’, 0, 0 ],
[ 633, ‘inverter_p1_P’, ‘Inverter phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 634, ‘inverter_p2_P’, ‘Inverter phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 635, ‘inverter_p3_P’, ‘Inverter phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 636, ‘inverter_P’, ‘Inverter total power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 637, ‘’, ‘Inverter total apparent power’,‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 638, ‘inverter_frq’, ‘Inverter frequency’, ‘u16’, 0, 0.01, ‘Hz’, 1, 0 ],
[ 640, ‘’, ‘Backup phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 641, ‘’, ‘Backup phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 642, ‘’, ‘Backup phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 643, ‘backup_P’, ‘Backup total power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 644, ‘’, ‘Load phase 1 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 645, ‘’, ‘Load phase 2 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 646, ‘’, ‘Load phase 3 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 650, ‘’, ‘Load phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 651, ‘’, ‘Load phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 652, ‘’, ‘Load phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 653, ‘load_total_P’, ‘Load total power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 654, ‘’, ‘Load total apparent power’, ‘s16’, 0, 1.00, ‘W’, 0, 0 ],
[ 655, ‘load_frq’, ‘Load frequency’, ‘u16’, 0, 0.01, ‘Hz’, 1, 0 ],
[ 661, ‘’, ‘Generator phase 1 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 662, ‘’, ‘Generator phase 2 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 663, ‘’, ‘Generator phase 3 voltage’, ‘u16’, 0, 0.10, ‘V’, 0, 0 ],
[ 664, ‘gen_p1_P’, ‘Generator phase 1 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 665, ‘gen_p2_P’, ‘Generator phase 2 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 666, ‘gen_p3_P’, ‘Generator phase 3 power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 667, ‘gen_P’, ‘Generator total power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 672, ‘carport_P’, ‘Carport power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 673, ‘roof_P’, ‘Roof power’, ‘s16’, 0, 1.00, ‘W’, 1, 0 ],
[ 676, ‘carport_V’, ‘Carport voltage’, ‘u16’, 0, 0.10, ‘V’, 1, 0 ],
[ 677, ‘carport_I’, ‘Carport current’, ‘s16’, 0, 0.10, ‘A’, 1, 0 ],
[ 678, ‘roof_V’, ‘Roof voltage’, ‘u16’, 0, 0.10, ‘V’, 1, 0 ],
[ 679, ‘roof_I’, ‘Roof current’, ‘s16’, 0, 0.10, ‘A’, 1, 0 ],
[1000, ‘status’, ‘Status’, ‘bit’, 0, 1.00, ‘’, 1, 0 ]
)

Greets

Frank

It should have been supported since version 1.1.33.

Could you open the app settings page and enabled the Log Data in the Diagnostics Log tab. Then restart the app and give it about 2 minutes, then go back to that tab and hit Send Log.