Skip to content

Instantly share code, notes, and snippets.

@raspberrytipsnl
Created August 25, 2018 14:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
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