Virtuel Switch/ Droptown - Comportement lors des redémarrage système / System restart behavior

VenusOS Version Beta / Actuellement 3.80.33

Bonjour,

Je rencontre un comportement du nœud Virtual Switch (type Dropdown) dans Node-RED que je ne comprends pas.

J’ai configuré ce nœud sur plusieurs Cerbo GX qui pilotent les systèmes de différents bateaux. Trois modes sont définis :

  • 1 : Off
  • 2 : Quai
  • 3 : Navigation

Chaque mode déclenche un ensemble de comportements spécifiques du système. En fonctionnement normal, tout se passe comme prévu et cela simplifie grandement l’utilisation pour les utilisateurs.

En revanche, après chaque redémarrage du Cerbo, le Virtual Switch revient systématiquement sur la valeur 1 (Off). Je trouve ce comportement surprenant, car je m’attendais à ce que la dernière valeur sélectionnée soit conservée après un redémarrage.

Ai-je manqué un paramètre permettant de rendre cette valeur persistante, ou s’agit-il d’une limitation (ou éventuellement d’un bug) du nœud Virtual Switch ?

Merci d’avance pour vos éclaircissements.

Hello,

I am encountering behavior with the Virtual Switch node (Dropdown type) in Node-RED that I do not understand.

I have configured this node on several Cerbo GX units controlling systems on various boats. Three modes are defined:

1: Off
2: Shore Power
3: Navigation

Each mode triggers a specific set of system behaviors. Under normal operation, everything works as expected, greatly simplifying usage for the operators.

However, after every Cerbo reboot, the Virtual Switch consistently reverts to value 1 (Off). I find this behavior surprising, as I expected the last selected value to be retained after a restart.

Have I missed a setting to make this value persistent, or is this a limitation (or possibly a bug) of the Virtual Switch node?

Thanks in advance for any clarification.

I did mention it here: [SOLVED] Directory with Node-Red write access in a GX device for storing parameters - #6 by deon.korb

Probably a bug, and not sure anyone is fixing it

@guystewart

Bonjour Guy,

Je me permet de t’interpeller sur le problème signaler ci-dessus.

J’aimerai avoir une réaction du staff technique Victron.

En 2026, une constante qui n’est pas stable suite au redémarrage d’un système. Ce n’est pas un bug ! Ca ne fait pas très sérieux auprès des clients !

Cordialement,

.

Hello Guy,

I am reaching out to you regarding the issue mentioned above.

I would like to get a response from the Victron technical team.

In 2026, having a constant that fails to remain stable after a system restart—that is not a bug! It does not look very professional to customers.

Best regards,

Hello @Akoua.Energies , hello @guystewart

It appears we are not persisting the chosen value for a dropdown virtual switch. @Akoua.Energies expects the value to be persisted, which makes sense, in my opinion. Here the details of my test and investigation:

  • I’m using the master branch (v1.7.20) of node-red-contrib-victron (but there was no relevant change concerning persistence recently, so I expect the same behavior regardless the version of node-red-contrib-victron or Venus OS).
  • I’ve set up a dropdown virtual switch as per screenshot and JSON below, with 3 options “one”, “two”, “three”.
  • When checking the persisted values, I only see this:
{
  "state": {
    "Serial": "9cfbed8934d384e4",
    "SwitchableOutput/output_1/State": 0,
    "SwitchableOutput/output_1/Status": 0
  }
}

The value for the option chosen is stored in SwitchableOutput/output_1/Dimming, which is not part of the persisted state. So naturally a restart of Node-RED will result in the chosen option to be lost.

I believe this should be changed, so that SwitchableOutput/output_1/Dimming is persisted, so that it will survive Node-RED (and device) restarts.

@guystewart I suggest to register this as a bug against node-red-contrib-victron, and then fix it there. Do let me know if you agree, then I can create the issue (and also fix it).

[{"id":"9cfbed8934d384e4","type":"victron-virtual-switch","z":"a17479ca46a7d693","name":"dropdown-0713","outputs":2,"switch_1_type":"6","switch_1_initial":0,"switch_1_label":"[\"one\",\"two\",\"three\"]","switch_1_customname":"dd0713","switch_1_group":"aa","switch_1_include_measurement":false,"switch_1_rgb_color_wheel":false,"switch_1_cct_wheel":false,"switch_1_rgb_white_dimmer":false,"switch_1_show_ui_input":1,"switch_1_passthrough_mode":"auto_only","x":520,"y":260,"wires":[[],["c092dd7b68ce0287"]]}]

Sounds good to me.

I’ve asked the developer to have a look at this thread, but it might take some time before they do.

If you have a solution already, go for it. They will probably be quicker to see it.

Merci,

@chris9 pour ton analyse technique,

@guystewart d’avoir remonter l’information auprès de tes collègues dev.

.

Thanks,

@chris9 for your technical analysis,

@guystewart for passing the information on to your fellow developers.

Hello @Akoua.Energies , hello @guystewart

This is now fixed in the master branch of node-red-contrib-victron. Once this is part of a release of Venus (probably the next beta release), then you can test it.