Skip to main content

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).

Targeting a different vendor app

The ShineMonitor backend is shared by many white-label apps (WatchPower, RenoClient / Renovigi, ...). Devices are scoped to the app that registered them, so pass the matching profile — WatchPower is the default.

from shinemonitor_api import ShineMonitorAPI, AppProfile

# a shipped preset
with ShineMonitorAPI(app=AppProfile.RENOCLIENT) as api:
    api.login(username, password)
    devices = api.get_devices()

# an app without a preset — supply its identifiers
custom = AppProfile(app_id="com.example.app", app_version="1.0.0")
api = ShineMonitorAPI(app=custom)

AppProfile.from_name("renoclient") resolves a shipped preset by name (handy when the app is chosen from config). get_devices() automatically falls back from the undocumented webQueryDeviceEs action to the documented queryDevices when the former reports no devices.

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

Metadata

Release files for shinemonitor-api 0.8.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shinemonitor-api 0.8.1
File Size Uploaded Provenance
shinemonitor_api-0.8.1.tar.gz 128.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shinemonitor-api 0.8.1
File Interpreter ABI Platform
shinemonitor_api-0.8.1-py3-none-any.whl Python 3 none any Details

Total release size: 143.8 kB

Release files / shinemonitor_api-0.8.1.tar.gz

Download URL shinemonitor_api-0.8.1.tar.gz
Size 128.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9c5243a309f3028c76e889099393745f957e948370ea2fb556ddbb793ccfa19f
BLAKE2b-256 checksum
How to use checksums
e18e63ebbee28939660f3a8a13697d841ee4338de9e018e5126a7640b99c2d58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.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}

Release files / shinemonitor_api-0.8.1-py3-none-any.whl

Download URL shinemonitor_api-0.8.1-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
337c18d9ae7d31fa6e4d9a5546e2b11d7b73771a0aa70722c6f4433392a018e5
BLAKE2b-256 checksum
How to use checksums
aab6bbf7efa5572ab7a0608974222f412b485979921d006df54d8d45e3fa0d6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.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}

Security for shinemonitor-api 0.8.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page