RPI: use a requests seesion for the volkszaehler plugin to be able to

use hhtp keep-alive functionality. Print debug-output only when debug
is enabled
This commit is contained in:
Christian Ehrlicher 2022-09-04 14:24:54 +02:00
parent 01481084a6
commit ddbb35eff3
2 changed files with 4 additions and 2 deletions

View file

@ -72,7 +72,8 @@ def poll_inverter(inverter, retries=4):
# Handle the response data if any
if response:
c_datetime = datetime.now()
print(f'{c_datetime} Payload: ' + hoymiles.hexify_payload(response))
if hoymiles.HOYMILES_DEBUG_LOGGING:
print(f'{c_datetime} Payload: ' + hoymiles.hexify_payload(response))
decoder = hoymiles.ResponseDecoder(response,
request=com.request,
inverter_ser=inverter_ser