mirror of
https://github.com/uhi22/pyPLC.git
synced 2024-11-20 01:13:58 +00:00
feature: added EVSE_Status in claralogconverter and 3rd channel in scope to view it.
This commit is contained in:
parent
03ca236536
commit
7014d1c2d2
2 changed files with 10 additions and 4 deletions
|
@ -73,9 +73,9 @@ def convertClaralogToTxt(inputFileName):
|
||||||
decoded=exiConnector.exiDecode(strExi, pre)
|
decoded=exiConnector.exiDecode(strExi, pre)
|
||||||
#print(decoded)
|
#print(decoded)
|
||||||
print(decoded, file=fileOut)
|
print(decoded, file=fileOut)
|
||||||
print(decoded)
|
#print(decoded)
|
||||||
strTimeStamp = line[line.find("[")+1 : line.find("]")]
|
strTimeStamp = line[line.find("[")+1 : line.find("]")]
|
||||||
print(strTimeStamp)
|
#print(strTimeStamp)
|
||||||
try:
|
try:
|
||||||
jsondict = json.loads(decoded)
|
jsondict = json.loads(decoded)
|
||||||
try:
|
try:
|
||||||
|
@ -84,7 +84,6 @@ def convertClaralogToTxt(inputFileName):
|
||||||
i = combineValueAndMultiplier(jsondict["EVSEPresentCurrent.Value"], jsondict["EVSEPresentCurrent.Multiplier"])
|
i = combineValueAndMultiplier(jsondict["EVSEPresentCurrent.Value"], jsondict["EVSEPresentCurrent.Multiplier"])
|
||||||
print("[" + strTimeStamp + "] EVSEPresentCurrent=" + str(i), file=fileOutValues)
|
print("[" + strTimeStamp + "] EVSEPresentCurrent=" + str(i), file=fileOutValues)
|
||||||
except:
|
except:
|
||||||
print("no present voltage")
|
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
u = combineValueAndMultiplier(jsondict["EVTargetVoltage.Value"], jsondict["EVTargetVoltage.Multiplier"])
|
u = combineValueAndMultiplier(jsondict["EVTargetVoltage.Value"], jsondict["EVTargetVoltage.Multiplier"])
|
||||||
|
@ -98,6 +97,13 @@ def convertClaralogToTxt(inputFileName):
|
||||||
print("[" + strTimeStamp + "] EVRESSSOC=" + str(soc), file=fileOutValues)
|
print("[" + strTimeStamp + "] EVRESSSOC=" + str(soc), file=fileOutValues)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
try:
|
||||||
|
soc = jsondict["DC_EVSEStatus.EVSEStatusCode"]
|
||||||
|
print("[" + strTimeStamp + "] EVSEStatusCode=" + str(soc), file=fileOutValues)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if ((numberOfPackets % 100)==0):
|
if ((numberOfPackets % 100)==0):
|
||||||
|
|
2
scope.py
2
scope.py
|
@ -86,7 +86,7 @@ Lines = fileIn.readlines()
|
||||||
|
|
||||||
# yellow green blue red orange
|
# yellow green blue red orange
|
||||||
#channelColors = ["#FFFF00", "#10FF10", "#4040FF", "#FF4040", "#FFC000" ]
|
#channelColors = ["#FFFF00", "#10FF10", "#4040FF", "#FF4040", "#FFC000" ]
|
||||||
channelColors = ["#FFFF00", "#10FF10" ]
|
channelColors = ["#FFFF00", "#10FF10", "#4040FF" ]
|
||||||
|
|
||||||
numberOfChannels = len(channelColors)
|
numberOfChannels = len(channelColors)
|
||||||
print(str(numberOfChannels) + " channels")
|
print(str(numberOfChannels) + " channels")
|
||||||
|
|
Loading…
Reference in a new issue