Skip to content

Latest commit

 

History

61 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fossibot Home Assistant Integration

HACS GitHub Release License: MIT

A custom Home Assistant integration to monitor and control Fossibot / Sydpower portable power stations via a local MQTT broker.

Disclaimer — This integration is unofficial and not affiliated with Fossibot, Sydpower, or BrightEMS. Use at your own risk. The authors are not responsible for any damage to your devices.

Join our Discord to help with development, report issues, or share feedback about your battery model.


Features

  • Local MQTT — connects to your own MQTT broker, no cloud MQTT dependency
  • 11 sensors — battery SoC (+ slave 1 & 2), power input/output, AC voltage & frequency
  • 4 switches — USB, DC, AC output toggles + AC silent charging
  • 6 selects — LED mode, USB/AC/DC standby time, screen rest time, sleep time
  • 4 number controls — max charging current, stop charge timer, discharge/charge limits
  • Device state sync — automatically reports device online/offline status to the SYDPOWER platform
  • Write protection — every register write validated against a safety whitelist
  • Auto-reconnection — exponential backoff with connection verification
  • Per-device Modbus addressing — extracted from API, not hardcoded

Prerequisites

  • BrightEMS app version 1.6.0 or later
  • A local MQTT broker (e.g. Mosquitto, EMQX) reachable by your devices on TCP port 1883
  • Local MQTT Broker configured in the BrightEMS app (see Setup below)

Supported Devices

Compatible with power stations that use the BrightEMS app. All these brands share the same SYDPOWER platform:

Brand Models Evidence
FOSSiBOT F2400, F3600, F3600 Pro, F1200 Uses BrightEMS app, confirmed by multiple GitHub reverse-engineering projects
AFERIY P210, P310 Uses BrightEMS app, identical specs to Fossibot F2400/F3600
Eco Play (ECOPLAY) SYD2400, SYD3600, 3600 Pro Literally uses "SYD" in model names, uses BrightEMS app, expansion battery called "SYD3600-Extra"
ABOK Power Ark3600 Uses BrightEMS app, listed as compatible in ESP-FBot project

Model cross-reference (SYDPOWER internal model -> brand equivalents)

  • SYDPOWER N052 (2400W/2048Wh) -> FOSSiBOT F2400 -> AFERIY P210 -> Eco Play SYD2400
  • SYDPOWER N051/N066 (3600W/3840Wh) -> FOSSiBOT F3600 Pro -> AFERIY P310 -> Eco Play SYD3600 -> ABOK Ark3600

If your BrightEMS-compatible model is not listed, please report your results on Discord or GitHub Issues.

Installation

HACS (recommended)

  1. Open HACS > Integrations > Custom Repositories
  2. Add https://github.com/iamslan/fossibot as an Integration
  3. Search for Fossibot and install it
  4. Restart Home Assistant

Manual

  1. Download this repository
  2. Copy the custom_components/fossibot-ha folder to <config>/custom_components/fossibot-ha
  3. Restart Home Assistant

Setup

1. Configure Local MQTT in BrightEMS

  1. Open the BrightEMS app (v1.6.0+)
  2. Go to Me > Settings > Local MQTT Broker Settings
  3. Enter your local MQTT broker host address
  4. Copy your API Token (you'll need it for the integration)
  5. Make sure your MQTT broker is reachable on port 1883 from your devices

Important: The master account (first to bind the device) is required to configure MQTT settings. All users sharing devices must use the same broker host.

2. Add the Integration in Home Assistant

  1. Go to Settings > Devices & Services
  2. Click + Add Integration and search for Fossibot
  3. Enter:
    • API Token — from the BrightEMS app settings
    • MQTT Broker Host — your local MQTT broker address
    • MQTT Broker Port — default 1883
    • MQTT Username — optional, depends on your broker configuration
  4. Click Submit

The integration will fetch your device list, connect to your MQTT broker, and create all entities automatically.

Upgrading from v1.x

Version 2.0 replaces the cloud-based connection with local MQTT. You must remove and re-add the integration after upgrading:

  1. Go to Settings > Devices & Services
  2. Remove the existing Fossibot integration
  3. Re-add it with your new MQTT broker settings and API token

Entities

Sensors (read-only)

Entity Unit Description
State of Charge % Main battery SoC
State of Charge Slave 1 % Expansion battery 1 SoC
State of Charge Slave 2 % Expansion battery 2 SoC
DC Input W Solar / DC input power
Total Input W Combined input power
AC Charging Rate Current AC charging rate knob position
Total Output W Combined output power
AC Output Voltage V AC output voltage
AC Output Frequency Hz AC output frequency
AC Input Voltage V AC input voltage
AC Input Frequency Hz AC input frequency

Switches (on/off)

Entity Description
USB Output Toggle USB ports
DC Output Toggle DC output
AC Output Toggle AC inverter
AC Silent Charging Toggle silent charging mode

Selects (dropdown)

Entity Options
LED Mode Off, On, SOS, Flash
USB Standby Time Off, 3 min, 5 min, 10 min, 30 min
AC Standby Time Off, 8 hours, 16 hours, 24 hours
DC Standby Time Off, 8 hours, 16 hours, 24 hours
Screen Rest Time Off, 3 min, 5 min, 10 min, 30 min
Sleep Time 5 min, 10 min, 30 min, 8 hours

Numbers (slider / input)

Entity Range Unit Description
Maximum Charging Current 1–20 A AC charging current limit
Stop Charge After 0–1440 min Auto-stop charging timer (0 = off)
Discharge Lower Limit 0–100 % Minimum SoC before output cutoff
AC Charging Upper Limit 0–100 % Maximum SoC to charge to

Architecture

custom_components/fossibot-ha/
  __init__.py          # Integration setup, platform loading
  config_flow.py       # UI-based configuration
  coordinator.py       # DataUpdateCoordinator (polling loop)
  entity.py            # FossibotEntity base class
  sensor.py            # 11 sensor entities (data-driven)
  switch.py            # 4 switch entities (data-driven)
  select.py            # 6 select entities (data-driven)
  number.py            # 4 number entities (data-driven)
  sydpower/
    api_client.py      # REST API (device list, state sync)
    mqtt_client.py     # MQTT over TCP (paho-mqtt)
    connector.py       # Connection orchestration
    modbus.py          # Modbus encoding, CRC-16, safety validation
    const.py           # API endpoints, register addresses
    logger.py          # Rate-limited smart logger

Key design decisions:

  • All entity definitions are data-driven (lists of dicts) — no per-entity boilerplate
  • WRITABLE_REGISTERS safety map in modbus.py defines the exact set of allowed values per register, preventing accidental writes that could brick a device
  • Device online/offline state is synced with the SYDPOWER platform via pub_updateMqttState API
  • Per-device modbus_address is extracted from the API rather than assumed

Debugging

Enable debug logging in configuration.yaml:

logger:
  default: info
  logs:
    custom_components.fossibot: debug

Limitations

  • Requires internet for the initial device list fetch and state sync API calls (api.app.sydpower.com)
  • MQTT communication itself is fully local
  • Slave battery SoC sensors only appear when expansion batteries are connected and report non-zero values
  • API token must be regenerated if compromised (via BrightEMS app settings)

Contributing

Contributions are welcome — both issues and pull requests. If you have a Fossibot model not listed above, please share your results on Discord or GitHub Issues.

Credits

Created by @iamslan and @alessandro-lac, based on reverse engineering the BrightEMS app's communication patterns.

License

MIT

About

HomeAssistant integration for Fossibot batteries

Topics

Resources

Stars

43 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages