mec avatar image
mec asked

Use relay 1 or 2 for fridge and other

it would be useful to be able to use both relay 1 and relay 2 to control the generator and other equipment and above all to add the controls for the other relays present in the system (BWM 712, multiplus Compact and other)...relais 3... Relais 4...

Furthermore, the inversion function of the settings should be inserted because for example while the generator I want it to connect when the battery reaches 40% of remaining charge), or the refrigerator instead I want it to remain ON until 40% <SOC <100%. or when the sun is sufficient to guarantee operation ... ( maximum battery discharge not exceeding 20% in 5 hours .... ) for now these functions can only be managed manually.

Furthermore, a Custom Settings section should be entered where you can assign the name to the relay function and choose when it should go on and off with the generator parameter of SOC, Voltage, sun Power ecc ecc, also customizing the name.




BMV Battery Monitorcerbo gxCCGX Color ControlGenerator
2 |3000

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

1 Answer
bathnm avatar image
bathnm answered ·

I have made a few changes to improve the relay interface and also make better use of the second relay. There is substantial back-end changes needed to make better use of the second relay.

I am testing on a Raspberry Pi with only one Relay, but will applying the code to my Cerbo at the weekend.


If manual is selected then you can apply a name


and if you select Display ops menu, it is shown on the top of the device list:


Oh and I have modified some digital inputs to allow me to monitor my smallBMS and get alerts through to VRM.

Once I have done a little more testing I am happy to share the diff files so you an apply them yourself..

Your idea of a SOC based switch is interesting and fairly easy to add, as the code is similar to a temperature switch or pump switch.

Do you need an invert function when the relays have both NC and NO connections. You an just use the relevant side of the relay to invert, so if you want off between certain values wire to NO?

1607420981865.png (82.4 KiB)
1607421040375.png (84.2 KiB)
1607421091881.png (97.3 KiB)
1607421095037.png (97.3 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.

@Bathnm This looks great. very interested to see your results when you’re ready to share. Are you able to make an option to add more than 2 relays (4x relays would be great).

0 Likes 0 ·

@Thomas G

Adding relays is not an issue. I have enumerated the relays to


As long as a service can associate itself with a relay using this path, any number of relays can be used.

My Temperature Switch can be applied to any Relay. Thinking of also creating a SOC and Voltage switch as the service code is very similar, if not the same between Pump, Temperature, SOC and Voltage, as it just a data element to use to control the switch.

The one item to resolve is enumerating the code across a variable which is the number of relays available as well as ensuring the base setting dbus paths are configured into the XML file on setup.

Happy to share the diff files.

0 Likes 0 ·