I found an question on the old comunitiy portal I was also interested in.
And it seams that I found an answer for that problem.
For me I was looking for an node red flow that is shuting down my raspi bevor the voltage of my battery is getting to low to power the 12V to USB module that powers the rasperry pi.
I had the problem ones where it was shutdown by low battery and did not start again because the sd card lost its config file (the file was there but empty). To prevent this I was looking to get an node red flow to get an save shutdown.
You need to have ShutdownMonitor installed and of course VenusOS Large to have node red.
To test it you just need two nodes:
- ‘inject’ node that sets msg.payload to 1 and
- ‘Custom Control’ node (@victronenergy/node-red-contrib-victron) with parameter
Custom → ShutdownMonitor (0)
Measurement → /Shutdown
JSON:
[{"id":"cd5cc11ee3e9d766","type":"inject","z":"5906650e05346681","name":"trigger shutdown","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"1","payloadType":"num","x":1000,"y":220,"wires":[["08b9377acee05c24"]]},{"id":"08b9377acee05c24","type":"victron-output-custom","z":"5906650e05346681","service":"com.victronenergy.shutdown/0","path":"/Shutdown","serviceObj":{"service":"com.victronenergy.shutdown/0","name":"ShutdownMonitor (0)"},"pathObj":{"path":"/Shutdown","name":"/Shutdown","type":"number","value":0},"name":"shutdown rpi","onlyChanges":false,"x":1190,"y":220,"wires":[]}]