From aa7da050a8e2b84bad42e11fc5b3ad1a6f9c2729 Mon Sep 17 00:00:00 2001
From: tpoitzsch <>
Date: Fri, 14 Feb 2014 18:48:57 +0000
Subject: [PATCH] docu
git-svn-id: https://svn.fhem.de/fhem/trunk@4921 2b470e98-0d58-463d-a4d8-8e2adae1ed80
---
fhem/FHEM/70_JSONMETER.pm | 52 ++++++++++++++++++++++-----------------
1 file changed, 29 insertions(+), 23 deletions(-)
diff --git a/fhem/FHEM/70_JSONMETER.pm b/fhem/FHEM/70_JSONMETER.pm
index 6311567bb..2ec7e918b 100644
--- a/fhem/FHEM/70_JSONMETER.pm
+++ b/fhem/FHEM/70_JSONMETER.pm
@@ -70,7 +70,7 @@ sub JSONMETER_UpdateAborted($);
##############################################################
# Syntax: valueType, code, FHEM reading name, statisticType
# valueType: 1=OBISvalue | 2=OBISvalueString | 3=jsonProperty | 4=jsonPropertyTime
- # statisticType: 0=noStatistic | 1=maxMinStatistic | 2=timeStatistic
+ # statisticType: 0=noStatistic | 1=maxMinStatistic | 2=integralTimeStatistic
##############################################################
my @jsonFields = (
[3, "meterType", "meterType", 0] # {"meterId": "0000000061015736", "meterType": "Simplex", "interval": 0, "entry": [
@@ -101,7 +101,7 @@ sub JSONMETER_UpdateAborted($);
,[1, "010002080082", "electricityProducedLastWeek", 1]
,[1, "010002080083", "electricityProducedLastMonth", 1]
,[1, "010002080084", "electricityProducedLastYear", 1]
- ,[1, "0101020800FF", "electricityPowerOutput", 2]
+ ,[1, "0101020800FF", "electricityPowerOutput", 1]
,[1, "010020070000", "electricityVoltagePhase1", 1] #{"obis":"010020070000","value":237.06,"unit":"V"},
,[1, "010034070000", "electricityVoltagePhase2", 1] # {"obis":"010034070000","value":236.28,"unit":"V"},
,[1, "010048070000", "electricityVoltagePhase3", 1] # {"obis":"010048070000","value":236.90,"unit":"V"},
@@ -610,6 +610,7 @@ JSONMETER_UpdateAborted($)
If the pool interval is omitted, it is set to 300 (seconds). Smallest possible value is 10.
With 0 it will only update on "manual" request.
+
<deviceType>
Used to define the path and port to extract the json file.
@@ -617,7 +618,7 @@ JSONMETER_UpdateAborted($)
The attribute 'pathString' can be used to add login information to the URL-path of predefined devices.
- - ITF - One tariff electrical meter used by N-ENERGY (Industrietechnik Fröschle)
+ - ITF - One tariff electrical meter used by N-ENERGY (ITF-EDV Fröschl)
- EFR - EFR Smart Grid Hub for electrical meter used by EON, N-ENERGY and EnBW
use the 'pathstring' attribute to specifiy your login information
@@ -636,10 +637,10 @@ JSONMETER_UpdateAborted($)
INTERVAL <polling interval>
Polling interval in seconds
-
+
statusRequest
Update device information
-
+
restartJsonAnalysis
Restarts the analysis of the json file for known readings (compliant to the OBIS standard).
@@ -652,7 +653,7 @@ JSONMETER_UpdateAborted($)
jsonFile
extracts and shows the json data
-
+
jsonAnalysis
extracts the json data and shows the result of the analysis
@@ -667,22 +668,22 @@ JSONMETER_UpdateAborted($)
Repeats by each update the json analysis - use if structure of json data changes
Normally the once analysed structure is saved to reduce CPU load.
-
+
doStatistics < 0 | 1 >
Calculates statistic values - not implemented yet
-
+
pathString <string>
- if deviceType = 'file': specifies the local file name and path
- if deviceType = 'url': specifies the url path
- other deviceType: can be used to add login information to the url path of predefined devices
-
+
port <number>
Specifies the IP port for the deviceType 'url' (default is 80)
-
+
readingFnAttributes
@@ -719,13 +720,13 @@ JSONMETER_UpdateAborted($)
Mit dem Attribute 'pathString' können Login Information an den URL-Pfad von vordefinierten Geräte angehangen werden.
- - ITF - Eintarifzähler von N-ENERGY Netz GmbH (Industrietechnik Fröschle)
+ - ITF - Eintarifzähler von N-ENERGY Netz GmbH (ITF-EDV Fröschl)
- EFR - Stromzähler von EON, N-ENERGY, EnBW
Die Login-Information wird über das Attribute 'pathstring' angegeben.
?LogName=Benutzer&LogPSWD=Passwort
- - LS110 - YouLess LS110 Netzwerkfähiger Sensor für elektromechanische Stromzähler
+ - LS110 - YouLess LS110 Netzwerkfähiger Sensor für elektromechanische Stromzähler
- url - benutzt die URL, welche durch das Attribut 'pathString' und 'port' definiert wird.
- file - benutzt die Datei, welche durch das Attribut 'pathString' definiert wird (im FHEM Dateisystem)
@@ -741,17 +742,17 @@ JSONMETER_UpdateAborted($)
Dies ist sinnvoll, wenn sich die JSON-Struktur ändert. Normalerweise wird die analysierte Struktur
zwischengespeichert, um die CPU-Last gering zu halten.
-
+
INTERVAL <Abfrageinterval>
Abfrageinterval in Sekunden
-
+
restartJsonAnalysis
Neustart der Analyse der json-Datei zum Auffinden bekannter Gerätewerte (kompatibel zum OBIS Standard).
Diese Analysie wird normaler Weise nur einmal durchgeführt, wenn Gerätewerte gefunden wurden.
-
+
statusRequest
Aktualisieren der Gerätewerte
@@ -762,7 +763,11 @@ JSONMETER_UpdateAborted($)
jsonFile
- Liest die JSON-Datei ein und zeigt sie an.
+ Liest die JSON-Datei ein und zeigt sie an.
+
+ jsonAnalysis
+
+ Extrahiert die JSON-Daten und zeigt das Resultat der JSON-Analyse.
@@ -772,20 +777,21 @@ JSONMETER_UpdateAborted($)
doStatistics < 0 | 1 >
Berechnet statistische Werte - noch nicht implementiert
-
<
+
pathString <Zeichenkette>
- Gerätetyp 'file': definiert den lokalen Dateinamen und -pfad
-
<
+
Gerätetyp 'url': Definiert den URL-Pfad
-
<
+
Andere: Kann benutzt werden um Login-Information zum URL Pfad von vordefinerten Geräten hinzuzufügen
-
<
+
-
- port <Nummer>
+
+ port <Nummer>
- Beim Gerätetyp 'url' kann hier der URL-Port festgelegt werden (standardmässig 80)
+ Beim Gerätetyp 'url' kann hier der URL-Port festgelegt werden (standardmässig 80)
+
readingFnAttributes