This is an application that emulates the eu.hamedata.com cloud servers which are required for Marstek balcony solar batteries to work correctly offline.
When offline (either you or the cloud servers) the zero feed-in system stops working for no reason at all. This script fixes that. In addition, it boosts your privacy by preventing the battery from "phoning home" (MarstACK logs the data being submitted in the console).
This program works excellently together with Tomquist's great tools such as b2500-meter and hm2mqtt. Without his effort the Marstek platform would not be of interest.
MarstACK has been tested with:
- my battery - Marstek Saturn-C B2500-H Firmware v110
- bbmfarp - Marstek Venus E (2. Gen) Firmware 152
- Marstek Venus E (3. Gen) Firmware 147
Note: for Marstek Venus E (3. Gen) to consider being connected to cloud it is additionally necessary to have a local mqtt broker running. See the MarstACK Wiki for more details.
Please let me know if you have success with other models or if there are any errors that show up in the logs. I would recommend not doing any blind firmware updates as breakage is likely.
In order for this to work you must configure your DNS resolver to return your local server's IP for the domain eu.hamedata.com instead of the actual cloud server IP.
There is a MarstACK Wiki with instructions on how to configure various routers.
There's also a Home Assistant app (formerly add-on). To install it:
- In Home Assistant, go to Settings, then Add-ons, then the Add-on Store.
- Open the menu in the top right (the three dots) and pick Repositories.
- Add
https://github.com/fignew/MarstACK. - Install MarstACK from the store.
- Set your timezone in the configuration (for example Europe/Berlin), optionally a redirect_url, and start it.
A few things to know before you start it:
The app needs port 80 on the Home Assistant host because that's what the battery contacts. Since Home Assistant OS 2026.8, new installs use port 80 for their own web UI, so you'll need to move that first: Settings, System, Network, HTTP server port (8123 works). If you're on an older install already using 8123, nothing to do. Other add-ons can hold the port too; Nginx Proxy Manager is the usual suspect.
Your DNS has to point eu.hamedata.com at the Home Assistant host. See the Wiki for router setup.
If you set redirect_url, visiting the host lands people on that
address instead of the MarstACK status page. Useful if you want
http://homeassistant.local to just open Home Assistant.
First start builds the app image locally, which takes a few minutes, longer on ARM. Full details are in the Documentation tab of the app.
docker run -p 80:8000 ghcr.io/fignew/marstack:latest
This will build and run the container, as well as restarting it after system reboot.
#cd to cloned directory
docker compose up -d
docker build -t marstack .
docker run -p 80:8000 marstack
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate -
Install the required packages:
pip install -r requirements.txt
-
Run directly with port 80 (using capabilities - recommended in lieu of root):
# First, grant capabilities to the Python interpreter (one-time setup)
sudo setcap 'cap_net_bind_service=+ep' venv/bin/python
# Then run without sudo
uvicorn main:app --host 0.0.0.0 --port 80I am not responsible for any damage or loss this script causes you. This program is provided without warranty or guarantee. Consider it untested because all situations are different and I do not have documentation for the Hame/Marstek APIs. This project is in no way related to or associated with Marstek or Hame.
