
Ein Visuelement setzt per Befehl die GA 0/0/1 auf einen Wert. Dieses KO wird nun exportiert und (optional) auch importiert. Nur dürften die GAs wohl kaum zwischen den einzelnen Nutzern übereinstimmen... Daher ist deren Export eigentlich Blödsinn, andererseits sind u.U. gerade die KO-Befehle interessant im Kontext eines (komplexeren) Visuelements.
Meine Lösung sieht bislang in Etwa so aus: Die KOs werden quasi referenziert (z.B. "@1") und im Abschnitt "comobjects" (provisorisch) dann deklariert. Beim Import wird man dann wahrscheinlich wählen können, ob man die KOs 1:1 übernehmen möchte oder entsprechend anpassen muss (grob gesagt).
Das Format wird wahrscheinlich JSON sein - ich denke dies ist mit entsprechenden Editoren gut zu verarbeiten (schließlich kann man auf diese Weise auch eigene Import-Dateien kreieren, also ohne die EDOMI-GUI). XML ist m.E. irgendwie.... naja...

Das Ganze wird dann wohl in ein TAR-Archiv verpackt werden, damit auch Bilddateien etc. exportiert werden können.
Hier mal ein (unvollständiges) Beispiel - nicht gerade selbsterklärend, aber damit könnte die Richtung klar werden:
Code:
{ "visuelements": [ { "db_id": "9", "type": "27", "name": "", "group": "@0", "caption": "{#} kW", "x": "352", "y": "452", "width": "96", "height": "96", "zindex": "0", "option1": "7", "option2": "0", "option3": "0", "option4": "9.6", "option5": "4", "option6": "1", "option7": "0", "option8": "30", "option9": "10", "option10": "350", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ ], "comobjects": { "1": "@0", "2": "" } }, { "db_id": "59", "type": "27", "name": "", "group": "@0", "caption": "", "x": "356", "y": "456", "width": "88", "height": "88", "zindex": "0", "option1": "7", "option2": "0", "option3": "0", "option4": "3.6", "option5": "4", "option6": "1", "option7": "0", "option8": "30", "option9": "10", "option10": "350", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ ], "comobjects": { "1": "@1", "2": "" } }, { "db_id": "60", "type": "27", "name": "", "group": "@0", "caption": "", "x": "360", "y": "460", "width": "80", "height": "80", "zindex": "0", "option1": "7", "option2": "0", "option3": "0", "option4": "3.6", "option5": "4", "option6": "1", "option7": "0", "option8": "30", "option9": "10", "option10": "350", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ ], "comobjects": { "1": "@2", "2": "" } }, { "db_id": "61", "type": "27", "name": "", "group": "@0", "caption": "", "x": "364", "y": "464", "width": "72", "height": "72", "zindex": "0", "option1": "7", "option2": "0", "option3": "0", "option4": "3.6", "option5": "4", "option6": "1", "option7": "0", "option8": "30", "option9": "10", "option10": "350", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ { "db_id": "13", "type": "20", "option1": "2", "option2": "" } ], "comobjects": { "1": "@3", "2": "" } }, { "db_id": "110", "type": "1", "name": "", "group": "@1", "caption": "Poolpumpe\n\"@'°<nix>", "x": "252", "y": "452", "width": "96", "height": "48", "zindex": "0", "option1": "0", "option2": "0", "option3": "", "option4": "", "option5": "", "option6": "", "option7": "", "option8": "", "option9": "", "option10": "", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ { "db_id": "16", "type": "2", "option1": "@4", "option2": "1" } ], "comobjects": { "1": "", "2": "" } }, { "db_id": "111", "type": "1", "name": "", "group": "@1", "caption": "0", "x": "252", "y": "500", "width": "96", "height": "48", "zindex": "0", "option1": "0", "option2": "0", "option3": "", "option4": "", "option5": "", "option6": "", "option7": "", "option8": "", "option9": "", "option10": "", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ { "db_id": "17", "type": "2", "option1": "@4", "option2": "0" } ], "comobjects": { "1": "", "2": "" } }, { "db_id": "112", "type": "1", "name": "Leuchtring", "group": "@1", "caption": "", "x": "252", "y": "452", "width": "96", "height": "96", "zindex": "0", "option1": "0", "option2": "0", "option3": "", "option4": "", "option5": "", "option6": "", "option7": "", "option8": "", "option9": "", "option10": "", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ ], "comobjects": { "1": "@5", "2": "" } } ], "visuelements.groups": [ { "db_id": "62", "id": "@0", "name": "Energie" }, { "db_id": "109", "id": "@1", "name": "Poolpumpe" } ], "comobjects": [ { "db_id": "551", "id": "@0", "name": "Gesamtleistung", "gatyp": "2", "ga": "551", "dpt": "0", "defaultvalue": "" }, { "db_id": "398", "id": "@1", "name": "Leistung (kW) FI1", "gatyp": "1", "ga": "9/2/3", "dpt": "9", "defaultvalue": "" }, { "db_id": "399", "id": "@2", "name": "Leistung (kW) FI2", "gatyp": "1", "ga": "9/2/4", "dpt": "9", "defaultvalue": "" }, { "db_id": "400", "id": "@3", "name": "Leistung (kW) FI3", "gatyp": "1", "ga": "9/2/5", "dpt": "9", "defaultvalue": "" }, { "db_id": "441", "id": "@4", "name": "Poolpumpe", "gatyp": "2", "ga": "441", "dpt": "0", "defaultvalue": "" }, { "db_id": "201", "id": "@5", "name": "GG: Poolpumpe", "gatyp": "1", "ga": "0/1/113", "dpt": "1", "defaultvalue": "" } ] }
Code:
{ "visuelements": [ { "db_id": "110", "type": "1", "name": "", "group": "@0", "caption": "Poolpumpe\n\"@'°<nix>", "x": "252", "y": "452", "width": "96", "height": "48", "zindex": "0", "option1": "0", "option2": "0", "option3": "", "option4": "", "option5": "", "option6": "", "option7": "", "option8": "", "option9": "", "option10": "", "pagelink": "", "popupclose": "0", "design": { "###": 1, "dy": 2 }, "initonly": "0", "dyndesigns": [ { "###": 1, "dy": 2 }, { "dx": 1, "dy": 2 } ], "commands": [ { "db_id": "16", "type": "2", "option1": "@0", "option2": "1" } ], "comobjects": { "1": "", "2": "" } } ], "visuelements.groups": [ { "db_id": "109", "id": "@0", "name": "Poolpumpe" } ], "comobjects": [ { "db_id": "441", "id": "@0", "folderid": "31", "name": "Poolpumpe", "description": "", "gatyp": "2", "ga": "441", "dpt": "0", "defaultvalue": "", "initscan": "0", "initsend": "0", "requesttype": "0", "remanent": "0", "min": "", "max": "", "step": "", "digits": "", "csvlist": "" } ] }
Einen Kommentar schreiben: