I know it is possible to turn the generator ON / OFF via the API. The documentation does not show how to set the run time. Is there are a parameter or D-bus path for that?
This site is now in read-only archive mode. Please move all discussion, and create a new account at the new Victron Community site.
I know it is possible to turn the generator ON / OFF via the API. The documentation does not show how to set the run time. Is there are a parameter or D-bus path for that?
Hi! I’d like to help and give you the answer, but don’t know by heart and I’m not near a computer either.
However, I can help a bit in the right direction: to find out if there is such path (on dbus, and then automatically also on mqtt), configure your relay for generator start/stop and then login to ssh and run dbus-spy. You’ll see all available paths.
Alternatively; read through the source code of generator start/stop:
https://github.com/victronenergy/dbus_generator
If you do find such path; please help me and add it to the dbus wiki page:
https://github.com/victronenergy/venus/wiki/dbus#generator
Thanks for the guidance @mvader. Ben seems to have discovered the path we need. Now looking for the REST API equivalent.
BTW looking at dbus_generator.py we noticed that "batterymeasurement" is defined twice under "settingsbase", which could be a bug (or a bug waiting to happen).
Hi, with Rest API you are refering to MQTT; right? I dont think that qualifies as REST.
For MQTT: anything on dbus is also on MQTT. See dbus-mqtt readme for how to translate the dbus service, instance and path to a mqtt topic.
Bug: thanks! We’ll look into that one; I see what you mean.
The D-Bus path you want is com.victronenergy.generator.startstop0/Generator0/ManualStartTimer. The unit is seconds. Write this value first, and then write ManualStart to 1.
Thank you Ben!
Do you know if that is also accessible via the REST API? I know the gen start is available.
Additional resources still need to be added for this topic
GX - Generator auto start/stop
Automatic Generator start/stop
Virtual switch - Generator start/stop
Additional resources still need to be added for this topic
4 People are following this question.