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": ""
}
]
@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.

@nalditopr
Copy link

nalditopr commented Dec 3, 2024

I made a modification of this method to talk to the Delta 3 + Unit.

Still a very rough approach but works to set self powered mode, beep, charge target and monitor usage and battery.

https://gist.github.com/nalditopr/493af377e9928b88c2639a9e1607f127

Hope this helps someone else.

Here is what I did;

image
image
image
image
image

@Lilian-Muxart
Copy link

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.

I actually tried to check all possible MQTT topics to see if, when I turn on the generator using the app, I can see the payload in MQTT. Unfortunately, I only see the data from the set/reply and not from the /set. It seems that the app for the dual-fuel generator is sending the frames through another method.

@Lilian-Muxart
Copy link

Hello,
Finally, I found the payload with the MQTT topics. I didn’t know there were so many more MQTT topics—I was just using the topics written in the official EcoFlow documentation.

Here is the startup payload; it might help:

{
"id": "385091323",
"isMatter": 0,
"moduleType": 2,
"operateType": "motorCtrl",
"params": {
"enable": 1
},
"version": "1.0"
}

@marcuslib
Copy link

i dont know why, but i dont seem to get anything pulling through in the debug, this is for a delta 3 plus
image

@foxthefox
Copy link
Author

foxthefox commented Jan 31, 2025

I think you should change the mqtt-in nodes.
After "/app/" the mqtt user should be present and not the APP-identifier.
mqtt user should be soemthing starting with "1..."

The App identifier must be part of the mqtt setup at Client-Id

@foxthefox
Copy link
Author

May be interesting for you is ioBroker.ecoflow-mqtt adapter which has in meantime also a section to track and trace the unknwon devices.
see here: foxthefox/ioBroker.ecoflow-mqtt#181
If we are able to decode the telegrams, then we have a running D3+ adapter.

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