Crates.io | solaredge |
lib.rs | solaredge |
version | 0.8.1 |
created_at | 2021-08-30 09:07:22.490191+00 |
updated_at | 2025-08-29 08:11:43.722221+00 |
description | SolarEdge API client |
homepage | |
repository | https://github.com/twistedfall/solaredge |
max_upload_size | |
id | 444087 |
size | 126,109 |
Support the project | Documentation
Run:
cargo add solaredge
Or add to your Cargo.toml:
[dependencies]
solaredge = "0.8.1"
Enables access to the SolarEdge equipment API (solar panels, inverters, meters) with the nice typed Rust interface.
The library requires an HTTP client but is client-agnostic. You can use any client that implements
HttpClientAdapter
trait.
Check http-adapter-reqwest for an implementation based
on reqwest.
Sample usage with http-adapter-reqwest:
use solaredge::{Client, SitesList, SortOrder, FilterSiteStatus};
use http_adapter_reqwest::ReqwestAdapter;
async fn run() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::<ReqwestAdapter>::new("API_KEY");
let version = client.version_current().await?;
let mut p = SitesList::default();
p.size = Some(32);
p.sort_order = Some(SortOrder::Ascending);
p.status = Some(&[FilterSiteStatus::Active, FilterSiteStatus::Pending]);
let sites = client.sites_list(&p).await?;
Ok(())
}
LGPL-3.0