question

liviu-strati avatar image
liviu-strati asked

CerboGX & modbus value

Hello,


I have a hybrid Quattro system with a generator connected to AC2. The generator has his own ATS and I am using CerboGX relay1 for this. On VRM interface I can see the generator and all information related to it as you can see in this picture

generator.png

My question is, how can I read the "Acc. runtime" value with modbus. I couldn't find anything relevant on current modbus list. If it is not possible, is there any other way to get this information?

Thank you

cerbo gxGeneratorModbus TCP
generator.png (3.0 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

6 Answers
matt1309 avatar image
matt1309 answered ·

Hi @Liviu Strati

I've not got a generator however I've just checked the modbus TCP register list:

https://www.victronenergy.com/upload/documents/CCGX-Modbus-TCP-register-list-2.90.xlsx


And can see a couple of addresses that might be useful com.victronenergy.generator has a "Runtime in seconds" address at 3502 and 3504. Not 100% sure the difference but you might be able to convert to hours and see which address matches VRM.

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

liviu-strati avatar image
liviu-strati answered ·

Hi @matt1309

thank you for answer. I know about those 2 addresses but is not what I need. in 3502 and 3504 are store the running seconds for the "current session" and not the the total since installation. Both of them are 0 is the generator is stopped. Still searching ... :)

2 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·

Ahh I see, my mistake.

Out of curiosity does the Acc Runtime change if you change the Time range in VRM.

My guess would be the Runtime in seconds is being stored in VRM and then just summed for that output as I also cant see anything else in Modbus registers.

Seems like the only option is to store runtime second for each run externally and sum them if you don't want to rely on external cloud (vrm).

If you're not bothered about using VRM then suppose you could query VRM api.

1 Like 1 ·
liviu-strati avatar image liviu-strati matt1309 commented ·
In fact you can define on offset for generator Acc.runtime in CerboGX. This is why I supposed it is possible to read it from the same place, but looks like not. The cloud VRM api is my "last resort". I will try to keep all the information in HomeAssistant server because from there I will receive allerts for generator maintenance. Thanks for your help
0 Likes 0 ·
matt1309 avatar image
matt1309 answered ·

Hi @Liviu Strati

You're right actually however I can't find documentation to support it.

I found this thread, that might be useful though. It's not using Modbus TCP but MQTT, which I imagine you can use in HomeAssistant instead? (And just to clarify the MQTT can be accessed locally via LAN so not reliant on external services, which they seem to comment on in the thread which might make it confusing)

Is it possible to set generator run time via API or MQTT? - Victron Community (victronenergy.com)


If you look in the startstop.py in the github pages linked in that thread you can see a dbus path for AccumulatedRuntime is being created. However I can't see AccumualtedRuntime in the documentation for dbus addresses here:

dbus · victronenergy/venus Wiki · GitHub


I'm hoping that just means it's been missed from the documentation but is actually being used. I'm not sure if you can use ModbusTCP as I'm not sure if an address needs to be added for AccumulatedRuntime. However i think MQTT topics get auto added based on dbus address so hopefully that will work. A quick test would be to enable MQTT on venus os/cerbo and run mosquitto_sub command on this topic:

(I've guessed this topic based on others but if it doesn't work you may want to scan the mqtt server on venus os to see if you can spot the right topic if i've got it wrong below)


Replace <VRMID> with your vrm id.

and <ID> with the generator ID I'm guessing will be 0


mosquitto_sub -v -t 'N/<VRMID>/generator/<ID>/AccumulatedRuntime' -h <broker_url> -u <email> -P <passwd>


with broker_url being the internal IP of the venus os/cerbo once mqtt enabled in settings (the above mosquitto sub command assumes you've disabled ssl as well)

Hopefully it works or at least gets you close enough to resolve this.


1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

matt1309 avatar image matt1309 commented ·
Actually dont think you need the username (email) and password for LAN connection to MQTT
0 Likes 0 ·
sjaffe avatar image
sjaffe answered ·

Same issue here - the " accumulated runtime" shows on the Touchcreen but all registers in the document go to 0 when the gen stops. Im guessing its in there and either overlooked or hidden.. Sadly this company offers ZERO direcct support , bu they make the product - go figure that out. I simple tasks I need to get done over modbus are impossible, Probably going to junk all the victron hardware, stop selling it and go with a company that offers real technical support for EMS

1 comment
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

bartrs avatar image bartrs commented ·
Victron doesn't sell products directly to private customers, they work with dealerships/installers. I suggest you simply contact your dealer for support, this is the way it works with Victron.

I bought all my parts at a dealer and they are more than happy to support.




0 Likes 0 ·
Fideri avatar image
Fideri answered ·

I'm not familiar with Modpus and MQTT. Is it not possible to add an arbitrary number to the values you read in current session to get what you want?

Fideri

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

sjaffe avatar image
sjaffe answered ·

The dealers don't know modbus - tried 3 different ones. 2 of them told me to go direct to Victron - so you see where that goes. MQTT wont help - thats a protocol not the data itself

2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.