powersync-docs/docs/api/metier/integrations.md
Patrick Schurig 325409dd3f feat(i18n): prose traduite DE/EN et référence régénérée en anglais
82 pages .de.md et 82 .en.md. La volumétrie explique la forme : 95 % du volume
est GÉNÉRÉ (74 013 mots contre 3 506 rédigés, mesuré sur 107 pages). On ne
traduisait donc pas 77 500 mots — on traduit la prose, et le vocabulaire des
générateurs fait le reste.

Prose traduite à la main : accueil, installation (4), fonctionnalités (4),
tarifs, référence, dépannage, FAQ, intégrations (2), api/index, et les 6 fiches
appareils qui portent une vraie prose + compatibilite.md. Les blocs générés ne
sont JAMAIS recopiés dans une traduction : le script de pose les reprend
verbatim du fichier français via des placeholders, pour qu'une traduction ne
puisse pas désynchroniser un bloc généré.

Les 49 fiches légères n'ont rien à traduire : leur tagline vient d'amont et est
DÉJÀ en anglais (« Connects nymea to powerfox. »). Constat, pas renoncement.

Localisation ≠ traduction, et tarifs.md en est l'exemple à connaître : la
version FR parle de Tempo et du signal RTE, la DE de §14a EnWG et de SMARD,
l'EN des deux. Ce ne sont pas des traductions l'une de l'autre, et c'est
volontaire — les signaux tarifaires sont nationaux. Aucune des deux n'est
annoncée comme livrée : les deux sont Roadmap, et les pages le disent.

Référence régénérée : en-têtes et libellés en anglais (Field/Type/Notes,
Supported models, Settings, Read-only, Brand / Model…). Conséquence assumée et
signalée : les pages FR en ligne changent aussi.

README.md (il était VIDE) : la règle du 95 % généré en tête, la frontière de
décision du multi-langue avec sa mesure, pourquoi SCAFFOLD existe, et le piège
--strict/navigation.instant.

TODO : multi-langue clos, et trois points ouverts qui en restent — les tagline
vivent dans les meta.json de 5 autres dépôts (forme à ajouter : tagline_de /
tagline_en), les stubs traduits restent des stubs (la dette éditoriale a triplé
en surface, pas en fond), api/types.md n'a pas besoin de variante. Le P1
openmeteo est corrigé sur constat : il EST dans PORTING_STATUS depuis, et une
ligne commentée contradictoire y traîne encore.

Vérifié : mkdocs build --strict vert sur les trois langues, 322 pages HTML,
contenu traduit relu dans le HTML produit, et les deux générateurs rendent
« Doc à jour » en --check.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-10-13 06:39:20 +02:00

20 KiB

Integrations

Methods

Integrations.AddThing

CONFIGURE

Add a new thing to the system. Only things with a setupMethod of SetupMethodJustAdd can be added this way. For things with a setupMethod different than SetupMethodJustAdd, use PairThing. Things with CreateMethodJustAdd require all parameters to be supplied here. Things with CreateMethodDiscovery require the use of a thingDescriptorId. For discovered things, params are not required and will be taken from the ThingDescriptor, however, they may be overridden by supplying thingParams.

Parameters:

Field Type Notes
name String
thingClassId Uuid optional
thingDescriptorId Uuid optional
thingParams ParamList optional

Returns:

Field Type Notes
displayMessage String optional
thingId Uuid optional
thingError ThingError

Integrations.BrowseThing

PUBLIC

Browse a thing. If a ThingClass indicates a thing is browsable, this method will return the BrowserItems. If no parameter besides the thingId is used, the root node of this thingwill be returned. Any returned item which is browsable can be passed as node. Results will be children of the given node. In case of an error during browsing, the error will be indicated and the displayMessage may contain additional information for the user. The displayMessage will be translated. A client UI showing this message to the user should be prepared for empty, but also longer strings.

Parameters:

Field Type Notes
itemId String optional
thingId Uuid

Returns:

Field Type Notes
displayMessage String optional
items BrowserItem[] optional
thingError ThingError

Integrations.ConfirmPairing

CONFIGURE

Confirm an ongoing pairing. For SetupMethodUserAndPassword, provide the username in the "username" field and the password in the "secret" field. For SetupMethodEnterPin and provide the PIN in the "secret" field. In case of SetupMethodOAuth, the previously opened web view will eventually be redirected to http://128.0.0.1:8888 and the OAuth code as query parameters to this url. Provide the entire unmodified URL in the secret field.

Parameters:

Field Type Notes
secret String optional
username String optional
pairingTransactionId Uuid

Returns:

Field Type Notes
displayMessage String optional
thingId Uuid optional
thingError ThingError

Integrations.ConnectIO

CONFIGURE

Connect two generic IO states. Input and output need to be compatible, that is, either a digital input and a digital output, or an analog input and an analog output. If successful, the connectionId will be returned.

Parameters:

Field Type Notes
inputStateTypeId Uuid
inputThingId Uuid
inverted Bool optional
outputStateTypeId Uuid
outputThingId Uuid

Returns:

