Skip to main content

Device registration

Scan the logger's QR code and send it as loggerId. That is all — the reply hands back the new device's deviceKey, the id every later request about it names:

{"type": "register",
"loggerId": "i30000252761006466",
"userId": "17833b2e-a851-4a17-a764-62524d667959",
"plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0"}

plantId is the HTTP Server's plant the device is being added to — the plantId of the plant the user has selected. It is required: a missing or malformed one (it must be at most 64 characters of letters, digits, -, _ or ., which a ULID always is; all is refused) fails with INVALID_REGISTRATION. It is stored uppercase, the way the HTTP Server writes its ULIDs, and returned by get_devices. A logger is one device at a time: registering a logger that is still on one of your devices, with a different plantId, is refused with DEVICE_IN_ANOTHER_PLANT (the existing device is left where it is, and the reply names its plant), whether or not it has connected yet. Once the logger has been plugged into a different inverter, registering it is allowed in any of your plants — see Reusing a logger on your own devices.

:::caution Devices registered before plantId existed Those devices have no plant until an operator assigns one. Until then no single-plant get_devices lists them (plantId: "all" does, with no plantId on the device) and delete_device refuses them. Don't re-register them from the app to work around this: a successful register closes the device's live connection so it reconnects, and moves a device that isn't currently active back to pending_connection. :::

The TCP server does not check that the user is a member of that plant — plant membership lives only in the HTTP Server's database. userId is still the only ownership gate here.

:::tip You do not need the inverter's serial inverterSn is optional. The server reads the inverter's serial from the hardware itself on the device's first connection, over Modbus, and records the logger↔inverter pairing then — so nobody has to find and scan a second label on the inverter.

Send inverterSn only if you already happen to know it; it is then validated and stored, and the device's first connection is checked against it rather than trusted.

Omitting it does not cost you the "this inverter already has a logger" check, as long as the device is on the wire: the server remembers what a logger reported on any connection it could not serve, and registration checks that too. :::

loggerId is required. deviceKey is not accepted in its place: it is the device's id, which a client only learns from this reply (it used to be the logger ID, and was accepted here as a synonym for loggerId).

What happens​

  1. The logger is checked. If it belongs to another account, the request is rejected with NOT_AUTHORIZED and nothing is overwritten. If it is one of your devices' loggers and has since been plugged into a different inverter, it is reused (see below).

  2. The inverter is checked. If it is already another account's device, the request is rejected with NOT_AUTHORIZED and no row is created. If it is already your device, the logger is fitted to that device instead of creating a new one (see below).

    The server knows which inverter you are adding a logger to from either of two places: the inverterSn you supplied, or — when you supplied none, which is the normal case — the serial that logger reported the last time it connected without being served. A dongle that is powered and dialling in while the installer scans it has already told the server what it is plugged into, so this is decided here, at the moment you ask.

    A logger that has never connected is the one case this cannot answer: the server has no way to know which inverter it is on. That registration is accepted as a claim, and the inverter is checked on the device's first connection instead (step 4).

  3. Otherwise the claim is created, in one transaction guarded by database unique indexes, and the device row becomes pending_connection — "claimed by this user, not yet seen on the wire". Render that as waiting for device. It waits indefinitely; there is no expiry.

  4. When the physical device connects, tcpserver asks it for its own part number (AT+DTUPN?) and reads the inverter's serial over Modbus, matches them to this claim, records the pairing, and the row becomes active. You do not register again.

    If the device is already connected when you register it, it does not have to wait for a reconnect. ws-gateway tells that live session its registration changed; the session closes and the DTU reconnects within seconds, fully resolved. Expect the device to go briefly offline and come back — that is this working, not a fault.

    Only a session that is still unregistered acts on that signal. Re-sending a registration for a device that is already active does not disturb its connection, so the idempotent retry described below stays free. Identity is only ever resolved at connect, so reconnecting is how the new state is picked up; see Session-control commands.

    Until that happens the device is not polled at all: an unregistered connection is held open with heartbeats only, because its readings carry an unstable IP:port key that nothing can store and no client can subscribe to. So a device you have not registered yet will show no telemetry, by design — not a slow first reading.

    If this new claim's first connection reports an inverter that is already your device in the same plant, the logger is fitted to that device and the empty claim is removed: the device keeps its deviceKey and history, and the app sees it on its next get_devices (the claim's deviceKey stops existing).

    Otherwise, if that logger turns out to be plugged into a different inverter than the one it is bound to, or into one that already belongs to another logger, the connection is refused and the device is not served — see Server behavior's connect flow. That is what stops a logger being moved between customers' hardware.

    A refusal is not silent to the app for long: the refused connection records what it reported, and registering that logger again is decided from it. For another account's inverter that is an immediate NOT_AUTHORIZED rather than another claim that can never be served; for your own devices it is the reuse described below. A refused connection also hears that registration and reconnects within seconds, as an unregistered one does.

