From 9a68b6a67e8220a976a869b041d0377ba55dc919 Mon Sep 17 00:00:00 2001 From: tupol <> Date: Fri, 9 Mar 2018 14:18:10 +0000 Subject: [PATCH] JSOMETER: LS120 git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@16360 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/70_JSONMETER.pm | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/FHEM/70_JSONMETER.pm b/FHEM/70_JSONMETER.pm index 861d8fef2..14eec9973 100644 --- a/FHEM/70_JSONMETER.pm +++ b/FHEM/70_JSONMETER.pm @@ -69,6 +69,7 @@ sub JSONMETER_doStatisticDeltaSingle ($$$$$$); my %meterTypes = ( ITF => "80 GetMeasuredValue.cgi" ,EFR => "80 json.txt" ,LS110 => "80 a?f=j" + ,LS120 => "80 a?f=j" ); ############################################################## @@ -81,10 +82,12 @@ sub JSONMETER_doStatisticDeltaSingle ($$$$$$); [3, "meterType", "meterType", 0, 0] # {"meterId": "0000000061015736", "meterType": "Simplex", "interval": 0, "entry": [ ,[4, "timestamp", "deviceTime", 0, 0] # {"timestamp": 1389296286, "periodEntries": [ ,[3, "cnt", "electricityConsumed", 3, 1] # {"cnt":" 22,285","pwr":764,"lvl":0,"dev":"","det":"","con":"OK","sts":"(06)","raw":0} + ,[3, "cs0", "electricityConsumed", 3, 1] ,[3, "energy", "electricityConsumed", 3, 1] # {"status":"ok","result":[{"energy":ENERGY,"energyOut":ENERGYOUT,"time":TIME},...]} ,[3, "energyOUT", "electricityProduced", 3, 1] # {"status":"ok","result":[{"energy":ENERGY,"energyOut":ENERGYOUT,"time":TIME},...]} ,[3, "power", "electricityPower", 3, 1] # {"status":"ok","result":[{"power":POWER,"time":TIME}]} ,[3, "pwr", "electricityPower", 1, 0] # {"cnt":" 22,285","pwr":764,"lvl":0,"dev":"","det":"","con":"OK","sts":"(06)","raw":0} + ,[3, "ps0", "electricityPower", 1, 0] ,[1, "010000090B00", "deviceTime", 0, 0] # { "obis":"010000090B00","value":"dd.mm.yyyy,hh:mm"} ,[2, "0.0.0", "meterID", 0, 0] # {"obis": "0.0.0", "scale": 0, "value": 1627477814, "unit": "", "valueString": "0000000061015736" }, ,[1, "0100000000FF", "meterID", 0, 0] # # { "obis":"0100000000FF","value":"xxxxx"}, @@ -192,12 +195,11 @@ JSONMETER_Define($$) $hash->{NAME} = $name; - $hash->{STATE} = "Initializing" if $interval > 0; - $hash->{STATE} = "Manual mode" if $interval == 0; - $hash->{HOST} = $host if $type ne "file"; - $hash->{INTERVAL} = $interval; - $hash->{NOTIFYDEV} = "global"; - $hash->{deviceType} = $type; + $hash->{STATE} = "Initializing" if $interval > 0; + $hash->{STATE} = "Manual mode" if $interval == 0; + $hash->{HOST} = $host if $type ne "file"; + $hash->{INTERVAL} = $interval; + $hash->{MODEL} = $type; RemoveInternalTimer($hash); #Get first data after 13 seconds @@ -358,7 +360,7 @@ JSONMETER_GetUpdate($) { my ($hash) = @_; my $name = $hash->{NAME}; - my $type = $hash->{deviceType}; + my $type = $hash->{MODEL}; if(!$hash->{LOCAL} && $hash->{INTERVAL} > 0) { @@ -388,7 +390,7 @@ sub JSONMETER_GetJsonFile ($) my ($name) = @_; my $returnStr; my $hash = $defs{$name}; - my $type = $hash->{deviceType}; + my $type = $hash->{MODEL}; my $ip = ""; $ip = $hash->{HOST} if defined $hash->{HOST}; @@ -954,7 +956,8 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)
      attr pathString ?LogName=user&LogPSWD=password -
  • LS110 - YouLess LS110 network sensor (counter) for electro mechanical electricity meter
  • +
  • LS110 - YouLess LS110 network sensor (counter) for electro mechanical electricity meter
  • +
  • LS120 - YouLess LS120 new model
  • url - use the URL defined via the attributes 'pathString' and 'port'
  • file - use the file defined via the attribute 'pathString' (positioned in the FHEM file system)
  • @@ -1086,7 +1089,8 @@ JSONMETER_doStatisticDeltaSingle ($$$$$$)       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
  • +
  • LS120 - YouLess LS120 Neues Modell
  • 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)