Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection with new Delta devices #181

Open
vplustute opened this issue Dec 18, 2024 · 14 comments
Open

Connection with new Delta devices #181

vplustute opened this issue Dec 18, 2024 · 14 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@vplustute
Copy link

I have a Delta 2 max and the adapter works perfectly. Now I've bought a Delta 3 Pro and I can't adjust the MQTT connection at the moment because the plugin doesn't support the new devices yet. Is there any information on whether and when the new devices will be supported?

@foxthefox
Copy link
Owner

The Delta Pro3 is planned to be included, but unfortunately the communication is via protobuf encoding, which needs to be decoded. I got already some samples, but it is not near to have a detailed glue what the data represents.
Most likely I will make some preliminary hack to make the data visible and then the educated guesses is easier.
It would be nice if you can support here.

@vplustute
Copy link
Author

I can gladly support you in testing. Unfortunately, I cannot assist with any kind of programming.

@foxthefox
Copy link
Owner

Most likely I will find time today and tommorrow to make some additional code for better analysis.

@vplustute
Copy link
Author

Ok, just let me know how I can help you.

@foxthefox
Copy link
Owner

I have created the version 1.1.0, this can be installed via expert mode (head icon)and the octacat icon, via npm or from git.
This brings a new section in the second tab where you can configrue the serial number and the delta pro 3 as a unknown device.
After restart it will create log entries with [PROTOBUF unknown] tagging.
Then you may open the App and open some pages of the DP3 and may also change some settings.
You can also change toggle output and attach some loads to the device or have solar incomming.
All that will be captured in the transmitted data.
After a while you can download the log and provide it as zip here.

@vplustute
Copy link
Author

I have installed and configured everything.
I don't know if I have changed enough settings on the Delta Pro 3. I am still happy to help.

iobroker.2025-01-03.zip

@DW876
Copy link

DW876 commented Jan 6, 2025

I also have a Delta Pro 3, configured iobroker with your 1.1.1 verison. Please let me know what I can do to assist.

I've started monitoring the "set" messages and decoding them with https://protobuf-decoder.netlify.app/. I think I have found a couple of fields that correlate to Beep on/off and upper/lower charge limit values. This is mostly new to me however.

Is this helpful? I can continue if so.

Beep Off
0a 29 0a 02 48 00 10 20 18 02 20 01 28 01 38 03 40 fe 01 48 11 50 02 58 01 70 ea f6 87 cb 03 80 01 13 88 01 01 ba 01 03 69 6f 73
f	
Byte Range	Field Number	Type	Content
0-4	1	protobuf	
Byte Range	Field Number	Type	Content
0-2	9	varint	As uint: 0
As sint: 0

Beep On
0a 29 0a 02 48 01 10 20 18 02 20 01 28 01 38 03 40 fe 01 48 11 50 02 58 01 70 97 96 9a cb 03 80 01 13 88 01 01 ba 01 03 69 6f 73
Byte Range	Field Number	Type	Content
0-4	1	protobuf	
Byte Range	Field Number	Type	Content
0-2	9	varint	As uint: 1
As sint: -1

Charge Limit 25-75% (sent as two messages)
0a 2a 0a 03 b0 06 19 10 20 18 02 20 01 28 01 38 03 40 fe 01 48 11 50 03 58 01 70 ed a1 91 cb 03 80 01 13 88 01 01 ba 01 03 69 6f 73
Byte Range	Field Number	Type	Content
0-5	1	protobuf	
Byte Range	Field Number	Type	Content
0-3	102	varint	As uint: 25
As sint: -13

0a 2a 0a 03 d8 03 4b 10 20 18 02 20 01 28 01 38 03 40 fe 01 48 11 50 03 58 01 70 ed a1 91 cb 03 80 01 13 88 01 01 ba 01 03 69 6f 73
Byte Range	Field Number	Type	Content
0-5	1	protobuf	
Byte Range	Field Number	Type	Content
0-3	59	varint	As uint: 75
As sint: -38

