Le badge PUBLIC de PermissionScopeNone devient AUTH : sur un transport authentifié, nymea exige un token valide pour toute méthode sauf JSONRPC.Hello, Authenticate et RequestPushButtonAuth (jsonrpcserverimplementation.cpp, tag 1.15.2). « Lecture publique, aucun token requis » était faux, en trois langues. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4.4 KiB
Energy
Methods
Energy.GetPowerBalance
AUTH
Get the current power balance. That is, production, consumption and acquisition.
Parameters:
No parameters.
Returns:
| Field | Type | Notes |
|---|---|---|
currentPowerAcquisition |
Double |
|
currentPowerConsumption |
Double |
|
currentPowerProduction |
Double |
|
currentPowerStorage |
Double |
|
totalAcquisition |
Double |
|
totalConsumption |
Double |
|
totalProduction |
Double |
|
totalReturn |
Double |
Energy.GetPowerBalanceLogs
AUTH
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.
Parameters:
| Field | Type | Notes |
|---|---|---|
from |
Uint |
optional |
to |
Uint |
optional |
sampleRate |
SampleRate |
Returns:
| Field | Type | Notes |
|---|---|---|
powerBalanceLogEntries |
PowerBalanceLogEntries |
Energy.GetRootMeter
AUTH
Get the root meter ID. If there is no root meter set, the params will be empty.
Parameters:
No parameters.
Returns:
| Field | Type | Notes |
|---|---|---|
rootMeterThingId |
Uuid |
optional |
Energy.GetThingPowerLogs
AUTH
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.
Parameters:
| Field | Type | Notes |
|---|---|---|
from |
Uint |
optional |
includeCurrent |
Bool |
optional |
thingIds |
Uuid[] |
optional |
to |
Uint |
optional |
sampleRate |
SampleRate |
Returns:
| Field | Type | Notes |
|---|---|---|
currentEntries |
ThingPowerLogEntries | optional |
thingPowerLogEntries |
ThingPowerLogEntries |
Energy.SetRootMeter
ADMIN
Set the root meter.
Parameters:
| Field | Type | Notes |
|---|---|---|
rootMeterThingId |
Uuid |
Returns:
| Field | Type | Notes |
|---|---|---|
energyError |
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.
Parameters:
| Field | 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.
Parameters:
| Field | Type | Notes |
|---|---|---|
powerBalanceLogEntry |
PowerBalanceLogEntry | |
sampleRate |
SampleRate |
Energy.RootMeterChanged
Emitted whenever the root meter id changes. If the root meter has been unset, the params will be empty.
Parameters:
| Field | Type | Notes |
|---|---|---|
rootMeterThingId |
Uuid |
optional |
Energy.ThingPowerLogEntryAdded
Emitted whenever an entry is added to the thing power log.
Parameters:
| Field | Type | Notes |
|---|---|---|
sampleRate |
SampleRate | |
thingPowerLogEntry |
ThingPowerLogEntry |