Skip to content

rokam/sunweg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SunWeg

Python build Python tests Python coverage Python fake8

Python lib for WEG solar energy platform, SunWEG.net

Usage

Retrieve token

You need to use devtools from your browser to retrieve the token. In most of them, you can open devtools by pressing F12. Inside the network tab, you need to check the preserve logs and then do a login.

You can find the token in the request header of various XHR requests, for example: Devtools with a request with a token

It will be available in the X-Auth-Token-Update header.

Code sample

from sunweg.api import APIHelper

api = APIHelper(token='your token here')
plants = api.listPlants()
for plant in plants:
    print(plant)
    for inverter in plant.inverters:
        print(inverter)
        for phase in inverter.phases:
            print(phase)
        for mppt in inverter.mppts:
            print(mppt)
            for string in mppt.strings:
                print(string)

Documentation

Check the DOCs for API documentation.

Contribute

Feel free to send issues and pull requests.

About

Python lib for WEG solar platform

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages