Skip to main content

ShineMonitor Rest-API client in Python (WatchPower, SolarPower, etc.)

Project description

ShineMonitor API in Python

ShineMonitor is the cloud backend (api.shinemonitor.com) used by several inverter vendor apps — WatchPower, SolarPower, etc. By decompiling the WatchPower Android APK with Jadx, the authentication flow was reverse-engineered, giving direct access to the backend REST API for programmatic inverter queries.

pip install shinemonitor-api

Check the examples/ folder for usage. To run the examples or develop the library, use uv:

uv sync --all-groups

That installs all dependencies, including the optional examples group.

Sync and async

Two thin I/O shells over a shared sansio core (URL building, signing, parsing). Pick whichever fits the calling code — both expose the same methods.

# sync
from shinemonitor_api import ShineMonitorAPI

with ShineMonitorAPI() as api:
    api.login(username, password)
    devices = api.get_devices()
    for device in devices:
        print(api.get_last_data(device).main)
# async
import asyncio
from shinemonitor_api.aio import AsyncShineMonitorAPI

async def main():
    async with AsyncShineMonitorAPI() as api:
        await api.login(username, password)
        devices = await api.get_devices()
        snapshots = await asyncio.gather(
            *(api.get_last_data(d) for d in devices)
        )
        for snapshot in snapshots:
            print(snapshot.main)

asyncio.run(main())

Both clients accept an httpx.Client / httpx.AsyncClient for reuse in apps that already manage one (e.g. Home Assistant).

Migrating from watchpower-api

watchpower-api is the previous PyPI name. The package was renamed to shinemonitor-api because the upstream API serves more than just the WatchPower app. The WatchPowerAPI class is now ShineMonitorAPI.

# before
from watchpower_api import WatchPowerAPI

# after
from shinemonitor_api import ShineMonitorAPI

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

shinemonitor_api-0.6.5.tar.gz (124.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shinemonitor_api-0.6.5-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

Details for the file shinemonitor_api-0.6.5.tar.gz.

File metadata

  • Download URL: shinemonitor_api-0.6.5.tar.gz
  • Upload date:
  • Size: 124.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shinemonitor_api-0.6.5.tar.gz
Algorithm Hash digest
SHA256 c998e31fe3247b7dc1c16f840cfe4e6c9ff53af33bcd091d4ad3666d7d4eda09
MD5 0d3befdbc1b34173fbd0b816951732e9
BLAKE2b-256 d917daf8d20933e85f1b9917339b3fa9e9f3316849075fa561a98c07f9a90629

See more details on using hashes here.

File details

Details for the file shinemonitor_api-0.6.5-py3-none-any.whl.

File metadata

  • Download URL: shinemonitor_api-0.6.5-py3-none-any.whl
  • Upload date:
  • Size: 13.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for shinemonitor_api-0.6.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c7b994d451773e2c2da0a3d206b44fec46ac665436414d24c4a1640f7844e247
MD5 cb29a491b93af26250ce915e1f5acc37
BLAKE2b-256 a3910dc7688152713afc643c1d23d44cdf92265401a7789f82cbc9744fff419b

See more details on using hashes here.

Supported by

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