Scrounger / ioBroker.linkeddevices

Create linked objects (datapoints) of your devices with a self-defined structure. This makes it possible to create a structure in ioBroker, where all objects are centralized, e.g. to be used in the vis or scripts.
https://forum.iobroker.net/topic/22301/neuer-adapter-linkeddevices
MIT License
17 stars 11 forks source link

add option for smartName to the linked device #38

Closed darkiop closed 4 years ago

darkiop commented 4 years ago

In the options for the new object give the possibility to assign a SmartName directly to it.

example: createState("Test-Button", { name: 'Test-Button', "role": "button", "type": "mixed", "read": true, "write": true, "smartName": { "de": "Test-Button", "smartType": "SWITCH" } });

Scrounger commented 4 years ago

@darkiop Zeig mal bitte die raw daten eines datenpunktes der den smartName hat. Worfür ist der smartName gedacht - also wofür wird dieser verwendet?

darkiop commented 4 years ago

{ "from": "system.adapter.javascript.0", "user": "system.user.admin", "ts": 1581845991786, "common": { "name": "Test-Button", "role": "button", "type": "mixed", "read": true, "write": true, "smartName": { "de": "Test-Button", "smartType": "SWITCH" } }, "native": {}, "acl": { "object": 1636, "owner": "system.user.admin", "ownerGroup": "system.group.administrator", "state": 1636 }, "_id": "javascript.0.Test-Button", "type": "state" }

darkiop commented 4 years ago

Mit dem smartName wird der DP direkt dem IOT Adapter zugeordnet. Du sparst dir dann das manuelle Anlegen in diesem.

Scrounger commented 4 years ago

Also die common werte werden beim verlinken komplett mit kopiert, d.h. wenn im parent object vorhanden, müsst es da sein.

Oder du hättest gerne das man im config screen des Adapters zwei felder hat für smarName und SmartType? Was hat es mit der sprache zu tun "de": "Test-Button"?

darkiop commented 4 years ago

Guten Morgen, kopieren OK - schau ich mir mal an ob das funktioniert.

Meine Anfrage bezog sicher aber auf den Zustand, dass das Quellobjekt diesen SmartName nicht hat und somit durch das linked-Objekt diesen bekommen kann - denn nicht immer ist es möglich das Quell-Objekt entsprechend anzupassen.

Das mit der Sprache müsste der String sein, der dann in der Alexa-App angezeigt wird.

Gruß

Scrounger commented 4 years ago

gelöst, details siehe https://forum.iobroker.net/topic/34420/gel%C3%B6st-troubleshooting-iot-smart-devices-linkeddevices/2