How can I change "Scheduled charging" in Node-Red?
eg: /settings/0/Settings/CGwacs/BatteryLife/Schedule/Charge/0/Soc to 80%?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
Assuming this is referring to the local settings service com.victronenergy.settings then an exec node with
dbus-send --system --print-reply --dest=com.victronenergy.settings /settings/0/Settings/CGwacs/BatteryLife/Schedule/Charge/0/Soc com.victronenergy.BusItem.SetValue variant:int32:80
Hi, thanks for this. It's exactly what I needed. I had to use the slightly amended command to make it work on my Cerbo GX
Would you be able to give me a couple of pointers on how to adapt this code to allow me to enable a scheduled charge via Node-Red?
Basically to enable a scheduled charge when SoC drops below a certain level, at a certain time of day.
Thanks in advance.
From node-red-contrib-victron version 1.4.33 and onwards you can also use the ESS control node to do this (https://github.com/victronenergy/node-red-contrib-victron/wiki/Available-nodes#ess), using Schedule 1: State of charge (%).
Hi again, I have looked via Node-red "manage palette" but the latest version seems to be only 1.4.32. and I'm not totally sure how to install new nodes nodes via Github. Do I download from Github and import the JSON file only (doesn't seem a big enough file) or is it more complicated than that ?
The node-red-contrib-victron version is updated with the Venus firmware. The latest candidate firmware ships with version 1.4.33.
So updating the Venus OS will take care of the package. Manually updating node-red-contrib-victron is not recommended.
Hi, where can I find these both in Node-RED? I looked for it, but didn't find...
1. Read the scheduled charching state:
2. Write activate/deacitvate scheduled charging:
You will probably need to send dbus commands from nodered using exec node. Use dbus-spy from the shell to locate the service names and appropriate dbus paths for those settings.
e.g. I set the logging interval with an exec node with command:
dbus-send --system --print-reply --dest=com.victronenergy.settings /Settings/Vrmlogger/LogInterval com.victronenergy.BusItem.SetValue
and append the msg payload containing the interval.
But it's a pity that dbus commands seem to be required for this, because all the settings for scheduled charching are directly accessible via Victron Node-RED nodes (target SOC, start time and duration, etc...), but these two values are obviously not ...
@Dirk-Jan Faber (Victron Energy) there really isn't an easier way?
The easiest way at the moment is using the custom output node. With that node you can just select the service and path to read from or write to.
The Node-RED implementation of Dynamic ESS (https://github.com/victronenergy/dynamic-ess) project uses the same system for writing the schedule.
@Dirk-Jan Faber (Victron Energy), I have now managed to read out the status of whether scheduled loading is currently active using a custom input node:
But I still can't find the appropriate custom output node to activate/deactivate a schedule.
I also looked at https://github.com/victronenergy/dynamic-ess for this. But with these custom output nodes the schedule is only parameterized, but not actually activated?:
But how do I activate/deactivate such a parameterized schedule, i.e. change this setting via a custom output node?:
Well, the Dynamic ESS system is using its own schedule, on another place on the dbus. And it also is activated on a different way. So these should not be mixed.
For normal ESS you should use the 'ESS control' node and write a positive value to the day field for activating it. Writing a negative value to that path will disable that schedule.
Valid days fields are:
So write `7` for an activated daily schedule and `-7` for a de-activated daily schedule.
I'll clarify that in the documentation of the node too.
You could probably modify this
https://github.com/victronenergy/node-red-contrib-victron/blob/master/src/services/services.json
to add the missing values. It should be somewhere lurking around on the filesystem.
There is no longer a need for editing that file if you use the custom input/output node.
Eventually most dbus paths will end up in the specific nodes. While they are not there yet, use the custom nodes. See https://github.com/victronenergy/node-red-contrib-victron#custom-nodes for more info on those.
Me too!
What is the Node-Red way to "activate scheduled charge no.4 at 10pm if battery is below x% SoC" with a standard Victron node (no coding required) ?
I've put an example up on https://gist.github.com/dirkjanfaber/941e34378733a668fbb4bb645f4b3fdc
At least that is one way of doing it.
Thanks to @Dirk-Jan Faber (Victron Energy) I've programmed my battery to switch off via NodeRed by using a "dummy" scheduled charge at a certain time window along with other conditions SoC etc.
44 People are following this question.