Patrick Schurig b26274595c
Some checks failed
Build & Deploy docs / build-deploy (push) Failing after 10m17s
feat: référence API JsonRPC générée depuis introspect.json
- Nouveau générateur scripts/gen_api_reference.py : 19 namespaces →
  docs/api/metier/ (10) + docs/api/systeme/ (9) + notifications.md +
  types.md (96 types · 55 enums · 4 flags) + SUMMARY.md literate-nav
- Badges permissionScope (perm-none/control/configure/admin) dans extra.css
- Guide docs/integrations/jsonrpc-api.md (connexion TCP/WS, auth, conventions énergie)
- mkdocs.yml : Référence API dans la nav, REST→JsonRPC renommé
- mkdocs build --strict : 0 warnings · --check idempotent

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 08:15:37 +02:00

176 lines
4.5 KiB
Markdown

# Energy
<!-- BEGIN GENERATED: __api_Energy__ -->
## Méthodes
### Energy.GetPowerBalance
<span class="badge perm-none">PUBLIC</span>
Get the current power balance. That is, production, consumption and acquisition.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `currentPowerAcquisition` | `Double` | |
| `currentPowerConsumption` | `Double` | |
| `currentPowerProduction` | `Double` | |
| `currentPowerStorage` | `Double` | |
| `totalAcquisition` | `Double` | |
| `totalConsumption` | `Double` | |
| `totalProduction` | `Double` | |
| `totalReturn` | `Double` | |
---
### Energy.GetPowerBalanceLogs
<span class="badge perm-none">PUBLIC</span>
Get logs for the power balance. If from is not give, the log will start at the beginning of recording. If to is not given, the logs will and at the last sample for this sample rate before now.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `from` | `Uint` | optionnel |
| `to` | `Uint` | optionnel |
| `sampleRate` | [SampleRate](../types.md#samplerate) | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `powerBalanceLogEntries` | [PowerBalanceLogEntries](../types.md#powerbalancelogentries) | |
---
### Energy.GetRootMeter
<span class="badge perm-none">PUBLIC</span>
Get the root meter ID. If there is no root meter set, the params will be empty.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `rootMeterThingId` | `Uuid` | optionnel |
---
### Energy.GetThingPowerLogs
<span class="badge perm-none">PUBLIC</span>
Get logs for one or more things power values. If thingIds is not given, logs for all energy related things will be returned. If from is not given, the log will start at the beginning of recording. If to is not given, the logs will and at the last sample for this sample rate before now. If the parameter "includeCurrent" is set to true, the result will contain the newest log entries available, regardless of the sample rate (that is, 1 minute). This may be useful to calculate the difference to the newest entry of the fetched sample rate and the current values to display the live value until the current sample is completed.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `from` | `Uint` | optionnel |
| `includeCurrent` | `Bool` | optionnel |
| `thingIds` | `Uuid`[] | optionnel |
| `to` | `Uint` | optionnel |
| `sampleRate` | [SampleRate](../types.md#samplerate) | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `currentEntries` | [ThingPowerLogEntries](../types.md#thingpowerlogentries) | optionnel |
| `thingPowerLogEntries` | [ThingPowerLogEntries](../types.md#thingpowerlogentries) | |
---
### Energy.SetRootMeter
<span class="badge perm-admin">ADMIN</span>
Set the root meter.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `rootMeterThingId` | `Uuid` | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `energyError` | [EnergyError](../types.md#energyerror) | |
---
## Notifications
### Energy.PowerBalanceChanged
Emitted whenever the energy balance changes. That is, when the current consumption, production or acquisition changes. Typically they will all change at the same time.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `currentPowerAcquisition` | `Double` | |
| `currentPowerConsumption` | `Double` | |
| `currentPowerProduction` | `Double` | |
| `currentPowerStorage` | `Double` | |
| `totalAcquisition` | `Double` | |
| `totalConsumption` | `Double` | |
| `totalProduction` | `Double` | |
| `totalReturn` | `Double` | |
---
### Energy.PowerBalanceLogEntryAdded
Emitted whenever an entry is added to the power balance log.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `powerBalanceLogEntry` | [PowerBalanceLogEntry](../types.md#powerbalancelogentry) | |
| `sampleRate` | [SampleRate](../types.md#samplerate) | |
---
### Energy.RootMeterChanged
Emitted whenever the root meter id changes. If the root meter has been unset, the params will be empty.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `rootMeterThingId` | `Uuid` | optionnel |
---
### Energy.ThingPowerLogEntryAdded
Emitted whenever an entry is added to the thing power log.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `sampleRate` | [SampleRate](../types.md#samplerate) | |
| `thingPowerLogEntry` | [ThingPowerLogEntry](../types.md#thingpowerlogentry) | |
---
<!-- END GENERATED -->