@foxthefox
Copy link
Owner

@DW876 that look good.
From another sample I found the following commands:

message set_dp3 {
optional int32 beepCmd = 9;
optional int32 switchACoutHvCmd = 15;
optional int32 switchACoutLvCmd = 16;
optional int32 switch12VdcCmd = 18;
optional int32 switchXboostCmd = 25;
optional int32 levelChargeLimitCmd = 33;
optional int32 levelDisChargeLimitCmd = 34;
optional int32 level12VchargeCmd = 52;
optional int32 level48VchargeCmd = 53;
optional int32 levelACchargeSpeedCmd = 54;
optional int32 levelACpowerInOutCmd = 56;
optional int32 highChargeLimit = 59;
optional int32 switchGFCIRCDCmd = 61;
optional int32 lowDischargeLimitCmd =102;
}
you may verify the field numbers if you want, and if there are other commands then let me know

@foxthefox
Copy link
Owner

@vplustute

I have prepared the needed protobuf definitions to make the telegram content visible.
Over 300 values are throughout the telegrams and I can already see some which could be interpreted as temp, voltage, etc.
But I need some more help, especially on the operating conditions.

Can you create a log in the same manner as previously plus a small writeup from your performed actions related to the below suggestions?

Additionally I would hope to see change when you do the following (suggestion, but I am not sure if it is feasable):

  • note state of charge,
  • is Solar attached and what are the values according the EF-App?
  • switch on the DP3, but no AC in and no activation of any output
  • apply the AC in plug (hopefully it does not start to charge immediately, otherwise it may help to reduce the maxCharge value to lower than actual state)
  • start charging the DP3 via AC in
  • stop charging via AC in
  • switch on USB
  • attach a load to the 1st USB-C port (cell phone charging, or something what draws some watts), note down what the APP reports
  • move the load to 2nd USB-C
  • move the load to 1st USB-A or disconnect the 2nd USB-C load and use another load at USB-A, note down what the APP reports
  • move the load to 2nd USB-A
  • switch off USB
  • switch on car output
  • attach a load if you have one, note down what the APP reports
  • switch off car output
  • switch on AC output
  • attach a load to AC port (like a hair dryer), note down what the APP reports
  • move the load to the different ports (I dont think that we have here several measurements)
  • switch off the AC output
  • note state of charge
    this is to see the appearing values and map to voltage and current and state

another set of actions would be related to the EF-App, I do not knwo what is possible, but we should toggle all possible switches or sliders.

  • change the standby for LCD, to a new value and back to previous
  • change the standby for device, to a new value and back to previous
  • change the brightness of LCD, to a new value and back to previous
  • change the lower discharge value, to a new value and back to previous
  • change the upper charge value, to a new value and back to previous
  • change the value for AC charge
  • toggle AC output
  • toggle USB output
  • toggle Car output
    this helps to identify the settings inside the data.

After all the log should contain the telegrams and data and with knowing what was done and which values, I can make my educated guesses.

@foxthefox
Copy link
Owner

BTW, I could enhance the command mapping to the protobuf structure a little bit more (by looking into the official API).

message set_dp3 {
optional int32 shutdown = 3;
optional int32 beepCmd = 9;
optional int32 acTimeOut = 10;
optional int32 dcTimeOut = 11;
optional int32 screenTimeOut = 12;
optional int32 deviceTimeOut = 13;
optional int32 screenBrightness = 13;
optional int32 switchACoutHvCmd = 15;
optional int32 switchACoutLvCmd = 16;
optional int32 switch12VdcCmd = 18;
optional int32 switchXboostCmd = 25;
optional int32 levelChargeLimitCmd = 33;
optional int32 levelDisChargeLimitCmd = 34;
optional int32 levelPVcurrentLVCmd = 52;
optional int32 levelPVcurrentHVCmd = 53;
optional int32 levelACchargePowerCmd = 54;
optional int32 levelACpowerInOutCmd = 56;
optional int32 generatorStartStopCmd = 58;
optional int32 highChargeGeneratorStopLimit = 59;
optional int32 lowDischargeGeneratorStartLimit = 59;
optional int32 switchGFCIRCDCmd = 61;
optional int32 acEnergySavingOpen = 99;
optional int32 multiBpChgDsgMode = 100;
optional int32 lowDischargeLimitCmd =102; //not EF-API
}

