Provoke a Notification or Alarm via NodeRED

I have found a way to invoke custom alarm notifications locally on the Cerbo, but it requires sacrificing a Digital Input to use as the proxy for the alarm*

If you set a Digital Input to something like “Door alarm”, then you can trigger it using dbus. You do not have to physically wire it to anything - it will be an alarm that can programmatically be triggered like this:

dbus -y com.victronenergy.settings /Settings/DigitalInput/1/AlarmSetting SetValue %1

If you change its name first, that is then the name the notification will show:

dbus -y com.victronenergy.settings /Settings/DigitalInput/1/CustomName SetValue "Anchor"

As a bonus, these also send notifications through VRM as well - including the custom name.

Now if you want to do this in NodeRED, just use the Victron Custom Control to write to /Settings/DigitalInput/1/AlarmSetting and you can programmatically invoke an alarm with notifications. I have done this and it works.

Note: you might also be able to set these value over MQTT but I have not tried that.

But you are limited to one alarm for each Digital Pin you use as a proxy.

* Going even further, I think it might be possible to programmatically insert the right type of object into the dbus notification list directly and have that show up in the GUI as well, but I have not tried this. If that works, then it might be possible to have totally custom alarms/alerts that are not tied to hardware like a digital pin, etc… In theory it seems possible because that is all the various alarms in the Venus platform are doing from what I can tell.

And, using dbus to set com.victronenergy.platform/Notifications/Alarm only triggers the internal beeper and not the alarm relay, whereas the digital pin way triggers both (as long as the alarm relay is also set up).

2 Likes