Comments (6)
Thanks for reporting! The docs that I have for the modbus protocol make no mention of a 4th type. Could you please let me know which charge controller you have? On my Charge controller I must set "USER" battery type for a LiFePO4 battery you maybe have a newer model.
from epevermodbus.
I have an Epever Tracer2210AN.
On my Charge controller I must set "USER" battery type for a LiFePO4 battery you maybe have a newer model.
Right, it surprised me that most tutorials I found online said that LiFePO users should use the "USER" type when my device had clear support LiFePO4 and LiFePO8.
from epevermodbus.
I've decompiled the official controller software from https://www.epever.com/support/softwares/
And there's three variants of the protocol, each with support for different battery types:
public static readonly string[] BatteryType = new string[6]
{
nameof (LiBattery),
"LeadAcid(MF)",
nameof (GelBattery),
"LeadAcid(Liquid)",
"LiFePO4",
"Li-NiCoMn"
};
public static readonly string[] BatteryType3 = new string[11]
{
nameof (User),
"LeadAcid(MF)",
nameof (GelBattery),
"LeadAcid(Liquid)",
"LeadAcid(MF)User",
nameof (GelBatteryUser),
"LeadAcid(Liquid)User",
nameof (LiIronBatteryNum4),
nameof (LiThreeBatteryNum3),
nameof (LiIronBatteryNum8),
nameof (LiThreeBatteryNum6)
};
public static readonly string[] BatteryType1 = new string[4]
{
nameof (User),
"LeadAcid(MF)",
nameof (GelBattery),
"LeadAcid(Liquid)"
};
From searching Google it seems: LeadAcid(MF)
is Sealed and LeadAcid(Liquid)
is Flooded.
Also, in BatteryType
, the type User appears as LiBattery
(value 0). This is evidenced by the following code:
public bool IsUserType => this.batteryType == 0;
So all together:
BatteryType
Field Name | Index |
---|---|
User | 0 |
Sealed | 1 |
GelBattery | 2 |
Flooded | 3 |
LiFePO4 | 4 |
Li-NiCoMn | 5 |
BatteryType3
Field Name | Index |
---|---|
User | 0 |
Sealed | 1 |
GelBattery | 2 |
Flooded | 3 |
SealedUser | 4 |
GelBatteryUser | 5 |
FloodedUser | 6 |
LiIronBatteryNum4 | 7 |
LiThreeBatteryNum3 | 8 |
LiIronBatteryNum8 | 9 |
LiThreeBatteryNum6 | 10 |
BatteryType1
Field Name | Index |
---|---|
User | 0 |
Sealed | 1 |
GelBattery | 2 |
Flooded | 3 |
from epevermodbus.
Wow, that's great investigation! So I guess we can easily cover the case for the two shorter variants. But the one with 11 entries might be an issue as the value for 4 and 5 would conflict. We will need a way to differentiate when we are dealing with BatteryType3. Any ideas? Or was there anything in the code that might indicate when BatteryType3 might be in use?
from epevermodbus.
Ok, the Android app seems to be even more useful since it's sources are JavaScript which is "just minified", rather than compiled. Here's the releavant formatted file: app-service.clean.zip
It seems that the following lines are common to all devices:
this.battery_type_list = [{
id: 0,
val: this.$t("message.batterySetting.battery_opt.customize"),
type: 0
}, {
id: 1,
val: this.$t("message.batterySetting.battery_opt.AGM"),
type: 1
}, {
id: 2,
val: this.$t("message.batterySetting.battery_opt.GEL"),
type: 2
}, {
id: 3,
val: this.$t("message.batterySetting.battery_opt.FLD"),
type: 3
}
which matches your list.
But there's for some models, this list is expanded:
Followed by: this.battery_type_list.length < 5 && (this.battery_type_list = this.battery_type_list.concat($));
from epevermodbus.
Sorry I don't have an "easy" answer to your question. It seems their protocol is just a mess, and many fields are device-dependent for IDs >= 4.
from epevermodbus.
Related Issues (18)
- syntax error on raspberry pi 4 HOT 2
- Write battery parameters HOT 13
- Add temperature limit readings HOT 1
- Fix command-line tool solar power call, possibly use native power readings, add battery power. HOT 9
- Add switches to command line tool (filters, load control, etc.) HOT 1
- Testing local changes HOT 3
- Automated testing / test harness HOT 1
- Are the retries necessary? HOT 4
- Negative temperature readings HOT 3
- Incorrect Battery Type HOT 1
- Req: Write Coils for Load On/Off Switching HOT 4
- write other parameters HOT 1
- Read / Set controller clock HOT 3
- feature output
- Change EPEVER slave address HOT 4
- Error message after running "epevermodbus --portname /dev/ttyUSB0 --slaveaddress 1" HOT 7
- Reset
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epevermodbus.