Page 2 of 2

Re: Marstek OpenAPI

Posted: Sunday 15 February 2026 9:54
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

Re: Marstek OpenAPI

Posted: Sunday 15 February 2026 10:24
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).

Re: Marstek OpenAPI

Posted: Sunday 15 February 2026 11:22
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.

Re: Marstek OpenAPI

Posted: Sunday 15 February 2026 12:00
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.

Re: Marstek OpenAPI

Posted: Sunday 15 February 2026 14:41
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.

Re: Marstek OpenAPI

Posted: Monday 16 February 2026 9:38
by willemd
And does the plugin and API work on that port?

Re: Marstek OpenAPI

Posted: Tuesday 17 February 2026 21:31
by esflint
They both work on that port. I also checked the connection with Postman but get no response from the battery.

Re: Marstek OpenAPI

Posted: Tuesday 17 February 2026 22:03
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?

Re: Marstek OpenAPI

Posted: Tuesday 17 February 2026 23:07
by willemd
No, these battery systems use UDP for the local API (unfortunately)

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 8:01
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.

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 11:02
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

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 17:51
by willemd
Did you run the scan for other ports than 30000?

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 17:55
by eddieb
yes, I did a full scan

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 19:21
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.

Re: Marstek OpenAPI

Posted: Wednesday 18 February 2026 22:23
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

Re: Marstek OpenAPI

Posted: Thursday 19 February 2026 13:07
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.

Re: Marstek OpenAPI

Posted: Thursday 19 February 2026 14:02
by eddieb
Ok, so this seems not related to my Venus E v2 setup ...

investigating goes on

Re: Marstek OpenAPI

Posted: Saturday 21 February 2026 11:54
by willemd
willemd wrote: Wednesday 18 February 2026 8:01
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.
I also managed to get this hame-relay working which exchanges MQTT message with the Marstek/Hame cloud, so not via local API. I got some support from Tomquist on it, have a look at issue 129 for details. Sending the cd=01 message will give back your Marstek config, which might help in testing the local API further. Or alternatively, the MQTT responses could be processed onto Domoticz devices. I can even see in the response whether local API is enabled. All I need now is the command to re-enable it if it was disabled due to a reset.