Library
FD1 Devices Endpoint
The devices endpoint provides access to read and control all local hardware devices.
Accessing Devices
fd1.devices.get_local_devices
Returns a list of known devices on the local server.
{
a: "fd1.devices.get_local_devices"
}
Response
{
...
data: {
rows: [
{
friendly_name: "The Scale",
inuse: 1,
deviceid: "ajadhh4gfg35j5",
type: "scale",
status: {
...
}
},
{
friendly_name: "CashDrawer via Epson Printer",
type: "cashdrawer"
}
]
}
}
Scales
Access to local retail scales used on checkouts
Functions
Firehoses
- device.event.scale.reading Send when a new or different weight is read from the scale
- device.event.scale.error Sent whenever an error is encountered with normal operation of the scale.
Reading a scales current weight
{
a: "fd1.devices.scale.read",
k: ... Scale Id...
}
Response
{
...
data: {
rows: [
{
current_gram: 2232
}
]
}
}
Scale Read Events
Example Output
{
...
sc: "device.event.scale.reading",
data: {
dtu: "2026-01-01 15:15:23",
friendly_name: "The Scale",
weight_gm: 342
}
}
Scale Errors
Example Output
{
...
sc: "device.event.scale.error",
data: {
dtu: "2026-01-01 14:14:23",
friendly_name: "The Scale",
status: {
flowerror_background: 817260317,
error_code_background: 2,
error_description_background: "File not found",
thread_active: false
}
}
}