@vplustute
Copy link
Author

vplustute commented Jan 13, 2025

Ok, that really is a lot.
I'll have to see how I can get it documented and coordinated. I'm a bit short of time at the moment. I have a lot of other things on my plate at the moment.

I have ecoflow developer access. The DeltaPro 3 is already listed there. Can that help you too?

For example

Sets the charge limit.

SetCmdRequest
{
"sn": "MR51ZAS2PG330026",
"cmdId": 17,
"dirDest": 1,
"dirSrc": 1,
"cmdFunc": 254,
"dest": 2,
"needAck": true,
"params": {
"cfgMaxChgSoc": 70
}
}

GetCmdRequest
{
"sn": "MR51ZAS2PG330026",
"params": {
"quotas": [
"cmsMaxChgSoc"
]
}
}`

GetCmdResponse
{
"code": "0",
"message": "Success",
"data": {
"cmsMaxChgSoc": 75
},
"eagleEyeTraceId": "",
"tid": ""
}

Ecoflow Developer

@foxthefox
Copy link
Owner

@vplustute
Yes, its a lot of activities, which need to be done one after another in order to see more or less singular changes in the incomming data.
FYI, the telegrams with protobuf coding do only contain values at a position in the telegram data. If they would be sent via JSON like Delta/Delta2 it would be much easier, since the object "speaks" with a name. Here it has to be mapped by educated guesses and that is supported by knowing what is the condition or the change.
There is no hurry, I am also limited on time.

The official API documentation is limited and in that special case very detailed for the commands.
The exchanged data with this API is reduced and does not explain the protobuf coding.
In particular cases it is helpful, i.e. naming the measurements. Even the multiplication factor is at many times not useable.

@foxthefox foxthefox added enhancement New feature or request help wanted Extra attention is needed labels Jan 21, 2025
@foxthefox
Copy link
Owner

@vplustute , @DW876
Can you give me some hints?
I am looking for the ranges in the EF-APP, e.g. for timeout values in other models only dedicated values are possible, or is not starting at 0.

Especially I am looking for:

  • range SOC
  • range Generator start
  • range Generator stop
  • range Charging Power IN/OUT port
  • range Charging AC power
  • range LV Mppt current
  • range HV Mppt current
  • range/values device timeout
  • range/values screen timeout
  • range/values AC timeout
  • range/values DC timeout

When I have them, I can finalize implement the commands portion.

@DW876
Copy link

DW876 commented Jan 26, 2025

Hello @foxthefox, apologies as I have been unable to collect more data from iobroker due to time. Here are the values in the app I was able to locate. I hope this is helpful.

  • range SOC
    • Discharge Limit 0-30
    • Charge limit 50-100
  • range Generator start
    • 10-30
  • range Generator stop
    • 50-100
  • range Charging Power IN/OUT port
    • 500-4000watt
  • range Charging AC power
    • 400-1500watt
  • range LV Mppt current
    • not adjustable
  • range HV Mppt current
    • not adjustable
  • range/values device timeout
    • 30m,1h,2h,4h,6h,12h,24h,never
  • range/values screen timeout
    • 10s,30s,1m,5m,30m,never
  • range/values AC timeout
    • 30m,1h,2h,4h,6h,12h,24h,never
  • range/values DC timeout
    • 30m,1h,2h,4h,6h,12h,24h,never
  • Wifi/BT timeout
    • 1h,6h,12h,1day,7day,30day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants