# Assets

# Assets

An asset is one piece of equipment your data is about: a DAQ board, a PLC, an
instrument. Use assets to see which unit a channel came from, and when.

## Where assets come from

A connector says whether its device is equipment. When it is, connecting
the device adds an asset on its own.

| The connector… | Asset |
|---|---|
| reads a hardware serial | one per serial — the same unit is recognised when it comes back |
| has no serial (a bus, a PLC on an address) | one per connection |
| reads files, or runs a simulator or engine | none |

You do not add assets by hand. Removing an input does not delete its asset; it
becomes **Detached** and keeps its history.

## The Assets screen

Open **Assets** in Phloem Computer. Search by name, model or serial. Filter by
**All**, **Connected**, **Detached** or **Needs review**.

| Column | Shows |
|---|---|
| **Unit** | the unit's name and the input that runs it |
| **Controls** | how many values you can set |
| **Readings** | how many values it reports |
| **Last sample** | how long ago it last sent data |
| **State** | see below |

| State | Means |
|---|---|
| **Connected** | an input in this project runs it now |
| **Detached** | nothing runs it now; read-only history |
| **Needs review** | a different unit appeared where this one was |
| **Not arriving** | it declares channels, but none is live |

Units are grouped by connector when there is more than one.

## A unit's page

Click a unit to open it.

| Section | Shows |
|---|---|
| **Surface** | its controls first, then its readings, with live values |
| **Identity** | manufacturer, model and serial, as the unit reported them |
| **History** | first seen, last bound, and its id |
| **Attached channels** | channels you attached to it, for example by an import |
| **Membership** | each channel that belonged to it, and from when to when |
| **Delete** | removes the asset for good |

Its badge says how it was identified: `serial-verified`, `confirmed by hand`
or `by connection`.

## When a channel belongs to a unit

A channel belongs to a unit for a window of time. The window opens when the
unit's input starts producing it, or when you attach it. It closes when the
input stops, the unit is swapped, or the connector is removed.

**Membership** lists these windows. A unit's history is read through them.
Swap the board behind an input, and the old board keeps its past and the new
one starts fresh.

In the console, open a device from **Fleets** and choose its **Assets** tab.
Each asset lists its open channels and how many past windows it has.

## Set a value

**Surface** lists each control the unit's connector declares, with its range
and unit.

- A number: type a value and press **Set**, or press Enter.
- On or off: use the switch.

A setpoint follows the same safety rules as a test run. It is refused while a
trip is latched or when the control is not declared, and the refusal shows as
a message. A **Detached** unit's controls are disabled.

## Import a file against an asset

From the command line, import a recording and attach its channels to an
existing asset:

```bash
phloem asset list
phloem import run-0412.mcap --asset "bench-daq-1"
```

`--asset` takes an id or an exact name and is required. An import never
creates an asset. Add `--driver` when more than one connector can read the
file.

> **Warning:** **Delete asset** cannot be undone. The id is retired, and the
> same unit seen again will not get it back. Recorded data is kept.

- [Name channels and units](https://phloem.ai/docs/inputs/channels/): Name a signal, set its unit
- [Files & recordings](https://phloem.ai/docs/inputs/files/): Replay a log, a bag, or a folder of drops
- [Pipelines](https://phloem.ai/docs/inputs/pipelines/): Shape channels as they arrive
