This custom integration connects your Marstek battery system (via the Marstek cloud API) to Home Assistant, pulling live data and exposing it as sensor entities.
It has some known limitations for now, while the guys from marstek improve their api. It was fully reverse-engineered from the android app, and written mainly with copilot to speed up development time.
Any idea if you can change the scan-interval, at initial setup I entered “1”. However it doesn’t work. Interval is 6-10 minutes!!
I deleted the installation and during reinstall, I entered 10 for the scan_Interval. Doesn’t work either!
Hello, the scan interval does not work as expected. It only refreshes after + 5min. I configured it to refresh every 30 seconds. I also see that my charge and discharge sensors are sometimes both > 0. That does not make any sence. Is it possible to update this? I already tried it via a automation to refresh but it doesn’t help. Thanks in advance.
I installed your software just now. I have set the update frequency to 10 seconds and it looks like everything is working. I only don’t see the actual operating mode yet, and will it possible to set this operation mode? Where did you find the API information? I would like to contribute.
Hi @DoctaShizzle , very interesting to see this Marstek Venus E integration.
I have two batteries and sensors of the both are shown in the Home Assistant overview.
My questions:
How can I add them to the Energy Dashboard?
Will it be possible to read the selected Load/Unload policy, including the manual load/unload settings?
Will it be possible to select the Load/Unload policy, including the manual load/unload settings?
When could such updates be expected?
Looking forward to hearing from you.
For the Energy dashboard, add these to configuration.yaml
customize:
sensor.mst_accp_3f8d_total_charge:
device_class: energy
state_class: total_increasing
sensor.mst_accp_3f8d_state_of_charge:
device_class: energy
sensor.mst_accp_3f8d_load:
device_class: energy
sensor.mst_accp_3f8d_discharge_power:
device_class: energy
sensor.mst_accp_3f8d_charge_power:
device_class: energy
There is however one sensor missing to complete the config: the kWh the battery delivered to the house. I used a dummy sensor for now.
I added this to the configuration.yaml file. It worked for me. The enitity is probably different for everyone.
Place this directly below scene: !include scenes.yaml (leaving one blank line in between is fine):
homeassistant:
customize:
sensor.marstek_batterij_energie_laden:
device_class: energy
state_class: total_increasing
sensor.marstek_batterij_energie_ontladen:
device_class: energy
state_class: total_increasing
Paste this below the entire google_assistant: section (so at the very bottom of your file):
sensor:
platform: integration
source: sensor.marstek_batterij_laden
name: “Marstek Batterij Energie Laden”
unit_prefix: k
round: 3
method: left
unit_time: h
platform: integration
source: sensor.marstek_batterij_ontladen
name: “Marstek Batterij Energie Ontladen”
unit_prefix: k
round: 3
method: left
unit_time: h
“Note: the source must be an existing sensor that has a numeric value in Watts.”
You can find it to copy the entitiy that works.