Re-sending the same loggerId (+ inverterSn, if you sent one) into the same plantId succeeds again and returns the same deviceKey — it is idempotent on purpose, so retrying a request whose response you never saw is safe.

// success: deviceKey is the new device's id, loggerId echoes the label scanned
{"type": "register_result", "deviceKey": "3f2504e0-4f89-41d3-9a0c-0305e82c3301",
"loggerId": "i20000282445530580", "plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0", "ok": true}

// rejected: no deviceKey, because no device was created
{"type": "register_result", "loggerId": "i20000282445530580", "ok": false,
"code": "NOT_AUTHORIZED",
"error": "sorry, this device is not authorized for your account"}

// rejected: it is already your device in another plant, and the reply says which
{"type": "register_result", "loggerId": "i20000282445530580",
"plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0", "ok": false,
"code": "DEVICE_IN_ANOTHER_PLANT",
"error": "this inverter is already your device in another plant; add the logger from that plant",
"existingPlantId": "01JZYXWVTSRQPNMKJHGFEDCBA9",
"existingDeviceKey": "3f2504e0-4f89-41d3-9a0c-0305e82c3301"}

A plant that already has an inverter​

A plant holds one inverter, unless its inverters are wired in parallel (owner decision 2026-11-23). register takes an optional boolean parallel (default false) for that:

{"type": "register", "loggerId": "i30000252761006466",
"userId": "17833b2e-a851-4a17-a764-62524d667959",
"plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0", "parallel": true}

The server checks, in this order:

  1. The plant has no inverter — any inverter is admitted.
  2. parallel is not true — refused with PARALLEL_CONFIRMATION_REQUIRED. Ask the user "Is this inverter wired in parallel with the one in this plant, or is it a separate plant?" Resend with "parallel": true only for "parallel"; for "separate", add it to another (new) plant.
  3. Either inverter is not a Nexus — refused with PARALLEL_NOT_SUPPORTED. Only Nexus (Aotai) inverters can be paralleled in a plant. A Yorker (or any other model) plant holds exactly one inverter, and a Yorker never joins a plant that has one.
  4. Either inverter's exact model is not known yet — refused with PARALLEL_SPEC_UNKNOWN. That is a logger that has never connected, or a plant inverter that has never been polled.
  5. The models differ — refused with PARALLEL_SPEC_MISMATCH. Parallel units must be identical: the same Nexus model code (register 32 model_code, which fixes family, kW, phase and PV input, e.g. 18005 = AEP-6KS48) and the same rated kW where both are known. A 6 kW Nexus and an 8 kW Nexus are refused.

The plant's inverters are its live devices, whoever owns them. A device that is already in the plant (a retry, or a re-registration) is always admitted. Plants that already broke these rules before they existed are left as they are; only additions are checked.

