From 7014d1c2d2990c9282cb1885f1d6be65ddaf7a5d Mon Sep 17 00:00:00 2001 From: uhi22 Date: Mon, 11 Dec 2023 22:00:02 +0100 Subject: [PATCH] feature: added EVSE_Status in claralogconverter and 3rd channel in scope to view it. --- claralogConverter.py | 12 +++++++++--- scope.py | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/claralogConverter.py b/claralogConverter.py index 846fba2..930574f 100644 --- a/claralogConverter.py +++ b/claralogConverter.py @@ -73,9 +73,9 @@ def convertClaralogToTxt(inputFileName): decoded=exiConnector.exiDecode(strExi, pre) #print(decoded) print(decoded, file=fileOut) - print(decoded) + #print(decoded) strTimeStamp = line[line.find("[")+1 : line.find("]")] - print(strTimeStamp) + #print(strTimeStamp) try: jsondict = json.loads(decoded) try: @@ -84,7 +84,6 @@ def convertClaralogToTxt(inputFileName): i = combineValueAndMultiplier(jsondict["EVSEPresentCurrent.Value"], jsondict["EVSEPresentCurrent.Multiplier"]) print("[" + strTimeStamp + "] EVSEPresentCurrent=" + str(i), file=fileOutValues) except: - print("no present voltage") pass try: u = combineValueAndMultiplier(jsondict["EVTargetVoltage.Value"], jsondict["EVTargetVoltage.Multiplier"]) @@ -98,6 +97,13 @@ def convertClaralogToTxt(inputFileName): print("[" + strTimeStamp + "] EVRESSSOC=" + str(soc), file=fileOutValues) except: pass + + try: + soc = jsondict["DC_EVSEStatus.EVSEStatusCode"] + print("[" + strTimeStamp + "] EVSEStatusCode=" + str(soc), file=fileOutValues) + except: + pass + except: pass if ((numberOfPackets % 100)==0): diff --git a/scope.py b/scope.py index 1f5a928..2298e3b 100644 --- a/scope.py +++ b/scope.py @@ -86,7 +86,7 @@ Lines = fileIn.readlines() # yellow green blue red orange #channelColors = ["#FFFF00", "#10FF10", "#4040FF", "#FF4040", "#FFC000" ] -channelColors = ["#FFFF00", "#10FF10" ] +channelColors = ["#FFFF00", "#10FF10", "#4040FF" ] numberOfChannels = len(channelColors) print(str(numberOfChannels) + " channels")