Skip to content

Instantly share code, notes, and snippets.

@raspberrytipsnl
Created August 25, 2018 14:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raspberrytipsnl/5c8d552d9e1e8a7256d54ad7da4fbf10 to your computer and use it in GitHub Desktop.
Save raspberrytipsnl/5c8d552d9e1e8a7256d54ad7da4fbf10 to your computer and use it in GitHub Desktop.
Gegevens Goodwe omvormer inlezen met Python
#!/usr/bin/python
import json
import urllib
try:
jsonfile = json.load(urllib.urlopen('https://eu.goodwe-power.com/Mobile/GetMyPowerStationByUser?userName=GEBRUIKERSNAAM'))
except ValueError:
print 'Error data kan niet geladen worden...'
else:
print 'Current: ' + jsonfile[0]['currentPower']
print 'capacity: ' + jsonfile[0]['capacity']
print 'Today: ' + jsonfile[0]['value_eDayTotal']
print 'Total: ' + jsonfile[0]['value_eTotal']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment