How davidsmfreire/shinemonitor-api works
ShineMonitor API is a multi-language client suite for the vendor inverter-cloud API, with a Home Assistant integration as a user-facing consumer. The main workflow is authenticate, enumerate account devices, then fetch live or historical readings; the clients also expose broader plant, collector, device-management, and energy actions. Edges reflect the sampled Python, Rust, and Go call paths and documented repository layout; unsampled integration and client internals are represented only where supported by the tree or README.
Main entry points: _client_async.py Python async client · _actions.py URLs and parsing · _client_sync.py Python sync client · lib.rs Rust client
Components 19
API clients
- Python sync client
python/shinemonitor_api/_client_sync.py - Python async client
python/shinemonitor_api/_client_async.py - Generated actions
python/shinemonitor_api/_methods.py - URLs and parsing
python/shinemonitor_api/_actions.py - Auth and protocol
python/shinemonitor_api/_protocol.py - Response models
python/shinemonitor_api/models.py - Rust client
rust/src/lib.rs - Rust actions
rust/src/actions.rs - Go client
go/client.go - Go actions
go/actions.go
API contract
- Endpoint catalog
spec/endpoints.yaml - Data schemas
spec/daily_data_schema.json
Home Assistant
- Integration setup
custom_components/shinemonitor/config_flow.py - Integration lifecycle
custom_components/shinemonitor/__init__.py - Polling coordinator
custom_components/shinemonitor/coordinator.py - Inverter sensors
custom_components/shinemonitor/sensor.py
Other components
- API consumer
- ShineMonitor API
- Home Assistant user
Connections 29
- API consumer → Python sync client: uses client
- API consumer → Python async client: uses client
- API consumer → Rust client: uses client
- API consumer → Go client: uses client
- Python sync client → Auth and protocol: builds auth requests
- Python async client → Auth and protocol: builds auth requests
- Python sync client → URLs and parsing: builds URLs; parses replies
- Python async client → URLs and parsing: builds URLs; parses replies
- Python sync client → Generated actions: inherits actions
- Python async client → Generated actions: inherits actions
- Generated actions → URLs and parsing: builds URLs; parses replies
- URLs and parsing → Response models: maps response data
- Python sync client → ShineMonitor API: sends HTTP requests
- Python async client → ShineMonitor API: sends HTTP requests
- Rust client → Rust actions: exposes actions
- Rust actions → Rust client: dispatches requests
- Rust client → ShineMonitor API: sends HTTP requests
- Go actions → Go client: dispatches requests
- Go client → ShineMonitor API: sends HTTP requests
- Endpoint catalog → URLs and parsing: defines endpoints
- Endpoint catalog → Rust actions: defines endpoints
- Endpoint catalog → Go actions: defines endpoints
- Data schemas → URLs and parsing: describes daily data
- Home Assistant user → Integration setup: configures integration
- Integration setup → Integration lifecycle: provides entry
- Integration lifecycle → Polling coordinator: starts polling
- Polling coordinator → Python async client: logs in; lists devices; fetches readings
- Polling coordinator → Inverter sensors: publishes snapshots
- Inverter sensors → Home Assistant user: exposes measurements