rotflorg / node-red-contrib-ecoflow-powerstream

Other
1 stars 0 forks source link

Ecoflow Node Red module

A Node Red module that allows conversion and aggregation of MQTT data generated by Ecoflow devices. Via the ecoflow-cmd node, very limited control over the PowerStream micro inverter is supported.

The aggregation currently concentrates on main core vital values for the system PowerStream in combination with a power station. There are plans to expand this project, but for now, there is nothing more. Contributions are welcome.

Supported device types

In the editor for the node, you need to configure your device type. The following devices are currently supported:

Node "ecoflow-in"

The ecoflow-in node receives MQTT messages and provides user-readable and aggregated JSON messages.

Output message types

In the editor of the node, you can configure the "Output message types". This defines the types of messages generated by this node from the binary (buffer) input messages received via MQTT. The following types exist:

Aggregated information

As the input data consists of different values that are updated by different messages in different intervals, it comes in handy to have an aggregated messages that combines the current values of all relevant variables. Additionaly, there is an associated timeout for each input variable that resets it back to zero if it is not updated anymore (e.g. the sending device looses network connection or has no power).

This section describes the generated aggregated information by the node. The aggregated messages have a topic to which "/aggregated" is appended as suffix.

Device type "PowerStream"

Device type "Delta 2 Max"

Connect MQTT

Use a regular MQTT input for Node Red. Forward that input to the ecoflow-powerstream function defined by this plugin.

Get login details

Use this bash script to get your login details. It will spit out protocol, host, port, username and password (and a lot more information you don't need right now). Alternatively, you can use this web site.

Configure the MQTT input node

Add a new server, configure as follows:

Tab "Connection":

Tab "Security":

Back in the "mqtt in" node, set:

Node "ecoflow-cmd"

The ecoflow-cmd node allows you to send commands to the device to change settings. Currently, only the Ecoflow PowerStream micro inverter is supported.

Node settings

Configure your node in the editor as follows:

Node flow

On the input side of the ecoflow-cmd node, you need to generate a message that defines which value to set. See "Message format" below.

On the output side, you need the messages generated by the ecoflow-cmd node to an MQTT output. Configure the mqtt out node as follows:

Message format

The input message to the ecoflow-cmd node needs to be a JSON message. This JSON needs to have exactly the following properties:

The following commands exist:

Sample message

The following input message (fed into ecoflow-cmd node) will generate a binary message that sets the egress power to 200 watts (when piped into the MQTT output node configured as described above):

{
  "topic": "/not/relevant/",
  "payload": { "command": "setAcWatts", "value": 200, "deviceSn": "HW51ZXXXXXXXXXXX" }
}