From 7d086f4b3661cd364cb402db84a29105b01db805 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 27 May 2011 22:27:43 +0200 Subject: [PATCH] added property for local interface address --- lib/Definition/EntityDefinition.json | 22 +++++++++++----------- lib/Definition/PropertyDefinition.json | 25 ++++++++++++++++++++----- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/lib/Definition/EntityDefinition.json b/lib/Definition/EntityDefinition.json index 9c87194..04dca26 100644 --- a/lib/Definition/EntityDefinition.json +++ b/lib/Definition/EntityDefinition.json @@ -68,7 +68,7 @@ { "name" : "power", "required" : ["title", "resolution"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "cost", "public", "local"], "icon" : "bolt.png", "unit" : "W", "interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter", @@ -82,7 +82,7 @@ { "name" : "powersensor", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "cost", "public", "local"], "icon" : "bolt.png", "unit" : "W", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -96,7 +96,7 @@ { "name" : "gas", "required" : ["title", "resolution"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "cost", "public", "local"], "icon" : "flame.png", "unit" : "m³/h", "interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter", @@ -110,7 +110,7 @@ { "name" : "water", "required" : ["title", "resolution"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "cost"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "cost", "public", "local"], "icon" : "waterdrop.png", "unit" : "l/h", "interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter", @@ -124,7 +124,7 @@ { "name" : "temperature", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "thermometer.png", "unit" : "°C", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -138,7 +138,7 @@ { "name" : "pressure", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "cloud.png", "unit" : "hPa", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -152,7 +152,7 @@ { "name" : "humidity", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "rain.png", "unit" : "%", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -166,7 +166,7 @@ { "name" : "windspeed", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "propeller.png", "unit" : "km/h", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -180,7 +180,7 @@ { "name" : "radiation", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "resolution", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "resolution", "public", "local"], "icon" : "radioactivity.png", "unit" : "μSv", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -194,7 +194,7 @@ { "name" : "luminosity", "required" : ["title"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "sun.png", "unit" : "cd", "interpreter" : "Volkszaehler\\Interpreter\\SensorInterpreter", @@ -208,7 +208,7 @@ { "name" : "workinghours", "required" : ["title", "resolution"], - "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public"], + "optional" : ["description", "details:", "owner:", "address:", "tolerance", "public", "local"], "icon" : "clock.png", "unit" : "h", "interpreter" : "Volkszaehler\\Interpreter\\MeterInterpreter", diff --git a/lib/Definition/PropertyDefinition.json b/lib/Definition/PropertyDefinition.json index 16f5ec7..3743f81 100644 --- a/lib/Definition/PropertyDefinition.json +++ b/lib/Definition/PropertyDefinition.json @@ -41,7 +41,7 @@ "name" : "description", "type" : "text", "pattern" : "/[a-z0-9\\s]/", - "max" : 255, // TODO use "text" type for unlimited descriptions => PropertyModel + "max" : 255, // TODO use "text" type for unlimited descriptions => PropertyModel "translation" : { "de" : "Beschreibung", "en" : "Description" @@ -63,6 +63,14 @@ "en" : "Active" } }, + { + "name" : "local", + "type" : "string", + "translation" : { + "de" : "Lokale Adresse", + "en" : "Local Address" + } + }, { "name" : "cost", "type" : "float", @@ -121,7 +129,7 @@ } }, { - "name" : "address:houseno", + "name" : "address:house", "type" : "string", "max" : 5, "translation" : { @@ -345,12 +353,19 @@ } }, { - "name" : "photo:url", + "name" : "photo", "type" : "string", - "pattern" : "", // TODO add pattern "translation" : { "de" : "Foto (URL)", "en" : "Photo (URL)" } - } + }, + { + "name" : "uri", + "type" : "string", + "translation" : { + "de" : "Hyperlink", + "en" : "Hyperlink" + } + } ]