Automatically restarting node-red after a firmware update

I updated my cerboGX yesterday as there was an update available. I discovered (rather too later after I got back from going out for dinner with friends) that node-red does not restart after such an upgrade, so my evening timed export control was not turned off at 7pm and just stayed at the current feed-in setpoint (-1700W) until the battery hit the ESS minimum SOC of 6%.

That’s less than ideal, so my question is: Is there a way to have node-red restart/redeploy after a firmware update? (Or indeed arbitrary tasks if we have other things in the future).

I also found that ‘numeric’ nodes do not set a value on redeploy until they they are changed in the UI, and default to the lowest possible setting of the range. That’s not what I want either, so how does one set an initial value for them, and make sure that a payload is triggered so that they are stored in the flow state by the ‘change’ item?

Nodered does start after an update or reboot. If yours didn’t you have another issue.
If you are using a beta, then this is not the correct section to post this, rather roll back to the current production verision.

I’m on standard production firmware. v3.54. Upgraded from either v3.52 or v3.53 (whatever was current in January).

And when I said ‘node-red doesn’t restart’, what I mean was that node-red itself (the service) restarts, but my flow, which is running the system here, doesn’t automatically restart. I have to go to https://venus.local:1881/, and click on the ‘deploy menu’ → ‘restart flows’.

So I guess what I’m actualy asking is, how do I make a default flow restart when node-red comes up? Which I suppose is a generic node-red question, rather than a victron-world specific one.

Is there anything special in that flow?
I have not seen a flow not start or require a deploy after a reboot/update.
That is unusual.

Maybe considering reflashing the GX and importing your flows again.

Hmm. OK. No there is nothing very exciting in my flow. it just shows current export and charging rates, and has switches for ‘export now’, ‘import now’, ‘timed export’, ‘timed import’, (with a variable power slider) and ‘adjust export to keep battery at current level’. Basically a set of knobs for controlling the export setpoint.

I’ll do some rebooting to check the behaviour again.

In the meantime I have solved the ‘how to default flow variables’ issue. You add an inject node that just sends a number once, and never repeats.

After a power-cycle, it says it has ‘started up in safe mode’. And I do indeed have to ‘restart flows’ to get the flow running and the dashboard visible. So perhaps what I need is to turn ‘safe mode’ off?

<fx: reads the docs> Aha, which I see is in the settings panel
Venus-OS Large features->Node-red (disabled/enabled/enabled(safe-mode)).

I started with safe-mode as I didn’t know what I was doing a month or two ago. I’d forgotten there was another option.

Ah well, now you know next time someone asks :slight_smile:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.