You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally it is located in the addon directory. After the last update I found out that SH replaces the whole directory without keeping some files.
My idea was to move the configuration file to /data/conf, which looks fine to me. And it should work.
Now, a user in my PR (Configuration settable from outside henne49/dbus-opendtu#157) mentioned that he is using two instances of the addon for different hardware modules and he needs to store the config files in the addon directories. I assume his case would not work easily with SH, but I don't want to have two different implementations of the configuration reading code (at the moment I have modified the main file for SH usage, see dbus-opendtu-sh.py.
How can we solve this problem?
The text was updated successfully, but these errors were encountered:
Yes, the entire package directory is replaced when downloading a package.
I have provided a place to store config files, etc for each package: /data/setupOptions/ that will survive a firmware update or package download.
Actually any location in /data will survive a firmware update. /data/conf is where Victron stores its configuration information and persistent storage for settings. That might not be a good location as this is the folder that will likely be replaced or heavily modified when doing a configuration backup/restore (planned for the future).
The problem is that the mentioned package may be installed multiple times in different directories (without SetupHelper, of course). Then the /data/setupOptions approach does not work. That's why I 'd like to have a call to setup in the old package directory before removing the package (to preserve files, e.g. in /tmp). During installation of the new package I'll add a check if a configuration is already available and move this back to the new package directory.
You should be able to call setup from the "old" package from setup in the "new" package. The setup script can make copies of whatever files you need to retain as part of the uninstall portion.
Hello Kevin,
I have written the SetupHelper scripts for https://github.com/henne49/dbus-opendtu and now have a problem with the addon's configuration file.
/data/conf
, which looks fine to me. And it should work.How can we solve this problem?
The text was updated successfully, but these errors were encountered: