Skip to content

PietroLubini/homebridge-ecoflow

Repository files navigation

@pietrolubini/homebridge-ecoflow

latest beta downloads build license verified-by-homebridge Donate

@pietrolubini/homebridge-ecoflow is a plugin for homebridge which allows you to control EcoFlow devices! The goal is to add HomeKit support to EcoFlow devices and make them fully controllable from the native HomeKit iOS app and Siri.

Feedback and contribution is helpful and will improve the plugin!

If your device is not supported please create a request and specify the device model and type. Additional collaboration may be required to perform testing of new device.

Features

  • Integrates EcoFlow devices into HomeKit
  • Fully customizable HomeKit accessories
  • HomeKit automations for your EcoFlow devices

Supported Device Types

For a full list of devices that could be potentially added check here

Installation

If you are new to homebridge, please first read the homebridge documentation. If you are running on a Raspberry, you will find a tutorial in the homebridge wiki.

Install homebridge-ecoflow:

sudo npm install -g @pietrolubini/homebridge-ecoflow

Configuration

Add the EcoFlowHomebridge platform in config.json in your home directory inside .homebridge. Add your devices in the devices array. Example of configuration:

{
  "platforms": [
    {
      "devices": [
        {
          "disabled": false,
          "name": "Battery",
          "model": "Delta 2 Max",
          "serialNumber": "R123ABCDEGHI321",
          "location": "EU",
          "accessKey": "IROcwtlejtHj4qY4MRgCZW0CxoCdPVs3",
          "secretKey": "yBwYgZWqNnAlULKmF1Qrydy2Iheexj22"
        }
      ],
      "name": "Homebridge EcoFlow",
      "platform": "EcoFlowHomebridge"
    }
  ]
}

AccessKey and SecretKey

For the plugin to work EcoFlow account's AccessKey and SecretKey is required. To retrieve them

Simulate Accessory

It is possible to simulate accessory by adding simulate property to device's configuration (accessKey and secretKey could contain mock values). Quota is sent every 10 seconds with random values in this mode.

πŸ›ˆ Each simulated device should have fake unique serialNumber, accessKey and secretKey

{
  "platforms": [
    {
      "devices": [
        {
          "disabled": false,
          "name": "Battery",
          "model": "Delta 2 Max",
          "serialNumber": "R123ABCDEGHI321",
          "accessKey": "key1",
          "secretKey": "key2",
          "simulate": true
        }
      ],
      "name": "Homebridge EcoFlow",
      "platform": "EcoFlowHomebridge"
    }
  ]
}

Supported Devices

Delta 2

Services

EcoFlow Parameter Service Characteristic Standard Permission
Battery Level Battery BatteryLevel βœ… Read
Input Battery ChargingState βœ… Read
Battery Level Battery StatusLowBattery βœ… Read
AC Outlet AC On βœ… Read/Write
AC Output Outlet AC OutletInUse βœ… Read
Battery Level Outlet AC Battery Level, % πŸ”² Read
Input Outlet AC Input Consumption, W πŸ”² Read
Output Outlet AC Output Consumption, W πŸ”² Read
12V DC Outlet CAR On βœ… Read/Write
12V DC Output Outlet CAR OutletInUse βœ… Read
Battery Level Outlet CAR Battery Level, % πŸ”² Read
Input Outlet CAR Input Consumption, W πŸ”² Read
Output Outlet CAR Output Consumption, W πŸ”² Read
USB Outlet USB On βœ… Read/Write
USB Output Outlet USB OutletInUse βœ… Read
Battery Level Outlet USB Battery Level, % πŸ”² Read
Input Outlet USB Input Consumption, W πŸ”² Read
Output Outlet USB Output Consumption, W πŸ”² Read

Configuration

The following additional characteristics is available:

  • Input Consumption, W
  • Output Consumption, W
  • Battery Level, %
{
  ...
  "devices": [
    {
      ...
      "model": "Delta 2 Max",
      "battery": {
        "additionalCharacteristics": [
          "Battery Level, %",
          "Input Consumption, W",
          "Output Consumption, W"
        ]
      }
    }
  ],
}

The characteristics could be used as conditions in HomeKit Automation that uses Shortcuts:

Battery Additional Characteristics

Delta 2 Max

Supported services and configuration are the same as for Delta 2

PowerStream Micro-inverter

Services

EcoFlow Parameter Service Characteristic Standard Permission
Inverter Outlet INV On βœ… Read (Inverter AC Output > 0: ON)
Inverter AC Output Outlet INV OutletInUse βœ… Read
Inverter AC Input Outlet INV Input Consumption, W πŸ”² Read
Inverter AC Output Outlet INV Output Consumption, W πŸ”² Read
Solar Outlet PV On βœ… Read (Solar Generation > 0: ON)
Solar Generation Outlet PV OutletInUse βœ… Read
Solar Generation Outlet PV Output Consumption, W πŸ”² Read
Battery Outlet BAT On βœ… Read (Battery Discharging > 0: ON)
Battery Discharging Outlet BAT OutletInUse βœ… Read
Battery Level Outlet BAT Battery Level, % πŸ”² Read
Battery Charging Outlet BAT Input Consumption, W πŸ”² Read
Battery Discharging Outlet BAT Output Consumption, W πŸ”² Read
Lighting brightness Lightbulb On βœ… Read (> 0%: ON; 0%: OFF) / write (ON: 100%; OFF: 0%)
Lighting brightness Lightbulb Brightness βœ… Read/write
Power demand Fan On βœ… Read (> 0%: ON; 0%: OFF) / write (ON: 100%; OFF: 0%)
Power demand Fan RotationSpeed βœ… Read/write

Configuration

The following additional characteristics is available:

  • type (600, 800)
  • battery:
    • Input Consumption, W
    • Output Consumption, W
    • Battery Level, %
  • pv:
    • Output Consumption, W
  • inverter:
    • Input Consumption, W
    • Output Consumption, W
{
  ...
  "devices": [
    {
      ...
      "model": "PowerStream",
      "powerStream": {
        "type": "800",
        "batteryAdditionalCharacteristics": [
          "Battery Level, %",
          "Input Consumption, W",
          "Output Consumption, W"
        ],
        "pvAdditionalCharacteristics": [
          "Output Consumption, W"
        ],
        "inverterAdditionalCharacteristics": [
          "Input Consumption, W",
          "Output Consumption, W"
        ]
      }
    }
  ],
}

Troubleshooting

Debug

If you have any issues with the plugin or device services then you can run homebridge in debug mode, which will provide some additional information. This might be useful for debugging issues.

Homebridge debug mode:

homebridge -D

Deep debug log, add the following to your config.json:

"deepDebugLog": true

This will enable additional extra log which might be helpful to debug all kind of issues.