Marstek OpenAPI

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

eddieb
Posts: 391
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by eddieb »

Meanwhile I updated my plugin to 1.0.4

I tried to power down my Venus E v2 but after holding the powerbutton for about 10sec it powersdown and immediatly powers up again ...

Still no luck
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

eddieb wrote: Sunday 15 February 2026 9:54 Meanwhile I updated my plugin to 1.0.4

I tried to power down my Venus E v2 but after holding the powerbutton for about 10sec it powersdown and immediatly powers up again ...

Still no luck
And after that, re-enabled the API I assume?

I am sorry, I cannot help any further. If it is not a network issue, then maybe it is model related. I would ask Marstek for assistance. There is also a tweakers forum about communciation with the Marstek Venus E, maybe you can find more info there.

On the tweakers forum someone mentions that the default port in his system was 28416. Maybe that is the clue? Check the APP and/or try that port (is configurable in the plugin).
esflint
Posts: 4
Joined: Saturday 14 February 2026 11:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Marstek OpenAPI

Post by esflint »

Yes, I enabled the open API in the Marstek app. and rebooted the battery just in case.

Now this message shows that it probably gets no data from the Venus:

2026-02-15 11:14:03.200 Marstek Venus C: get mode data received: None
2026-02-15 11:14:03.200 Error: Marstek Venus C: No data received during complete cycle. Cycle nr 1
2026-02-15 11:14:03.200 Error: Marstek Venus C: Timeout on getting Marstek Venus data. Check connection and/or Open API setting in App.
2026-02-15 11:14:03.301 Marstek Venus C: onHeartbeat called

I requested a firmware update by Marstek since V153 is one of the first with the open API enabled.
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

You can try to run

sudo nmap -sUV IPaddress -p 30000

or, to scan a range of ports:

sudo nmap -sUV IPaddress -p 28000-30000

(filling in your IPaddress of course)

and see whether it report the port open/filtered or closed.

On my system it comes back with the port open and reports the MAC address.
esflint
Posts: 4
Joined: Saturday 14 February 2026 11:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Marstek OpenAPI

Post by esflint »

willemd wrote: Sunday 15 February 2026 12:00 You can try to run

sudo nmap -sUV IPaddress -p 30000

or, to scan a range of ports:

sudo nmap -sUV IPaddress -p 28000-30000

(filling in your IPaddress of course)

and see whether it report the port open/filtered or closed.

On my system it comes back with the port open and reports the MAC address.
Port is open:

28416/udp open|filtered unknown
MAC Address: 24:19:72:87:5E:CC (Quectel Wireless Solutions)

I changed it to 28416.
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

And does the plugin and API work on that port?
esflint
Posts: 4
Joined: Saturday 14 February 2026 11:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Marstek OpenAPI

Post by esflint »

They both work on that port. I also checked the connection with Postman but get no response from the battery.
User avatar
jvdz
Posts: 2441
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by jvdz »

28416/udp open|filtered unknown
MAC Address: 24:19:72:87:5E:CC (Quectel Wireless Solutions)
Shouldn't this be tcp instead of udp?
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

No, these battery systems use UDP for the local API (unfortunately)
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

esflint wrote: Tuesday 17 February 2026 21:31 They both work on that port. I also checked the connection with Postman but get no response from the battery.
As an alternative, you could also try this
https://github.com/tomquist/hame-relay
This basically communicates with the cloud (so not using local API) in the same way the Marstek App does, via MQTT.
You can use the docker installation, without the home assistant part.
If that works, an intergration to Domoticz should be easy as a next step.
eddieb
Posts: 391
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by eddieb »

I finally had time to fully reboot my Venus v2 battery ... (need to disconnect RS485 connection because that one keeps the battery ON ...)
1 disconnected rs485
2 tested on udp/30000, still timeouts, no luck
3 tried to disable API thru the ap, no luck, gives a configuration error.
4 power down the battery and waited 15 minutes
5 power on without rs485 connection
6 tested on udp/30000, still timeouts, no luck
7 tried to disable API thru the ap, no luck, gives a configuration error.
8 power down and reconnect rs485
everything works as before test ...

So, for some reason, there is something on UDP/30000 (tested with nmap) but not working on my Venus E v2

If someone has other findings, I would like to know the differences
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

Did you run the scan for other ports than 30000?
eddieb
Posts: 391
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by eddieb »

yes, I did a full scan
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

I trust you know what you are doing, but just to be sure..... when you state tested on UDP/30000 I assume you mean IP/3000, so you tested on your Marstek IP address and port 30000 ?

Especially the fact that you get configuration errors when using the App I find strange. Are the other app function working O.K..? I am asking because the alternative mqtt integration I mentioned has the possibility to disconnect from cloud MQTT and connect to local MQTT (for certain models, not Venus A). You did not switch off cloud MQTT in the past?

I would raise it with Marstek (not sure where ) as an issue that you get a configuration error and are unable to activate local Open API. Seems to be a model/device related issue.
eddieb
Posts: 391
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by eddieb »

Sure,
I ran nmap against the IP of the battery and checked port 30000 ... As network person I call this UDP/30000 ...

Code: Select all

nmap -sU-sV 192.168.0.155 -p 30000
Starting Nmap 7.98 ( https://nmap.org ) at 2026-02-18 22:10 +0100
Nmap scan report for marstek-bat (192.168.0.155)
Host is up (0.024s latency).

PORT      STATE         SERVICE VERSION
30000/udp open|filtered unknown
MAC Address: 00:00:FF:06:A1:C3 (Camtec Electronics)

Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 99.49 seconds
the app functions normal, It shows what it has to show. The only thing not working is disabling local api, that gives an error.
I did ENABLE it a couple of weeks ago and did not get an error ...
I can even change the port from 30000 to 30001

and no, I did not disable MQTT, all stats and graphs are working normally in the app
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
willemd
Posts: 735
Joined: Saturday 21 September 2019 17:55
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.1
Location: The Netherlands
Contact:

Re: Marstek OpenAPI

Post by willemd »

I just tried on my Venus A.

Disabling Open API also in my app results in a device config error, after about 5 seconds (I tried a few times). Enabling is no problem though.
eddieb
Posts: 391
Joined: Wednesday 04 July 2018 7:48
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Marstek OpenAPI

Post by eddieb »

Ok, so this seems not related to my Venus E v2 setup ...

investigating goes on
RPI4 Beta / Tasmota / ZigBee2MQTT / P1meter / Haier AC MQTTmapper / SolarEdge SE3500H modbus_tcp / Marstek Venus / Opentherm gateway / Plugwise Anna/Smile / ObserverIP weatherstation thru WuDirect
Feeding ADSB https://adsb.im/home
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest