import ninja.codingsolutions.solaredgeapiclient.interfaces.SolarEdgeApiClient;
SolarEdgeClientFactory factory = SolarEdgeClientFactory
.builder()
.apiKey("YOUR_API_KEY")
.apiUrl("https://monitoringapi.solaredge.com")
.httpClient(HttpClient.newHttpClient())
.build();
SolarEdgeApiClient client = factory.buildClient();
CompletableFuture<OverviewResponse> future = client.getOverviewResponse(YOUR_SITE_NUMBER)
.toCompletableFuture();
future.thenAcceptAsync(resp -> {
System.out.println(String.format("Your solar panels are generating %s w/h of power",
resp.getOverview().getCurrentPower().getPower()));
});
future.join();
Command | Supported | Batch/Multi Site Support |
---|---|---|
Get Current Version | ✔️ | ❌ |
Get Supported Versions | ✔️ | ❌ |
Get Site Overview | ✔️ | ❌ |
Detailed Energy Query | ✔️ | ❌ |
Get Site List | ❌ | N/A |
Get Power Flow | ❌ | ❌ |
Get Environmental Impact | ✔️ | ❌ |