question

andreww avatar image
andreww asked

Detect CCGX generator notifications over LAN

I have a CCGX which controls a diesel generator via a Victron Multiplus. The CCGX is on my home LAN.

Occasionally, the generator fails to start when the CCGX / Multiplus tries to turn it on. The CCGX then displays a "notification", something like "No AC detected at generator input".

What I want to do is to have another device on the LAN that talks to the CCGX in some way and monitors for this situation. The monitoring device would then be able to take some action (such as send an email, ring a bell, or whatever - but I don't need help with that aspect).

I have already succeeded in communicating with the CCGX using SSH, and also using MQTT. It looks to me as if it would be possible to do what I want using MQTT. I've also been wondering whether MODBUS would be a better way of doing it - it looks to me as if I could get the information I want by reading address 3213 over MODBUS once a minute or so.

My question is: what is the best (ie simplest / most robust) way of doing what I want (ie finding out over the LAN when "no AC detected at generator input" happens). Is the answer MQTT or MODBUS or something else, and has anyone else done this? I am OK programming in Python.

CCGX Color Control
2 |3000

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

2 Answers
Daniël Boekel (Victron Energy Staff) avatar image
Daniël Boekel (Victron Energy Staff) answered ·

Hi @AndrewW

I've moved your question to the 'modifications' section of the forum, as there is more knowledge about these topics there.

2 |3000

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

elvistherv avatar image
elvistherv answered ·

This alarm I belive appears at the MQTT topic N/f8369b03e687/generator/0/Generator0/Alarms/NoGeneratorAtAcIn

(replace f8369b03e687 with the ID of your CCGX)

It does seem to take a few minutes for the alarm to fire however so you may instead want to check N/f8369b03e687/system/0/Ac/ActiveIn/Source which will have the value of 240 whilst there is no input and 2 once using the generator.*

*Depending on how you have set up your inputs see the CCGX-Modbus-TCP-register-list spreadsheet)

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.

andreww avatar image andreww commented ·

Thank you. I have now managed to get the MQTT solution to work using the topic that you mention (and I never found a way to get the data directly from MODBUS). The main resources were https://github.com/victronenergy/dbus-mqtt/blob/master/README.md and http://www.steves-internet-guide.com/into-mqtt-python-client/

It is right that there is a delay between the generator relay closing and any alarm being raised. There are quite a few steps. The generator's own start-up sequence has a built in pause before the diesel engine starts. Then an internal relay in the generator blocks the output until it has "stabilized", and after that the Victron Multiplus also takes a good look at the AC before gradually drawing power. Altogether it is the best part of a minute between asking for power and getting it, and the CCGX waits longer still before declaring a problem.



0 Likes 0 ·
Show more comments