Ownership and conflicts are reported first. NOT_AUTHORIZED, DEVICE_IN_ANOTHER_PLANT, LOGGER_ALREADY_BOUND, DEVICE_ALREADY_REGISTERED, PLANT_NOT_BINDABLE and the rest come before any PARALLEL_* code, so the user is never asked "parallel?" about a device they could not add anyway.

A PARALLEL_* refusal carries what the server knows of the inverter being added (inverter) and of the plant's inverters it was checked against (plantInverters), so the app can say why. Each object has optional model, modelCode and ratedPowerKw; a field is absent when not known. No deviceKey is ever included — the plant's inverters may be another account's.

{"type": "register_result", "loggerId": "i30000252761006466",
"plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0", "ok": false,
"code": "PARALLEL_SPEC_MISMATCH",
"error": "parallel inverters must be exactly the same model (same family, power rating, phase and PV input); this inverter is Nexus 8 kW (model code …), the plant's is Nexus 6 kW (model code 18005)",
"inverter": {"model": "Nexus", "modelCode": 18008, "ratedPowerKw": 8},
"plantInverters": [{"model": "Nexus", "modelCode": 18005, "ratedPowerKw": 6}]}

(The modelCode values above other than 18005 are illustrative.)

:::caution Let a new logger connect before adding it to a plant that has an inverter The server only learns which inverter a logger is on, and that inverter's model code, when the logger connects. tcpserver reads the model code once on such an unregistered connection and keeps it with the logger's sighting. So registering a logger that has never connected into a plant that already has an inverter is refused — PARALLEL_CONFIRMATION_REQUIRED, or PARALLEL_SPEC_UNKNOWN with parallel: true. Power the inverter with the logger plugged in, wait until it has connected, then scan again.

Registering into an empty plant is unaffected: a never-connected logger is accepted as a claim, as before. A new logger fitted to an inverter that is already in this plant is admitted once it has connected (its sighting shows it is on that inverter, so nothing is added). The logger swap through update_device is unaffected. :::

Batteries come after registration. Once register_result is ok, ask the user whether to add battery details, and add each battery with add_device_battery using the returned deviceKey. A battery is never entered with the plant, and never waits at a plant (2026-11-20).

For older apps, register still takes an optional battery object, the same one add_device_battery takes. On success the reply carries the stored battery. A retried registration does not add a second one: the battery is added only while the device has none, and a retry reports the battery the device already has. If the battery cannot be stored (for example its serialNumber is already used by another battery), the registration still succeeds and the reply carries batteryError. Offer add_device_battery then.

{"type": "register", "loggerId": "i20000282445530580",
"userId": "17833b2e-a851-4a17-a764-62524d667959", "plantId": "01JABCDEFGHJKMNPQRSTVWXYZ0",
"battery": {"brand": "ELEKTRA_BOOST", "capacityKwh": 5.12}}

A logger that was replaced on its device is free hardware. After a logger swap completes, the old logger belongs to nothing, and registering it creates a new device with its own deviceKey and none of the old device's history.

Reusing a logger on your own devices​

A device is an inverter; a logger is reusable hardware. Between your own devices, the server decides what a register means from where the logger reports being plugged in. It reads the serial the logger sent on its last connection that could not be served, if that is newer than its device's last served connection. Nothing extra goes in the request.

