Skip to content
Dirk-Jan Faber edited this page May 11, 2022 · 9 revisions

Welcome to the node-red-contrib-victron wiki!

See https://www.victronenergy.com/live/venus-os:large#node-red for more information on running Node-RED on Venus OS.

On the example-Flows page you can find some examples.

FAQ

I get numbers with too many decimals / strange rounding

This is the way the messages are coming over the d-bus. If you want specific rounding, you can do this with a Node-RED function containing:

msg.payload = +(msg.payload.toFixed(1));

return msg;

Write/read file gives "Error: EACCESS: permission denied'

Since Venus OS 2.90 and onwards, Node-RED no longer runs as user root, but as user nodered. This means that the Node-RED flows are only allowed to access files and directories that are owned by the nodered user. These files typically start below /data/home/nodered/. So modifying the storage location ought to work. E.g.:

[{"id":"220a5f0517f94b9c","type":"inject","z":"478d232e6707861f","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":260,"y":180,"wires":[["d469ca1a22679b91"]]},{"id":"d469ca1a22679b91","type":"file","z":"478d232e6707861f","name":"","filename":"/data/home/nodered/storage.txt","appendNewline":true,"createDir":false,"overwriteFile":"false","encoding":"none","x":480,"y":180,"wires":[[]]}]
Clone this wiki locally