Skip to main content

A library to retrieve data from sunweg.net

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sunweg-3.1.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

sunweg-3.1.0-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file sunweg-3.1.0.tar.gz.

File metadata

  • Download URL: sunweg-3.1.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sunweg-3.1.0.tar.gz
Algorithm Hash digest
SHA256 a7bf7918323b2ae7a1defeb46c8903cfa1469ea597019e0f21100916cad7cdb1
MD5 bdecef787968169effebf1d64846ac43
BLAKE2b-256 d321499b51c2edf4921f391ff90d0484ac4d40d8d06fe0a29865f506acc87fae

See more details on using hashes here.

File details

Details for the file sunweg-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: sunweg-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.20

File hashes

Hashes for sunweg-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f83b8584403bb10ca6d9559f0727ae892ab4283f3f4d21357ee9a8ac701c643
MD5 eeaa924dd2a649365398d82b0d186deb
BLAKE2b-256 dabd12e3ff8eb6312571768e15299229682a0f54c9d64c7cf1d60973f31710eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page