Skip to content

Commit

Permalink
remove headers in request
Browse files Browse the repository at this point in the history
  • Loading branch information
LKuemmel committed Jan 13, 2022
1 parent 5ef01ce commit 69d77a9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions modules/wr_tripower9000/tripower.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@


def update_sma_webbox(address: str):
# response = requests.post('http://' + address + '/rpc', json=data, timeout=3)
# does not give the same result
headers = {'Content-Type': 'application/json', }
data = {'RPC': '{"version": "1.0","proc": "GetPlantOverview","id": "1","format": "JSON"}'}
response = requests.post('http://' + address + '/rpc', headers=headers, data=data, timeout=3)
response = requests.post('http://' + address + '/rpc', data=data, timeout=3)
response.raise_for_status()
response_data = response.json()
get_inverter_value_store(1).set(InverterState(
Expand Down

0 comments on commit 69d77a9

Please sign in to comment.