The logger is…It reports…Result
On your device ANothing newer (still on A's inverter)It is A: A's deviceKey again, as any retry.
On your device AA new inverterA new device with this logger, in the plantId you sent. A is deactivated.
On your device AAn inverter that is your device DThe logger is fitted to D, which keeps its deviceKey and history and is returned. A is deactivated.
On no deviceAn inverter that is your device DThe logger is fitted to D (D's old logger is freed). D's deviceKey is returned.

Deactivated means the device stays in your list with all of its history — readings, energy, totals, alerts, Activity Trail — but has no logger (loggerId: "", status: "deactivated" in get_devices). Its inverter may still be running; with no logger, nothing from it reaches the server. Its open alerts are closed, and an Activity Trail entry in its plant records that the logger moved. Its inverter stays its own: no other device can claim that serial. Fitting it a logger again — registering a logger plugged into that inverter, or update_device — brings it back, with its history continuing.

A device that never connected (no serial, no history) is not deactivated when its logger moves on; it is removed.

Fitting a logger to an existing device is the same as a completed logger swap: the device shows pending_connection until the logger reports in (seconds, if it is connected), and an Activity Trail entry records "Logger replaced".

Plugging a logger back needs no scan. If you moved a logger from device A to a new inverter (so A was deactivated) and later plug it back into A's inverter, it is A's logger again as soon as it connects: A comes back active in its own plant with its history continuing, and the device the logger left is deactivated in its plant, with its own history. This only happens between your own devices, and only onto a device that has no logger.

Plug the logger in first, then scan it. Until the logger has reported the new inverter, the server can only see it on its old one, and registering it is that old device again. Moving it and scanning again is enough; nothing has to be undone.

Two limits:

  • Fitting a logger never moves a device between plants. If the inverter is your device in another plant, the request is refused with DEVICE_IN_ANOTHER_PLANT, naming that plant in existingPlantId; add the logger from that plant, or move the device with update_device first.
  • Another account's logger or inverter is refused with NOT_AUTHORIZED, with the exceptions below.

Devices an administrator changed​

A device an administrator transferred, unbound from its plant, or took the logger off can be added again from the app. "Your device" in the rules above then means a device you own or may add:

  • you hold devices MANAGE on it through your ticket's grants;
  • you administer the Business it belongs to (Owner, Admin or Super Admin);
  • it has no user owner (a transfer that named nobody) and belongs to the Business your ticket was issued for: the operator of its plant, or, when it is in no plant, the Business that holds it.

The third rule is what lets a customer add a device that was transferred to them. A device that already has a user owner is never taken by another member this way. Without a ticket, only ownership counts.

What happens:

The device is…Registering its logger…
In your plant, no user ownerReturns that device; you become its owner.
In no plant (unbound from its plant)Returns that device, which joins the plantId you sent (info alert device.MOVED_IN). If the device belongs to a Business and plantId is not one of that Business's plants (or the server has no record of the plant yet), it is refused with NOT_AUTHORIZED instead: a device moves between Businesses only by a transfer. A device of no Business may join any plant.
Deactivated (logger unbound), plugged into its own inverterFits the logger back: same deviceKey, history kept, joins your plant if it was in none.
Deactivated, but another account'sThe inverter is released to you if the logger reports it (it is plugged in and has dialled in at least once since the unbind, or does so after you register). You get a new device with no history; the old one keeps its history out of your reach. A typed inverterSn alone releases nothing.
Free device (no plant, org or owner: its plant was deleted, or it was removed from its plant)Accepted for any user or Business; the existing device is re-added, history and serial kept.
Unassigned stock of another BusinessRefused with LOGGER_ALREADY_BOUND ("held as unassigned stock"). An administrator of that Business assigns it.

Which Business owns a new device. A device registered for the first time into a plant belongs to the Business that operates that plant, whoever registers it. An installer registering into a customer's plant leaves the device that customer's Business's. If the server has no record of the plant yet, the device takes the org your ticket was issued for. Registering an existing device again never changes its Business.

Registering before the logger reconnects is fine: the registration is recorded as "waiting for device", and when the logger connects and reports its inverter, the server applies the same rules (fitting it to your existing device, or releasing another account's idle inverter to it).

register_result codes​

Branch on code, never on error — the message text is free to change. Every failure leaves the device's prior state completely untouched.

codeMeaningWhat to do
(absent, ok: true)Binding created. The row is pending_connection. deviceKey is the device's id.Store deviceKey; wait for telemetry or presence to confirm the device connected.
INVALID_REGISTRATIONA field is missing, empty, over 64 characters, or contains characters no label carries. Identifiers are trimmed and case-converted (see above), but nothing else about them is changed.Fix the request. The error names which field.
NOT_AUTHORIZEDThe logger, or the inverter it is plugged into (or the inverterSn sent), belongs to another account — including one that registered the same new logger a moment earlier. Nothing about that account or its device is returned. Also: the logger's device is in no plant and belongs to a Business that does not operate plantId (the error says "this device belongs to another Business and cannot be added to this plant").Show "Sorry, this device is not authorized for your account." Offer no next step: the user cannot reach that device. For the other-Business case, a platform administrator can transfer the device.
DEVICE_IN_ANOTHER_PLANTThe logger, or the inverter it is plugged into (or the inverterSn sent), is already your device in a different plant from the plantId sent. Nothing was moved. The reply adds existingPlantId (that plant) and existingDeviceKey (that device).Look the plant's name up from the user's plants (the HTTP Server owns plant names) and offer to open it: adding the logger from that plant fits it to the device and keeps its history. Or move the device there first with update_device.
LOGGER_ALREADY_BOUNDYou sent an inverterSn different from the one this logger is bound to; or another device is waiting for this logger as its new logger (a pending swap); or the logger is on a device with no owner that you may not add (another Business's, or unassigned stock held by one: "held as unassigned stock"). The error text says which.Check the logger label was scanned correctly. To use it on a new inverter, plug it in there and scan again.
DEVICE_REVOKEDAn operator has taken this device out of service. Registration cannot lift that — not for its former owner either.Contact support: an operator restores it, or deletes it so the hardware can be registered as a new device.
DEVICE_ALREADY_REGISTEREDYou typed an inverterSn that is already another of your devices in this plant and that device still has a logger (only the hardware's reading can take a logger off a device); or you typed the serial of another account's device whose logger was removed (a typed serial releases nothing); or a concurrent registration claimed the inverter first. No row was created.Let the logger report its inverter: plug it in, power it, and scan again without a serial.
PLANT_FULLThe plant already has the most inverters a plant may have (GROUP_MAX_INVERTERS, default 50 — see Parallel inverters). Re-registering a logger already in the plant is never refused this way.Tell the user the plant is full; add the device to another plant.
PLANT_NOT_BINDABLEThe plant is archived (or being deleted) on the HTTP Server and takes no new devices. A device already in that plant re-registering is not refused.Tell the user the plant is archived; restore it on the HTTP Server, or add the device to another plant.
PARALLEL_CONFIRMATION_REQUIREDThe plant already has an inverter and the request did not send parallel: true. Comes with inverter and plantInverters. See A plant that already has an inverter.Ask "parallel, or a separate plant?". Resend with parallel: true only for parallel; otherwise add it to another plant.
PARALLEL_NOT_SUPPORTEDparallel: true, but this inverter or one in the plant is not a Nexus. Only Nexus inverters can share a plant.Add the inverter to a separate plant.
PARALLEL_SPEC_UNKNOWNparallel: true, but this inverter's or a plant inverter's model or model code is not known yet — typically a logger that has never connected.Power the inverter with the logger plugged in, wait until it has connected (or until the plant's inverter has reported), then retry.
PARALLEL_SPEC_MISMATCHparallel: true, but the model codes or rated kW differ. Parallel units must be identical.Tell the user parallel inverters must be the same model; add this one to a separate plant.
REGISTRATION_FAILEDThe gateway has no working database, or an unexpected database error.Infrastructure problem; retry, then report.

There is no longer a "one device at a time per site" restriction, no 5-minute expiry, and no "another device is already pending registration from this network address" error. Those were all consequences of keying registration on a network address; a registration now waits indefinitely for its device and several can be in flight from one site at once.

Confirming it attached. ok: true only means the binding was recorded. To confirm the device actually connected, watch the deviceKey from the reply and wait for telemetry or presence — either only ever arrives for a device that resolved to that key, so its arrival is the confirmation.