Deconz-rest-plugin: Feature Request: configurable user data directory

Created on 6 Mar 2018  ·  6Comments  ·  Source: dresden-elektronik/deconz-rest-plugin

@manup - can you allow deCONZ to use an arbitrary directory for storing user data? Currently it seems like different aspects of user data get stored in different places on the Linux filesystem, which is making it hard in Docker development to “persist” a user’s configuration (when a Docker container is deleted and recreated, such as during a version update, all aspects of the filesystem get recreated except for what has been persisted). For example, I’ve tried persisting $HOME/.local/share/dresden-elektronik/deCONZ, but there must be more data than this as on starting the new container no groups, names, etc are present.

Any ideas on this?

WONTFIX stale

Most helpful comment

@snozzlebert Yes, changing the homedir is what I’m doing now in my Hass.io addon. Unfortunately it’s not especially transparent to the user where the data is - even if you change the homedir to, for example, /config/deconz, it means that the data gets written to /config/deconz/.local/share/dresden-elektronik/deCONZ. Which means for the average user /config/deconz looks empty because most clients hide dot files by default. Would be much better to be able to specify the data dir as /config/deconz and have the files appear in there directly. I’m not crazy about a symlink because its a workaround and probably more prone to breaking.

All 6 comments

@marthoc deCONZ all configuration data used by deCONZ is indeed stored in $HOME/.local/share/dresden-elektronik/deCONZ. If needed we can add an command line option to use a different directory, this might also become handy in debugging situations.

Beside that only ZigBee network settings — like panid, network key, channel, etc. — are stored on the RaspBee/ConBee directly. Future versions will keep these parameters also in the configuration directory, for more reliable network operation.

Thanks @manup. I think my particular problem is related to developing for Hass.io (the containerized version of Home Assistant) - but a command-line option to store user data would be very helpful in this situation and the general Docker scenario, and you are right probably for debugging purposes too.

@marthoc You can use a symbolic link or for the Hass.io addon you can change the location of the home directory

export HOME=/data

or at Docker level:

ENV HOME=/data

@snozzlebert Yes, changing the homedir is what I’m doing now in my Hass.io addon. Unfortunately it’s not especially transparent to the user where the data is - even if you change the homedir to, for example, /config/deconz, it means that the data gets written to /config/deconz/.local/share/dresden-elektronik/deCONZ. Which means for the average user /config/deconz looks empty because most clients hide dot files by default. Would be much better to be able to specify the data dir as /config/deconz and have the files appear in there directly. I’m not crazy about a symlink because its a workaround and probably more prone to breaking.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jan666 picture jan666  ·  4Comments

Thomas-Vos picture Thomas-Vos  ·  4Comments

salopette picture salopette  ·  4Comments

wizkidorg picture wizkidorg  ·  3Comments

qm3ster picture qm3ster  ·  3Comments