NEWS
Aus Adapter Zugriff auf Breitengrad, Längengrad
Entwicklung
4
Beiträge
2
Kommentatoren
375
Aufrufe
3
Watching
-
-
Hallo,
ich möchte in einem Adapter auf die Konfigurationsdaten der Basiseinstellungen (Breitengrad, Längengrad zugreifen)Beispiel in main.js des Adapters:
let systemConfig = this.getObject('system.config');liefert undefined!
Danke!
-
Danke!
Aber irgendwas passt noch nicht: 'system.adapter.config' und 'system.config' liefern systemConfig = "undefined"let systemConfig = this.getForeignObject('system.adapter.config', () => { if (this.systemConfig) { this.log.debug(`latitude: ${systemConfig.common.latitude}`); this.log.debug(`longitude: ${systemConfig.common.longitude}`); } else { this.log.debug(`this.systemConfig: ${this.systemConfig}`); } }); -
Danke!
Aber irgendwas passt noch nicht: 'system.adapter.config' und 'system.config' liefern systemConfig = "undefined"let systemConfig = this.getForeignObject('system.adapter.config', () => { if (this.systemConfig) { this.log.debug(`latitude: ${systemConfig.common.latitude}`); this.log.debug(`longitude: ${systemConfig.common.longitude}`); } else { this.log.debug(`this.systemConfig: ${this.systemConfig}`); } });