Field Type Notes
ioConnectionId Uuid optional
thingError ThingError

Integrations.DisconnectIO

CONFIGURE

Disconnect an existing IO connection.

Parameters:

Field Type Notes
ioConnectionId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.DiscoverThings

CONFIGURE

Performs a thing discovery for things of the given thingClassId and returns the results. This function may take a while to return. Note that this method will include all the found things, that is, including things that may already have been added. Those things will have thingId set to the id of the already added thing. Such results may be used to reconfigure existing things and might be filtered in cases where only unknown things are of interest.

Parameters:

Field Type Notes
discoveryParams ParamList optional
thingClassId Uuid

Returns:

Field Type Notes
displayMessage String optional
thingDescriptors ThingDescriptors optional
thingError ThingError

Integrations.EditThing

CONFIGURE

Edit the name of a thing.

Parameters:

Field Type Notes
name String
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.ExecuteAction

CONTROL

Execute a single action.

Parameters:

Field Type Notes
actionTypeId Uuid
params ParamList optional
thingId Uuid

Returns:

Field Type Notes
displayMessage String optional
thingError ThingError

Integrations.ExecuteBrowserItem

CONTROL

Execute the item identified by itemId on the given thing. In case of an error during execution, the error will be indicated and the displayMessage may contain additional information for the user. The displayMessage will be translated. A client UI showing this message to the user should be prepared for empty, but also longer strings.

Parameters:

Field Type Notes
itemId String
thingId Uuid

Returns:

Field Type Notes
displayMessage String optional
thingError ThingError

Integrations.ExecuteBrowserItemAction

CONTROL

Execute the action for the browser item identified by actionTypeId and the itemId on the given thing. In case of an error during execution, the error will be indicated and the displayMessage may contain additional information for the user. The displayMessage will be translated. A client UI showing this message to the user should be prepared for empty, but also longer strings.

Parameters:

Field Type Notes
actionTypeId Uuid
itemId String
params ParamList optional
thingId Uuid

Returns:

Field Type Notes
displayMessage String optional
thingError ThingError

Integrations.GetActionTypes

PUBLIC

Get action types for a specified thingClassId.

Parameters:

Field Type Notes
thingClassId Uuid

Returns:

Field Type Notes
actionTypes ActionTypes

Integrations.GetBrowserItem

PUBLIC

Get a single item from the browser. This won't give any more info on an item than a regular BrowseThing call, but it allows to fetch details of an item if only the ID is known. In case of an error during browsing, the error will be indicated and the displayMessage may contain additional information for the user. The displayMessage will be translated. A client UI showing this message to the user should be prepared for empty, but also longer strings.

Parameters:

Field Type Notes
itemId String optional
thingId Uuid

Returns:

Field Type Notes
displayMessage String optional
item BrowserItem optional
thingError ThingError

Integrations.GetEventTypes

PUBLIC

Get event types for a specified thingClassId.

Parameters:

Field Type Notes
thingClassId Uuid

Returns:

Field Type Notes
eventTypes EventTypes

Integrations.GetIOConnections

PUBLIC

Fetch IO connections. Optionally filtered by thingId and stateTypeId.

Parameters:

Field Type Notes
thingId Uuid optional

Returns:

Field Type Notes
ioConnections IOConnections optional
thingError ThingError

Integrations.GetPluginConfiguration

CONFIGURE

Get a plugin's params.

Parameters:

Field Type Notes
pluginId Uuid

Returns:

Field Type Notes
configuration ParamList optional
thingError ThingError

Integrations.GetPlugins

PUBLIC

Returns a list of loaded plugins.

Parameters:

No parameters.

Returns:

Field Type Notes
plugins IntegrationPlugins

Integrations.GetStateTypes

PUBLIC

Get state types for a specified thingClassId.

Parameters:

Field Type Notes
thingClassId Uuid

Returns:

Field Type Notes
stateTypes StateTypes

Integrations.GetStateValue

PUBLIC

Get the value of the given thing and the given stateType

Parameters:

Field Type Notes
stateTypeId Uuid
thingId Uuid

Returns:

Field Type Notes
value Variant optional
thingError ThingError

Integrations.GetStateValues

PUBLIC

Get all the state values of the given thing.

Parameters:

Field Type Notes
thingId Uuid

Returns:

Field Type Notes
values States optional
thingError ThingError

Integrations.GetThingClasses

PUBLIC

Returns a list of supported thing classes, optionally filtered by vendorId or by a list of thing class ids.

Parameters:

Field Type Notes
thingClassIds Uuid[] optional
vendorId Uuid optional

Returns:

Field Type Notes
thingClasses ThingClasses optional
thingError ThingError

Integrations.GetThings

PUBLIC

Returns a list of configured things, optionally filtered by thingId.

Parameters:

Field Type Notes
thingId Uuid optional

Returns:

Field Type Notes
things Things optional
thingError ThingError

Integrations.GetVendors

PUBLIC

Returns a list of supported Vendors.

Parameters:

No parameters.

Returns:

Field Type Notes
vendors Vendors

Integrations.PairThing

CONFIGURE

