NEWS
Files access from adapters settings page (react)
-
From the adapter settings page (react), I need to create a lookup table, which is only read once and needs to be persisted in the adapter instance file space, but could not find any documentation. Is that possible?
If not, are there any other means to persist information other than in the 'native' part of the instance object.It works from the adapter code with this.readFileAsync(namespace, fileName), but could not find anything similar in GenericApp class.
Thanks for any recommendation -
i see 3 kind of solutions
- you can create a normal datapoint with your adapter with permissions only read
- you can safe your information in the object data of a datapoint, maybe in the datapoint that represence your instance (adapter.0)
for example the history adapter safes his data with the object path common.custom.history.0 and the sql adapter safes the data in common.custom.sql.0
to see this in real life go to a datapoint, enable the logging with the history/and/or the sql-adapter, open the datapoint setting with the pen icon beside and select the object data tab. - you can safe your data as a file below the following path
/opt/iobroker/data-files/(name of your adapter)
my adapter tvprogram, the history and the backup adapter also safe also some data here