Skip to content

Instantly share code, notes, and snippets.

@foxthefox
Created January 23, 2024 07:26
Show Gist options
  • Save foxthefox/11ac35433c228085a8f5e25d5651632a to your computer and use it in GitHub Desktop.
Save foxthefox/11ac35433c228085a8f5e25d5651632a to your computer and use it in GitHub Desktop.
ecoflow_node-red
[
{
"id": "5c3a7efbb734c312",
"type": "tab",
"label": "Flow 1",
"disabled": false,
"info": "",
"env": []
},
{
"id": "5b6c19b0a776f928",
"type": "mqtt in",
"z": "5c3a7efbb734c312",
"name": "",
"topic": "/app/device/status/XXXdeviceID",
"qos": "2",
"datatype": "json",
"broker": "4a025f91e9595714",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 490,
"y": 160,
"wires": [ [ "c8d401ac3c0d530b" ] ]
},
{
"id": "773fab09ddaa9e53",
"type": "inject",
"z": "5c3a7efbb734c312",
"name": "connect",
"props": [
{
"p": "action",
"v": "connect",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 160,
"y": 60,
"wires": [ [ "d5d7e8960ba14429" ] ]
},
{
"id": "671e0ceff575862c",
"type": "inject",
"z": "5c3a7efbb734c312",
"name": "disconnect",
"props": [
{
"p": "action",
"v": "disconnect",
"vt": "str"
},
{
"p": "topic",
"vt": "str"
}
],
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": 0.1,
"topic": "",
"x": 160,
"y": 120,
"wires": [ [ "d5d7e8960ba14429" ] ]
},
{
"id": "d5d7e8960ba14429",
"type": "mqtt out",
"z": "5c3a7efbb734c312",
"name": "ef-mqtt",
"topic": "",
"qos": "",
"retain": "",
"respTopic": "",
"contentType": "",
"userProps": "",
"correl": "",
"expiry": "",
"broker": "4a025f91e9595714",
"x": 360,
"y": 60,
"wires": []
},
{
"id": "6d38c1d92d6c19eb",
"type": "mqtt in",
"z": "5c3a7efbb734c312",
"name": "",
"topic": "/app/mqttuserID/XXXdeviceID/thing/property/get",
"qos": "2",
"datatype": "json",
"broker": "4a025f91e9595714",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 360,
"y": 240,
"wires": [ [ "0cf29e3992e7bfdc" ] ]
},
{
"id": "c8d401ac3c0d530b",
"type": "debug",
"z": "5c3a7efbb734c312",
"name": "debug 2",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 160,
"wires": []
},
{
"id": "0cf29e3992e7bfdc",
"type": "debug",
"z": "5c3a7efbb734c312",
"name": "debug 3",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 240,
"wires": []
},
{
"id": "d9ecc011d0be04ea",
"type": "mqtt in",
"z": "5c3a7efbb734c312",
"name": "",
"topic": "/app/mqttuserID/XXXdeviceID/thing/property/get_reply",
"qos": "2",
"datatype": "json",
"broker": "4a025f91e9595714",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 380,
"y": 300,
"wires": [ [ "5dc759c3914d8893" ] ]
},
{
"id": "34495fd19ce3c931",
"type": "mqtt in",
"z": "5c3a7efbb734c312",
"name": "",
"topic": "/app/mqttuserID/XXXdeviceID/thing/property/set",
"qos": "2",
"datatype": "json",
"broker": "4a025f91e9595714",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 360,
"y": 360,
"wires": [ [ "1b07cbc9319439e6" ] ]
},
{
"id": "196e8e1147aa9c70",
"type": "mqtt in",
"z": "5c3a7efbb734c312",
"name": "",
"topic": "/app/mqttuserID/XXXdeviceID/thing/property/set_reply",
"qos": "2",
"datatype": "json",
"broker": "4a025f91e9595714",
"nl": false,
"rap": true,
"rh": 0,
"inputs": 0,
"x": 380,
"y": 420,
"wires": [ [ "222174cf92b067ba" ] ]
},
{
"id": "5dc759c3914d8893",
"type": "debug",
"z": "5c3a7efbb734c312",
"name": "debug 4",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 300,
"wires": []
},
{
"id": "1b07cbc9319439e6",
"type": "debug",
"z": "5c3a7efbb734c312",
"name": "debug 5",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 360,
"wires": []
},
{
"id": "222174cf92b067ba",
"type": "debug",
"z": "5c3a7efbb734c312",
"name": "debug 6",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 860,
"y": 420,
"wires": []
},
{
"id": "4a025f91e9595714",
"type": "mqtt-broker",
"name": "ecoflow",
"broker": "mqtts://mqtt.ecoflow.com:8883",
"port": "8883",
"clientid": "ANDROID_xxxxxx",
"autoConnect": false,
"usetls": false,
"protocolVersion": "4",
"keepalive": "60",
"cleansession": true,
"autoUnsubscribe": true,
"birthTopic": "",
"birthQos": "0",
"birthRetain": "false",
"birthPayload": "",
"birthMsg": {},
"closeTopic": "",
"closeQos": "0",
"closeRetain": "false",
"closePayload": "",
"closeMsg": {},
"willTopic": "",
"willQos": "0",
"willRetain": "false",
"willPayload": "",
"willMsg": {},
"userProps": "",
"sessionExpiry": ""
}
]
@cool338
Copy link

cool338 commented Jan 27, 2024

Moin,

Ich hab mal

/app/device/property/DGEBZ5RE3040062 (Status Information) (Debug7)
/app/1571628711510835202/DGEBZ5RE3040062/set (Set Configuration)(Debug8)
/app/1571628711510835202/DGEBZ5RE3040062/get (Get Configuration)(Debug9)

Hinzugefügt

27.1.2024, 23:09:58node: debug 2
/app/device/status/DGEBZ5RE3040062 : msg.payload : Object
object
id: "1646324085252690214"
params: object
status: 0
timestamp: 2024-01-27T22:09:08.181Z
version: "1.0"
27.1.2024, 23:10:37node: debug 2
/app/device/status/DGEBZ5RE3040062 : msg.payload : Object
object
id: "1646324420260142552"
params: object
status: 1
timestamp: 2024-01-27T22:09:47.314Z
version: "1.0"
27.1.2024, 23:10:37node: debug 7
/app/device/property/DGEBZ5RE3040062 : msg.payload : Object
object
params: object
version: "1.0"
cmdId: 0
cmdFunc: 0
id: 1646324420260147500
addr: 0
timestamp: 1706393387515
27.1.2024, 23:10:40node: debug 7
/app/device/property/DGEBZ5RE3040062 : msg.payload : Object
object
params: object
oil.oilVal: 68
oil.acPower: 0
oil.acState: 0
oil.num: 0
latestTimeStamp: 1706393390384
oil.sysMode: 0
oil.type: 2
oil.totalPower: 0
oil.version: 65691
oil.remainTime: 5940
oil.dcPower: 0
oil.errCode: 0
oil.ceelId: 0
oil.dcOutState: 0
oil.motorState: 0
oil.oilMaxOutPower: 1800
oil.motorUseTime: 202
version: "1.0"
cmdId: 0
cmdFunc: 0
id: 1646324446029948000
addr: 0
timestamp: 1706393390384

Motor An

27.1.2024, 23:12:04node: debug 7
/app/device/property/DGEBZ5RE3040062 : msg.payload : Object
object
params: object
oil.oilVal: 68
oil.acPower: 0
oil.acState: 1
oil.num: 0
latestTimeStamp: 1706393474370
oil.sysMode: 1
oil.type: 2
oil.totalPower: 0
oil.version: 65691
oil.remainTime: 556
oil.dcPower: 0
oil.errCode: 0
oil.ceelId: 0
oil.dcOutState: 0
oil.motorState: 1
oil.oilMaxOutPower: 1800
oil.motorUseTime: 202
version: "1.0"
cmdId: 0
cmdFunc: 0
id: 1646325167584453400
addr: 0
timestamp: 1706393474370

27.1.2024, 23:16:13node: debug 2
/app/device/status/DGEBZ5RE3040062 : msg.payload : Object
object
id: "1646327306478168040"
params: object
status: 0
timestamp: 2024-01-27T22:15:23.421Z
version: "1.0"

@cool338
Copy link

cool338 commented Jan 27, 2024

Ich hätte seit heute auch noch eine wave 2 :-)

@cool338
Copy link

cool338 commented Jan 28, 2024

Hier für die Wave 2

28.1.2024, 10:56:46node: debug 10
/app/device/status/KT21ZEH5ZF540492 : msg.payload : Object
object
id: "704030545"
params: object
status: 0
timestamp: 1706435754914
version: "1.0"

28.1.2024, 10:57:02node: debug 10
/app/device/status/KT21ZEH5ZF540492 : msg.payload : Object
object
id: "873591510"
params: object
status: 1
timestamp: 1706435770626
version: "1.0"

28.1.2024, 10:59:34node: debug 15
/app/device/property/KT21ZEH5ZF540492 : msg.payload : Object
object
addr: 0
cmdFunc: 0
cmdId: 0
id: 1646689801887023900
version: "1.0"
timestamp: 2024-01-28T09:58:43.000Z
moduleType: "1"
params: object
pd.bmsErr: 0
pd.coolTemp: 29.7
pd.batChgRemain: 0
pd.fanValue: 0
pd.idleMode: 1
pd.refEn: 0
pd.reserved: array[20]
pd.rgbState: 0
pd.batChgStatus: 0
pd.beepEn: 0
pd.psdrPower: 19
pd.powerMode: 1
pd.tempDisplay: 0
pd.bmsUnderVoltage: 0
pd.timeSet: 0
pd.mpptWork: 0
pd.timeRemain: 0
pd.ver: 1
pd.batSoc: 0
pd.pvPower: 0
pd.timeEn: 0
pd.envTemp: 21.9
pd.waterValue: 0
pd.wteFthEn: 1
pd.deviceName: ""
pd.bmsPid: 0
pd.batDsgRemain: 0
pd.idleTime: 300
pd.tempSys: 0
pd.batPower: 0
pd.powerSrc: 1
pd.errCode: 0
pd.mainMode: 1
pd.subMode: 2
pd.setTemp: 23
pd.bmsBoundFlag: 0

28.1.2024, 10:59:35node: debug 15
/app/device/property/KT21ZEH5ZF540492 : msg.payload : Object
object
addr: 0
cmdFunc: 0
cmdId: 0
id: 1646689801887024000
version: "1.0"
timestamp: 2024-01-28T09:58:43.000Z
moduleType: "1"
params: object
pd.setTempCel: 23
pd.condTemp: 2257
pd.heatEnv: 1861
pd.waterValue: 0
pd.sysPowerWatts: 19
pd.pdErrCode: 0
pd.pdMainMode: 1
pd.pdSubMode: 2
pd.resv: array[32]
pd.lcdStatus: 1
pd.powerSts: 1
pd.setFanVal: 0
pd.pdTempSys: 0
pd.evapTemp: 2382
pd.motorOutTemp: 4251
pd.coolEnv: 2973
pd.airInTemp: 2197
pd.setTempfah: 73

28.1.2024, 10:59:35node: debug 15
/app/device/property/KT21ZEH5ZF540492 : msg.payload : Object
object
addr: 0
cmdFunc: 0
cmdId: 0
id: 1646689810476958500
version: "1.0"
timestamp: 2024-01-28T09:58:44.000Z
moduleType: "1"
params: object
pd.psdrPower: 48
pd.coolTemp: 29.6
pd.envTemp: 21.8

Screenshot 2024-01-28 110413

@foxthefox
Copy link
Author

Ja super, hilft weiter. Ich schau es mir mal an. Evtl. muss es noch ein paar Tests geben.
Zur Wave2 habe ich schon etwas im HA-adapter einfliessen lassen, sollte bei der nächsten Version dabei sein.
Derzeitig bin ich noch an einem HA-gateway dran, da ich einen iobroker Adapter entwickelt habe und das bei der HA-integration etwas länger dauern könnte, wäre das eine durchaus vertretbare Zwischenlösung.

@foxthefox
Copy link
Author

foxthefox commented Feb 4, 2024

Bzgl. des Generators hab ich noch Fragen.
Welche Befehle kann man aus der App abesetzen? Generator Start/stop? AC an/aus? DC an/aus?
Die obige Laufzeit von 202 sind Minuten oder Sekunden?
Was könnte oilVal=68 sein?

Für die Kommandos müsste debug8 .../set beobachtet werden, wenn aus der App heraus bedient wird.
Beim .../get_reply wäre interessant wenn man die App öffnet und den Generator auswählt.

Edit: die mqttuserID ist durch die Zahl vom Holen des Logins zu ersetzen. Die Abos auf /app/mqttuserID/.... sind unwirksam

@cool338
Copy link

cool338 commented Feb 4, 2024

Moin,

Hier mal die Übersicht in der App.

1000030203
DC kann man nicht ein bzw ausschalten ist wen Akku zu geschaltet ist immer an. Bzw Akku nimmt sich das was der braucht.

Also Start Stop
Umschalten auf Eco bzw Hochleistung
68% ist Kraftstofftank
Die 202 könnten Minuten sein gesamte Laufzeit. In der App wird 3h angezeigt

@foxthefox
Copy link
Author

Super, danke.
Dann dürfte acState, motorState und systemMode die Schalter sein, dazu müssten wir dann noch die Kommandos herausfinden (das was bei .../set aufläuft).

@cool338
Copy link

cool338 commented Feb 5, 2024

Ich werde mal heute Abend Testen.
Ich meine bei /Set hab ich nichts Empfangen.

@cool338
Copy link

cool338 commented Feb 10, 2024

Ich hab nun noch einmal versucht:

Die daten kommen nur über Debug 7 "/app/device/property/DGEBZ5RE3040062"

Motor An

10.2.2024, 15:48:06node: debug 7
/app/device/property/DGEBZ5RE3040062 : msg.payload : Object
object
params: object
oil.oilVal: 68
oil.acPower: 0
oil.acState: 1
oil.num: 0
latestTimeStamp: 1707576406631
oil.sysMode: 1
oil.type: 2
oil.totalPower: 0
oil.version: 65691
oil.remainTime: 559
oil.dcPower: 0
oil.errCode: 0
oil.ceelId: 0
oil.dcOutState: 0
oil.motorState: 1
oil.oilMaxOutPower: 1800
oil.motorUseTime: 202
version: "1.0"
cmdId: 0
cmdFunc: 0
id: 1656486476091250000
addr: 0
timestamp: 1707576406631

Motor aus:

10.2.2024, 15:48:30node: debug 7
/app/device/property/DGEBZ5RE3040062 : msg.payload : Object
object
params: object
oil.oilVal: 68
oil.acPower: 0
oil.acState: 0
oil.num: 0
latestTimeStamp: 1707576430621
oil.sysMode: 0
oil.type: 2
oil.totalPower: 0
oil.version: 65691
oil.remainTime: 5940
oil.dcPower: 0
oil.errCode: 0
oil.ceelId: 0
oil.dcOutState: 0
oil.motorState: 0
oil.oilMaxOutPower: 1800
oil.motorUseTime: 202
version: "1.0"
cmdId: 0
cmdFunc: 0
id: 1656486682249680000
addr: 0
timestamp: 1707576430621

@foxthefox
Copy link
Author

Hmm, wenn bei .../set nichts ankommt, dann wirds wohl nur ne Anzeige werden können. Oder man findet noch das Topic auf dem die Befehler gesendet werden.
Danke dennoch erstmal, ich werde es erstmal so implementieren.

@Lilian-Muxart
Copy link

Hello, I’m contacting you because I would like to start my dual fuel smart generator via MQTT. I’ve looked through the documentation but I couldn’t find the payload (JSON) to send to the MQTT server to start the generator. I tried something like this, but it didn’t work. Do you have a solution ?
{
"from": "tcp",
"id": "995956690",
"version": "1.0",
"moduleType": 1,
"operateType": "motorStateCfg",
"params": {
"enabled": 1
}
}

@foxthefox
Copy link
Author

The usual way would be to look at the mqtt telegrams which are sent through the App to the device.
If you have built up the nodered flow then the ".../set" is the one for debugging. The nice thing about mqtt is the ability to see as a client what other clients have done when the same topic is subscribed. So the App gets visible.

Since I do not have data for the dual fuel generator, it would be good if you could post the messages from the debug2, 3 and 5.
Then I would integrate it in the iobroker adapter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment