question

norman avatar image
norman asked

Alarm Relay Function - Set Alarm Relay On via dbus

I am trying to programmatically set the state of Relay 1 on & off on a VenusOS on an RPi via sending the following command but the change is not applied. Relay 1 function is configured as an Alarm Relay.


dbus -y com.victronenergy.settings /Settings/Relay/0/InitialState SetValue %1

While dbus command returns a successful result the "Alarm relay on" toggle switch in the UI under settings->relay does not reflect the issued command.

I can programmatically change the Function & Relay Polarity and the change is reflected in the UI immediately.

I looked at the var/log/localsettings/current file and confirmed that the UI and CLI command is affecting the same setting.


@400000006106581304f7c444 INFO:root:Setting /Settings/Relay/0/InitialState changed. Old: 1, New: 0 //UI "Alarm relay on" Setting Change
@4000000061065c1c04621bc4 INFO:root:Setting /Settings/Relay/0/InitialState changed. Old: 0, New: 1 //CLU dbus Setting Change

Has anyone else had the same issue before?

Venus OSVenus GX - VGX
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
Juha Tuomala avatar image
Juha Tuomala answered ·

I can confirm this. I'm playing with Cerbo relay2, plan to control boiler heater with it (temporarily) and CLI command:

# dbus -y com.victronenergy.settings /Settings/Relay/1/InitialState SetValue %1
0
GUI nor VRM do not reflect the changes. However if I change it from GUI and run

# dbus -y com.victronenergy.settings /Settings/Relay/1/InitialState GetValue

1

i can see that i'm fiddling with correct dbus-item. Even reloading VRM does not update the state in GUI which is bit odd imo.

Next I need to confirm that relay coil actually pulls and if I can drive contactor with it.

For the record, I would not be here if the ESS would allow creating schedules with relay control, should not be a big change, would presume.


Tuju

2 |3000

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