I installed all the stuff and the script runs basically well, many thanks
@CDragon for your hard work!
Nevertheless, the "trackgreenenergy" part crashes every day or two, prompting the following lines:
--------------------------
14:49:39: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
{"Id":"cc8dcff0-92a9-4ef3-980a-736f5d5e6b91","Name":"Solarinput","Serial":XXXXXX,"DeviceEnergyType":1,"FamilyType":1,"ActivePower":-0.35355000000000003,"ActivePowerUnit":"kW","CounterReading":-513.953,"CounterReadingUnit":"kWh","CounterReadingT1":-513.953,"CounterReadingImport":-513.953,"SwitchOn":true,"Voltage":234.5,"VoltageL1":234.5,"Current":-1.512,"PowerFactor":0.998,"PowerFactorL1":0.998,"Temperature":16.95,"ValueDate":"2019-03-16T13:48:55.0197151Z"}
14:49:41: Solar generating 353W so limit car charging to:
6.47A + 0.00A = 6.47A. Charge when above 6A (minAmpsPerTWC).
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/lib/python3.5/threading.py", line 862, in run
self._target(*self._args, **self._kwargs)
File "/home/pi/TWC/TWCManager.py", line 1246, in background_tasks_thread
check_green_energy()
File "/home/pi/TWC/TWCManager.py", line 1296, in check_green_energy
parsedJson = json.loads(jsonStr)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 357, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
14:59:39: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:02:59: Web query: 'b'getStatus'', id 1027, time 1552744979, type 2
15:09:40: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:19:41: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
15:20:39: Web query: 'b'getStatus'', id 41052, time 1552746039, type 2
15:29:42: SHB 4112: 00 00.00/00.00A 0000 0000 M: 09 00.00/06.00A 0000 0000
---------------------------
So at time 14:49:39 was the last successful interrogation of my smart-meter, and then an error encountered. As I'm no IT-crack at all, I'd like to ask you guys out there if you have any clue what's the issue there??
Once this occured, the scipt keeps basically running, but without the "trackgreenenergy" part. It is not recommiting without restarting the script.
Cheers Chris