Skip to content

Commit

Permalink
debug msg for powerfox request
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel committed Aug 23, 2022
1 parent fe36a33 commit e56d4d9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions modules/bezug_powerfox/powerfox.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
import logging
from typing import List

import requests
import traceback

from helpermodules.cli import run_using_positional_cli_args

from modules.common import req
log = logging.getLogger("PowerFox")


Expand All @@ -15,8 +14,8 @@ def update(powerfoxid: str, powerfoxuser: str, powerfoxpass: str):
log.debug('Powerfox User: ' + powerfoxuser)
log.debug('Powerfox Passwort: ' + powerfoxpass)

response = requests.get('https://backend.powerfox.energy/api/2.0/my/'+powerfoxid +
'/current', auth=(powerfoxuser, powerfoxpass), timeout=3).json()
response = req.get_http_session().get('https://backend.powerfox.energy/api/2.0/my/'+powerfoxid +
'/current', auth=(powerfoxuser, powerfoxpass), timeout=3).json()
try:
einspeisungwh = int(response['A_Minus'])
with open("/var/www/html/openWB/ramdisk/einspeisungkwh", "w") as f:
Expand Down

0 comments on commit e56d4d9

Please sign in to comment.