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.
Thanks @mvader (Victron Energy Staff) and @ben. What I meant was - is there a way to set startTimer and start as POSTs or PUTs to vrmapi.victronenergy.com (as opposed to communicating with the MQTT server at mqtt.victronenergy.com)
Hi, no; that is not possible. See those api docs; its reading only
Thank you guys. All clear. One last question. @mvader (Victron Energy Staff) we didn't see ManualStart or ManualStartTimer in the code at https://github.com/victronenergy/dbus_generator. Is that a problem? @ben, I assume you're sure about variables, just double checking.
Hi again, i dont know more then you; the code is available there.
If I were looking for manual-something. I’d use a search feature.
you’ll have to do that yourselves; I’m not a on request code searcher and reader ;o).
I'm sure about the variables, at least on my system.
I generally don't immediately adopt the very latest versions for a while, but I doubt that's an issue in this area. My guess is that the startstop values are injected by some other code, somewhere else.
Yeah, check the code out and search it that way. Don't use the github search.
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.