Skip to content

Stream AC Pro: protobuf bidirectional control and state decoding#793

Open
jegorden wants to merge 2 commits into
tolwi:mainfrom
jegorden:main
Open

Stream AC Pro: protobuf bidirectional control and state decoding#793
jegorden wants to merge 2 commits into
tolwi:mainfrom
jegorden:main

Conversation

@jegorden
Copy link
Copy Markdown

The EcoFlow Stream AC Pro uses an internal protobuf MQTT API rather than
the JSON public API for device control. This PR implements bidirectional
control and state reading for the Stream AC Pro via the internal protocol.

What was reverse-engineered

The internal API uses protobuf commands with cmd_id=17, cmd_func=254,
discovered by sniffing MQTT traffic via HA debug logs while making
changes in the EcoFlow app.

Protocol cheat sheet

Entity Command field Value State field
feedGridMode 168 1=enable, 2=disable 1628
AC1 (relay2Onoff) 380 1=on, 0=off
backupReserveSoc 102 0–100 (%) 461
Operating mode 71 1=normal

Changes

  • _build_proto_command(field_num, value): constructs protobuf commands
    with all required header fields
  • ProtoEnabledEntity: subclass of EnabledEntity that sends raw protobuf
    via MQTT for feedGridMode and relay2Onoff
  • ProtoBackupReserveEntity: subclass of BatteryBackupLevel that sends
    backupReserveSoc via protobuf (field 102) instead of JSON
  • _decode_manual_fields(): extracts state fields not yet in the proto
    definition (fields 461, 1628, 380) so HA entities show real values
    instead of unknown

Tested on

  • EcoFlow Stream AC Pro
  • Home Assistant OS 17.3, Core 2026.5.1
  • Physical AC outlet toggle confirmed end-to-end

Still open

  • AC2 (relay3Onoff): field number not yet captured
  • Relay state field: state reporting field number not yet identified
  • Proto definition not updated (manual field decoder used as workaround)

jegorden added 2 commits May 14, 2026 21:52
…coding

- Replace JSON-based BatteryBackupLevel with protobuf command (field 102)
- Add _decode_manual_fields to extract state fields not in proto definition:
  field 461 -> backupReverseSoc (read)
  field 1628 -> feedGridMode (read)
  field 380 -> relay2Onoff (read)
- Fixes backupReserveSoc and feedGridMode showing as unknown in HA UI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant