If you are running DV 1.4.1, then the systemd service resuming from the
last configuration should be the case already.
The systemd-service internally executes the following command:
/usr/bin/dv-runtime -i <IP> -p 4040 -c /etc/dv-runtime.xml -l
/var/log/dv-runtime.log --systemservice 1 --console 0
meaning it uses /etc/dv-runtime.xml as a central configuration file and
/var/log/dv-runtime.log as a central log file.
On orderly shutdown it writes back the current configuration to
/etc/dv-runtime.xml, you can test this by configuring it via GUI and
then issuing the command 'systemctl stop dv-runtime.service', after
that you should see that /etc/dv-runtime.xml has changed.
If you shut off the Raspberry Pi by pulling the plug or any other type
of hard-reset, no configuration will be saved, as that doesn't count as
an orderly shutdown that will stop the systemd services.
SSH to it and shut it down gracefully using 'sudo halt' or similar.
Indeed the XML files as saved in the GUI as projects cannot directly be
used as startup-files for the runtime (-c abc.xml), only to load/save
projects through the GUI.
dv-control is a command-line utility that acts like another client for
the runtime, similar to the GUI. It simply allows you to query the
configuration parameters of a running runtime and changing their
values. It is meant for debugging and advanced command-line use
(scripts, etc.), so it's not documented in detail. We really recommend
using the GUI to change configuration in almost all cases.
Hope this answers your questions, have a nice day!
On Tue, 2021-02-16 at 08:36 +0100, Ali Safa wrote:
> Dear Luca,
>
> Thanks for your answer, that is exactly what I did till now, so I am
> using the systemd-service and it works well but when the raspberry pi
> boots and the systemd-service is launched, there is no "useful"
> configuration file loaded and when I try to launch it with -C by
> specifying a XML config file from Windows, it rejects it.
>
> On the link you sent me it says:
> "When the application is running change the configuration with dv-
> control or with a remote connection with the GUI (recommended for
> easy set up)"
>
> But it does not tell anything about that "dv-control" and how to use
> it via the command line to specify the configuration I want
> (connecting the events to a local IP address that I can read from
> Python). The remote connection with GUI works perfectly but I don't
> want to configure it each time with my computer, I want the thing to
> load the "last" config file when it boots up for example... How can
> we do that?
>
> Thanks,
> Ali
>
>
> Le lun. 15 févr. 2021 à 23:39, Luca Longinotti <
>
luca.lo...@inivation.com> a écrit :