Marstek Venus + CT003 devices into Homey

Hi there,

I didn’t really like the current apps that integrate the Marstek battery into Homey, they feel pretty unstable getting data so I created my own.

The CT003 meter is also supported so you can use that as a P1 meter in Homey as well.

It’s currently under review; but you can test it here: Marstek Energy | Homey

Update: it’s not under review. I pulled it, Homey doesn’t think my app is unique enough and wants me to integrate with existing apps. I don’t like the existing apps so I’ll just use my app privately then. You can still install it through my Github page: GitHub - b03tz/HomeyMarstek: I didn't like the available marstek apps for Homey so built my own · GitHub

I uses only local communication, no cloud. So you have to enable local API on your batteries through the app. Every device can auto-discover on your network if all is configured right.

It supports reading data from the batter and meter and also setting the charge mode and depth of discharge through flows.

2 Likes

Assuming from the past that the problematic Venus API is causing unstable Homey apps, I am really curious if, and how your app is doing better.

Which Venus are you using, which firmware and communication module is that Venus using?

I’m using V153. It just keeps polling for a succesful state within your set timeframe. If it can’t get it, it will retry every 2 seconds and fail gracefully. For ‘set’ commands I use an exponential back-off strategy: retry up to 5 times with exponential backoff (2s, 5s, 10s, 30s) before giving up.

For a few days now it’s running very stable. The only thing that’s variable is when you get data, the battery is in charge of that because either it fails or succeeds. Which in my case results in fresh data every sub 1-minute, almost every time within 30 seconds, which I have set my polling interval to.

I’m sorry I had to pull my app from the official store. They don’t think it’s unique enough and encourage me to implement the CT003 into the existing app.

I personally don’t like the existing app(s) because of the mentioned unstability, and I don’t really have the time to work together with somebody to get this done. So I pulled my app, you can installed it custom through my Github page: https://github.com/b03tz/HomeyMarstek but Homey doesn’t want me to publish it here in the store.

Can I still test the app? I managed to download and install it, but the P1 isn’t being detected."

Do you have the Marstek CT003? If you can’t auto discover it, perhaps add it by IP.

Are you certain it is a CT003? Is it in the same network as the homey?

Yes Homey connected with Ethernet and de p1 with separated iot ssid (wifi)

Are the ct003 and the homey on the same iot network? Did you disable inter-device communication or have any other restrictions active?

Both devices are in the same network but that’s not a problem I think because difference can find each other because the same sub network?

Strange, it’s the only thing I can think of. What version is your ct003 currently running?

122

That might be it; I’m running 117 and it says “up to date”

1 Like

It would be ao nice to get my Marstek batteries in Homey. This is the reason I bought Homey and I’m thinking of selling it again because I can’t get anything on Homey to work.

I would hope that they reconsider that your app is allowed because the other app without the modbus module is only working by cloud connection.

I did find a instruction that starts with installing json and homey lib before this app can be installed. Do you have a shorter instruction?

They said that the existing app in the store works with the local API already and that my only new addition was the CT003 and that that is the reason my app wasnt unique enough so I guess you can just use the existing app too?

I did some small fixes (encountered some port problems myself). You might want to reinstall/update from git and see if this fixes something for you.

Thanks for being active in improving the Marstek app for Homey.

The problems I have with local usage of the current Marstek app is that that app can’t find my devices. For the Marstek installation I used an extra WiFi router with another IP range connected to the same network but only supports 2.4GHz. The Homey is on the other WiFi router (5GHz and 2.4GHz) I expect that your app has the same problem that the app can’t find the devices, maybe it can with the manual IP address adding proces.

My installation is:
Homey pro 2023 v13.1.1 (auto update) (192.168.2.124)
A) Marstek v3 v147 (2 months old / 82% efficientie / 192.168.1.6)
B) Marstek V3 v147.117.113 (4 months old / 82% efficientie / 192.168.1.3)
C) Marstek v1.1 v156 (9 months old / 72% efficientie / 192.168.1.5)
D) Marstek C003 P1 meter v118 / 202409090159 (9 months old / 192.168.1.?)

My wish is to use flow to set the battery mode of the three devices. The current problem is that the Battery C is always first decharged and charged but has the lowest efficientie. I want the other 2 to start decharging and charging first before Battery C is used. In the winter I can’t fully charge the 15kW so only the 2 efficient should be used.
Any idea’s if this is possible?

This is definitely possible. I think the main problem with the Marstek batteries is that their local API is just very unstable. Did you try hard rebooting your batteries? Unplug, make sure you press the power button on the battery make the green light go out. Wait 10-15 seconds, turn it back on (plug it in).

I think then the local discovery does work.

BTW the automation you are describing is perfectly possible.

Thanks, thats good to know. I didnt’t install your app yet. I’m trying now and get this error on installing. Did I download the wrong zip file from your github page?

Solved: I did start the command prompt instead of the node.js command prompt…