Support desk: find a device and list favourites
One flow for a platform Super Admin or Administrator answering a support call. The caller gives one id; support finds the device across the whole fleet, opens it and its plant, and the device stays in their favourites.
All JSON below is illustrative: ids and values are made up. Every
request uses the console envelope (type, requestId) described in the
mobile guide.
:::warning Status (24 Nov 2026) Built, not deployed or committed: automatic favourites on an exact search match, and favourites lazy loading (15, then 10).
Not built: search by battery serial, and search by device key
(the UUID). search_devices matches only a logger id or an inverter
serial. A battery serial or a UUID typed into the search bar returns no
rows. Until battery search exists, ask the caller for the logger id or the
inverter serial.
:::
1. Ask the caller for one id
- The logger id (on the logger's label), or the inverter serial.
- Nothing else: no email, no plant id. Super Admin and Administrator see every org's devices.
2. Search: search_devices
q: 2–64 characters of letters, digits,-,_,.; case does not matter.limitdefaults to 20, max 50.- Rows are prefix matches; an exact match comes first.
- A row whose logger id or inverter serial equals
qexactly becomes a favourite and comes back with"favourite": true. A prefix never does.
{"type": "search_devices", "requestId": "s-1", "q": "AT5K2400123"}
{"type": "search_devices_result", "requestId": "s-1", "ok": true, "result": {
"devices": [{
"deviceKey": "3f2c8a9e-5b1d-4c7a-9e2f-1a2b3c4d5e6f",
"loggerId": "m2506a0012",
"inverterSn": "AT5K2400123",
"model": "Yorker",
"status": "active",
"snVerification": "verified",
"plantId": "01JPLANT00000000000000000A",
"plantName": "Model Town rooftop",
"plantOperatorOrgId": "ORG-0001",
"plantOperatorOrgName": "Crown Solar Lahore",
"ownerOrgId": "ORG-0001",
"displayName": null,
"registeredAt": "2026-09-02T08:14:00Z",
"lastSeenAt": "2026-11-24T06:58:12Z",
"online": true,
"favourite": true
}]
}}
plantIdisnullwhen the device is in no plant.plantNameand the operator fields are omitted then, or while the plant projection has not arrived.- At the 200-favourite cap the device is not added and
resultcarries"warnings": ["FAVOURITES_FULL"]. - No row: the id is wrong, or it is a battery serial or UUID (see Status).
3. Open the device: get_device_details
{"type": "get_device_details", "requestId": "d-1", "deviceKey": "3f2c8a9e-5b1d-4c7a-9e2f-1a2b3c4d5e6f"}
deviceTypeis optional:inverter(default) orbattery.- The reply has
loggerId,inverterSn,status,plantId,ownerOrgId,ownerUserId,model,firmware,connection,lastReadings,batteries,openAlertCountand more. Most are{"value": …, "reason": …}fields: showreasonwhenvalueisnull. Field list: device details. - This call does not add a favourite.
4. Load the plant and its owner (HTTP)
- When
plantIdis notnull, callGET /v1/plants/{plantId}on the HTTP server: plant detail. - The TCP server does not return the owner's name or contact; it returns
only
ownerOrgIdandownerUserId.
5. List favourites: list_favourites
- Newest favourite first. Each row has the device-list row shape (as
get_inventory, withoutplantName) with"favourite": true. - First load: no
cursor→ 15 rows. - Next loads:
cursor= the lastnextCursor→ 10 rows each. - Stop when
nextCursorisnull. - Pull to refresh: drop the cursor and start again with no
cursor.
{"type": "list_favourites", "requestId": "f-1"}
{"type": "list_favourites_result", "requestId": "f-1", "ok": true, "result": {
"devices": [{"deviceKey": "3f2c8a9e-5b1d-4c7a-9e2f-1a2b3c4d5e6f", "loggerId": "m2506a0012",
"inverterSn": "AT5K2400123", "plantId": "01JPLANT00000000000000000A",
"online": true, "favourite": true, "...": "..."}],
"nextCursor": "eyJ0IjoiMjAyNi0xMS0yNFQwNjo1ODoxMloiLCJpZCI6IjNmMmMuLi4ifQ"
}}
{"type": "list_favourites", "requestId": "f-2", "cursor": "eyJ0IjoiMjAyNi0xMS0yNFQwNjo1ODoxMloiLCJpZCI6IjNmMmMuLi4ifQ"}
- The cursor is opaque: pass it back unchanged.
- Remove a favourite:
{"type": "remove_favourite", "requestId": "r-1", "deviceKey": "3f2c8a9e-5b1d-4c7a-9e2f-1a2b3c4d5e6f"}
{"type": "remove_favourite_result", "requestId": "r-1", "ok": true,
"result": {"deviceKey": "3f2c8a9e-5b1d-4c7a-9e2f-1a2b3c4d5e6f", "changed": true}}
changed: falsemeans it was not a favourite. Searching the same serial again adds it back.
More detail: mobile guide, Task 5 and favourites.