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 -
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 recommendationi 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
Hey! Du scheinst an dieser Unterhaltung interessiert zu sein, hast aber noch kein Konto.
Hast du es satt, bei jedem Besuch durch die gleichen Beiträge zu scrollen? Wenn du dich für ein Konto anmeldest, kommst du immer genau dorthin zurück, wo du zuvor warst, und kannst dich über neue Antworten benachrichtigen lassen (entweder per E-Mail oder Push-Benachrichtigung). Du kannst auch Lesezeichen speichern und Beiträge positiv bewerten, um anderen Community-Mitgliedern deine Wertschätzung zu zeigen.
Mit deinem Input könnte dieser Beitrag noch besser werden 💗
Registrieren Anmelden