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

451 lines
11 KiB
Markdown

# System
<!-- BEGIN GENERATED: __api_System__ -->
## Méthodes
### System.CheckForUpdates
<span class="badge perm-admin">ADMIN</span>
Instruct the system to poll the server for updates. Normally the system should automatically do this in regular intervals, however, if the client wants to allow the user to manually check for new updates now, this can be called. Returns true if the operation has been started successfully and the update manager will become busy. In order to know whether there are updates available, clients should walk through the list of packages retrieved from GetPackages and check whether there are packages with the updateAvailable flag set to true.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.EnableRepository
<span class="badge perm-admin">ADMIN</span>
Enable or disable a repository.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `enabled` | `Bool` | |
| `repositoryId` | `String` | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.FactoryReset
<span class="badge perm-admin">ADMIN</span>
Reset nymea to factory defaults. Clients should warn the user before calling this method because all current configuration data will be lost, the server will restart immediately afterwards and it will come back up using the factory defaults if any are available.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.GetCapabilities
<span class="badge perm-admin">ADMIN</span>
Get the list of capabilites on this system. The property "powerManagement" indicates whether restarting nymea and rebooting or shutting down is supported on this system. The property "updateManagement" indicates whether system update features are available in this system. The "updateManagementType" indicates which kind of update is supported on this platform. The property "timeManagement" indicates whether the system time can be configured on this system. Note that GetTime will be available in any case.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `powerManagement` | `Bool` | |
| `timeManagement` | `Bool` | |
| `updateManagement` | `Bool` | |
| `updateManagementType` | [UpdateType](../types.md#updatetype) | |
---
### System.GetPackages
<span class="badge perm-admin">ADMIN</span>
Get the list of packages currently available to the system. This might include installed available but not installed packages. Installed packages will have the installedVersion set to a non-empty value.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `packages` | [Packages](../types.md#packages) | |
---
### System.GetRepositories
<span class="badge perm-admin">ADMIN</span>
Get the list of repositories currently available to the system.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `repositories` | [Repositories](../types.md#repositories) | |
---
### System.GetSystemInfo
<span class="badge perm-admin">ADMIN</span>
Returns information about the system nymea is running on.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `deviceSerialNumber` | `String` | |
---
### System.GetTime
<span class="badge perm-admin">ADMIN</span>
Get the system time and configuraton. The "time" and "timeZone" properties give the current server time and time zone. "automaticTimeAvailable" indicates whether this system supports automatically setting the clock (e.g. using NTP). "automaticTime" will be true if the system is configured to automatically update the clock.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `automaticTime` | `Bool` | |
| `automaticTimeAvailable` | `Bool` | |
| `time` | `Uint` | |
| `timeZone` | `String` | |
---
### System.GetTimeZones
<span class="badge perm-admin">ADMIN</span>
Returns the list of IANA specified time zone IDs which can be used to select a time zone. It is not required to use this method if the client toolkit already provides means to obtain a list of IANA time zone ids.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `timeZones` | `StringList` | |
---
### System.GetUpdateStatus
<span class="badge perm-admin">ADMIN</span>
Get the current status of the update system. "busy" indicates that the system is current busy with an operation regarding updates. This does not necessarily mean an actual update is running. When this is true, update related functions on the client should be marked as busy and no interaction with update components shall be allowed. An example for such a state is when the system queries the server if there are updates available, typically after a call to CheckForUpdates. "updateRunning" on the other hand indicates an actual update process is ongoing. The user should be informed about it, the system also might restart at any point while an update is running. The "updateProgress" property is optional, if the backend supports it, a progress >= 0 indicated the update progress in percentage.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `busy` | `Bool` | |
| `updateProgress` | `Int` | optionnel |
| `updateRunning` | `Bool` | |
---
### System.Reboot
<span class="badge perm-admin">ADMIN</span>
Initiate a reboot of the system. The return value will indicate whether the procedure has been initiated successfully.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.RemovePackages
<span class="badge perm-admin">ADMIN</span>
Starts removing a package. Returns true if the removal has been started successfully. Before calling this method, clients should check whether the package can be removed (canRemove set to true).
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `packageIds` | `String`[] | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.Restart
<span class="badge perm-admin">ADMIN</span>
Initiate a restart of the nymea service. The return value will indicate whether the procedure has been initiated successfully.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.RollbackPackages
<span class="badge perm-admin">ADMIN</span>
Starts a rollback. Returns true if the rollback has been started successfully. Before calling this method, clients should check whether the package can be rolled back (canRollback set to true).
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `packageIds` | `String`[] | |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.SetTime
<span class="badge perm-admin">ADMIN</span>
Set the system time configuraton. The system can be configured to update the time automatically by setting "automaticTime" to true. This will only work if the "timeManagement" capability is available on this system and "GetTime" indicates the availability of automatic time settings. If any of those requirements are not met, this method will return "false" in the "success" property. In order to manually configure the time, "automaticTime" should be set to false and "time" should be set. Note that if "automaticTime" is set to true and a manual "time" is still passed, the system will attempt to configure automatic time updates and only set the manual time if automatic mode fails. A time zone can always be passed optionally to change the system time zone and should be a IANA time zone id.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `automaticTime` | `Bool` | optionnel |
| `time` | `Uint` | optionnel |
| `timeZone` | `String` | optionnel |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.Shutdown
<span class="badge perm-admin">ADMIN</span>
Initiate a shutdown of the system. The return value will indicate whether the procedure has been initiated successfully.
**Paramètres :**
_Aucun paramètre._
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
### System.UpdatePackages
<span class="badge perm-admin">ADMIN</span>
Starts updating/installing packages with the given ids. Returns true if the upgrade has been started successfully. Note that it might still fail later. Before calling this method, clients should check the packages whether they are in a state where they can either be installed (no installedVersion set) or upgraded (updateAvailable set to true).
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `packageIds` | `String`[] | optionnel |
**Retour :**
| Champ | Type | Notes |
| --- | --- | --- |
| `success` | `Bool` | |
---
## Notifications
### System.CapabilitiesChanged
Emitted whenever the system capabilities change.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `powerManagement` | `Bool` | |
| `updateManagement` | `Bool` | |
| `updateManagementType` | [UpdateType](../types.md#updatetype) | |
---
### System.PackageAdded
Emitted whenever a package is added to the list of packages.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `package` | [Package](../types.md#package) | |
---
### System.PackageChanged
Emitted whenever a package in the list of packages changes.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `package` | [Package](../types.md#package) | |
---
### System.PackageRemoved
Emitted whenever a package is removed from the list of packages.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `packageId` | `String` | |
---
### System.RepositoryAdded
Emitted whenever a repository is added to the list of repositories.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `repository` | [Repository](../types.md#repository) | |
---
### System.RepositoryChanged
Emitted whenever a repository in the list of repositories changes.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `repository` | [Repository](../types.md#repository) | |
---
### System.RepositoryRemoved
Emitted whenever a repository is removed from the list of repositories.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `repositoryId` | `String` | |
---
### System.TimeConfigurationChanged
Emitted whenever the time configuration is changed
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `automaticTime` | `Bool` | |
| `automaticTimeAvailable` | `Bool` | |
| `time` | `Uint` | |
| `timeZone` | `String` | |
---
### System.UpdateStatusChanged
Emitted whenever the update status changes.
**Paramètres :**
| Champ | Type | Notes |
| --- | --- | --- |
| `busy` | `Bool` | |
| `updateProgress` | `Int` | optionnel |
| `updateRunning` | `Bool` | |
---
<!-- END GENERATED -->