Pair a new thing. Use this to set up or reconfigure things for ThingClasses with a setupMethod different than SetupMethodJustAdd. Depending on the CreateMethod and whether a new thing is set up or an existing one is reconfigured, different parameters are required: CreateMethodJustAdd takes the thingClassId and the parameters you want to have with that thing. If an existing thing should be reconfigured, the thingId of said thing should be given additionally. CreateMethodDiscovery requires the use of a thingDescriptorId, previously obtained with DiscoverThings. Optionally, parameters can be overridden with the give thingParams. ThingDescriptors containing a thingId will reconfigure an existing thing, descriptors without a thingId will add a new thing to the system. If success is true, the return values will contain a pairingTransactionId, a displayMessage and the setupMethod. Depending on the setupMethod, the application should present the use an appropriate login mask, that is, For SetupMethodDisplayPin the user should enter a pin that is displayed on the device or online service, for SetupMethodEnterPin the application should present the given PIN so the user can enter it on the device or online service. For SetupMethodPushButton, the displayMessage shall be presented to the user as informational hints to press a button on the device. For SetupMethodUserAndPassword a login mask for a user and password login should be presented to the user. In case of SetupMethodOAuth, an OAuth URL will be returned which shall be opened in a web view to allow the user logging in. Once the login procedure has completed, the application shall proceed with ConfirmPairing, providing the results of the pairing procedure.

Parameters:

Field Type Notes
name String optional
thingClassId Uuid optional
thingDescriptorId Uuid optional
thingId Uuid optional
thingParams ParamList optional

Returns:

Field Type Notes
displayMessage String optional
oAuthUrl String optional
pairingTransactionId Uuid optional
pin String optional
setupMethod SetupMethod optional
thingError ThingError

Integrations.ReconfigureThing

CONFIGURE

Reconfigure a thing. This comes down to removing and recreating a thing with new parameters but keeping its thing id the same (and with that keeping rules, tags etc). For things with create method CreateMethodDiscovery, a discovery (DiscoverThings) shall be performed first and this method is to be called with a thingDescriptorId of the re-discovered thing instead of the thingId directly. Thing parameters will be taken from the discovery, but can be overridden individually here by providing them in the thingParams parameter. Only writable parameters can be changed.

Parameters:

Field Type Notes
thingDescriptorId Uuid optional
thingId Uuid optional
thingParams ParamList optional

Returns:

Field Type Notes
displayMessage String optional
thingError ThingError

Integrations.RemoveThing

CONFIGURE

Remove a thing and all its childs from the system. RemovePolicy is deprecated and has no effect any more.

Parameters:

Field Type Notes
d:o:removePolicy String
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetActionLogging

CONFIGURE

Enable/disable logging for the given action type on the given thing.

Parameters:

Field Type Notes
actionTypeId Uuid
enabled Bool
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetEventLogging

CONFIGURE

Enable/disable logging for the given event type on the given thing.

Parameters:

Field Type Notes
enabled Bool
eventTypeId Uuid
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetPluginConfiguration

CONFIGURE

Set a plugin's params.

Parameters:

Field Type Notes
configuration ParamList
pluginId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetStateFilter

CONFIGURE

Set the filter for the given state on the given thing.

Parameters:

Field Type Notes
filter StateValueFilter
stateTypeId Uuid
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetStateLogging

CONFIGURE

Enable/disable logging for the given state type on the given thing.

Parameters:

Field Type Notes
enabled Bool
stateTypeId Uuid
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Integrations.SetThingSettings

CONFIGURE

Change the settings of a thing.

Parameters:

Field Type Notes
settings ParamList
thingId Uuid

Returns:

Field Type Notes
thingError ThingError

Notifications

Integrations.EventTriggered

Emitted whenever an Event is triggered.

Parameters:

Field Type Notes
event Event

Integrations.IOConnectionAdded

Emitted whenever an IO connection has been added.

Parameters:

Field Type Notes
ioConnection IOConnection

Integrations.IOConnectionRemoved

Emitted whenever an IO connection has been removed.

Parameters:

Field Type Notes
ioConnectionId Uuid

Integrations.PluginConfigurationChanged

Emitted whenever a plugin's configuration is changed.

Parameters:

Field Type Notes
configuration ParamList
pluginId Uuid

Integrations.StateChanged

Emitted whenever a state of a thing changes.

Parameters:

Field Type Notes
maxValue Variant
minValue Variant
possibleValues Variant[]
stateTypeId Uuid
thingId Uuid
value Variant

Integrations.ThingAdded

Emitted whenever a thing was added.

Parameters:

Field Type Notes
thing Thing

Integrations.ThingChanged

Emitted whenever the params or name of a thing are changed (by EditThing or ReconfigureThing).

Parameters:

Field Type Notes
thing Thing

Integrations.ThingRemoved

Emitted whenever a thing was removed.

Parameters:

Field Type Notes
thingId Uuid

Integrations.ThingSettingChanged

Emitted whenever the setting of a thing is changed.

Parameters:

Field Type Notes
paramTypeId Uuid
thingId Uuid
value Variant