EcoFlow OpenHAB Integration (Binding)

Hi,
I just bought an EcoFlow Delta Max Powerstation and wonder if anyone managed to integrate an EcoFlow device into OpenHAB.

For Home Assistant they seemed to have success.

It would be great to use these devices as intelligent battery storage in combination with an photovoltaic system.

Regards

Tim

Just in reply to your request i managed to get a basic integration for my delta 2 here.
I used the mqtt interface, so its not that hard to implement.
Follow the basic instructions to get your credentials with the following guide Accessing-EF
You ll need to be registered in the ecoflow app and these credentials you need for the next steps. If your managed to run the linked script youll get allmost all the data you need.

ill post the code of the broker and the channels here so you should be able to adapt or enhance. Just create an mqtt target yourself, and tune it to your needs. Its very basic atm but works for me.

if they change the app or something you ll need to investigate the calls again, even the delta max might have slightly different json calls.

The mqtt broker (e00b275b89 PW and User must be changed)

UID: mqtt:broker:e00b275b89
label: MQTT Broker ecoflow
thingTypeUID: mqtt:broker
configuration:
  lwtQos: 0
  publickeypin: false
  keepAlive: 60
  clientID: openhab
  hostnameValidated: false
  secure: true
  birthRetain: false
  shutdownRetain: false
  certificatepin: false
  password: YOURPWFROMTHEAPP
  protocol: TCP
  qos: 0
  reconnectTime: 60000
  port: 8883
  mqttVersion: V3
  host: mqtt.ecoflow.com
  lwtRetain: true
  username: YOURUSERNAMEFROMTHEAPP
  enableDiscovery: false

The Channels (again change IDs SRN and clientID)

UID: mqtt:topic:e00b275b89:2e180fbcbe
label: MQTT Thing ecoflow delta 2
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:e00b275b89
channels:
  - id: soc
    channelTypeUID: mqtt:string
    label: soc
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.soc.*)∩JSONPATH:$.params.['pd.soc']
  - id: carwatts
    channelTypeUID: mqtt:string
    label: carwatts
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.carWatts.*)∩JSONPATH:$.params.['pd.carWatts']
  - id: usb1Watts
    channelTypeUID: mqtt:string
    label: usb1Watts
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.usb1Watts.*)∩JSONPATH:$.params.['pd.usb1Watts']
  - id: outputWatts
    channelTypeUID: mqtt:string
    label: outputWatts
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.outWatts.*)∩JSONPATH:$.params.['pd.outWatts']
  - id: inputWatts
    channelTypeUID: mqtt:string
    label: inputWatts
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.inputWatts.*)∩JSONPATH:$.params.['pd.inputWatts']
  - id: achargespeedswitch
    channelTypeUID: mqtt:switch
    label: achargespeedswitch
    description: null
    configuration:
      commandTopic: /app/YOURCLIENTID/YOURSRN/thing/property/set
      off: '{"from":"Android","id":"490361407","moduleType":5,"operateType":"acChgCfg","params":{"chgWatts":200,"chgPauseFlag":255},"version":"1.0"}'
      on: '{"from":"Android","id":"490361407","moduleType":5,"operateType":"acChgCfg","params":{"chgWatts":500,"chgPauseFlag":255},"version":"1.0"}'
  - id: dcswitch
    channelTypeUID: mqtt:switch
    label: dcswitch
    description: null
    configuration:
      commandTopic: /app/YOURCLIENTID/YOURSRN/thing/property/set
      off: '{"params":{"enabled":0},"from":"Android","lang":"en-us","id":"824661624","moduleSn":
        "YOURSRN","moduleType":5,"operateType":"mpptCar","version":"1.0"}'
      on: '{"params":{"enabled":1},"from":"Android","lang":"en-us","id":"824661624","moduleSn":
        "YOURSRN","moduleType":5,"operateType":"mpptCar","version":"1.0"}'
  - id: acswitch
    channelTypeUID: mqtt:switch
    label: acswitch
    description: null
    configuration:
      commandTopic: /app/YOURCLIENTID/YOURSRN/thing/property/set
      off: '{"from":"Android","id":"160291434","moduleType":5,"operateType":"acOutCfg","params":{"out_voltage":-1,"out_freq":255,"xboost":255,"enabled":0},"version":"1.0"}'
      on: '{"from":"Android","id":"160291434","moduleType":5,"operateType":"acOutCfg","params":{"out_voltage":-1,"out_freq":255,"xboost":255,"enabled":1},"version":"1.0"}'
  - id: pvchargeswitch
    channelTypeUID: mqtt:switch
    label: pvchargeswitch
    description: null
    configuration:
      commandTopic: /app/YOURCLIENTID/YOURSRN/thing/property/set
      off: '{"from":"Android","id":"458351940","moduleType":1,"operateType":"pvChangePrio","params":{"pvChangeSet":0},"version":"1.0"}'
      on: '{"from":"Android","id":"458351940","moduleType":1,"operateType":"pvChangePrio","params":{"pvChangeSet":1},"version":"1.0"}'
  - id: typec1Watts
    channelTypeUID: mqtt:string
    label: typec1Watts
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.typec1Watts.*)∩JSONPATH:$.params.['pd.typec1Watts']
  - id: usbswitch
    channelTypeUID: mqtt:switch
    label: usbswitch
    description: null
    configuration:
      commandTopic: /app/YOURCLIENTID/YOURSRN/thing/property/set
      off: '{"params":{"enabled":0},"from":"Android","lang":"en-us","id":"824661624","moduleSn":
        "YOURSRN","moduleType":1,"operateType":"dcOutCfg","version":"1.0"}'
      on: '{"params":{"enabled":1},"from":"Android","lang":"en-us","id":"824661624","moduleSn":
        "YOURSRN","moduleType":1,"operateType":"dcOutCfg","version":"1.0"}'
  - id: remainTime
    channelTypeUID: mqtt:string
    label: remainTime
    description: null
    configuration:
      stateTopic: /app/device/property/YOURSRN
      transformationPattern: REGEX:(.*pd.remainTime.*)∩JSONPATH:$.params.['pd.remainTime']

ecoflow closed mqtt access, ill keep you updated if i can get it working again

MQTT acces still works. However you have to make sure, that you use the same client id that the smartphone application uses.

Where do you get the client id?