Library
Developer Home
FD1 Client Protocol
Home
Concepts
Reading Data
Writing Data
Protocol Defined
Servers
Connect & Authenticate
Proxies & Tunnels
Webhooks & FirehosesProgramming Support
Logging
Minor Facts
State Facts
Response Format
How To Guides
eCommerce Sites
Custom Point of Sale
Customer Access
Bulk Downloads
Major APIs / Endpoints
All Endpoints
Products
Sales
SalesBuilder
Session
Get Attribute
Sale Capture
General Purpose
Data Capture
Devices
Barcode Scanners
Eftpos
IoT Sensors
Power Outlets
Printing
Scales
Security Cameras
Purchasing / Supply Side
Purchase Orders
Invoices
Invoice Payments
Document Capture
Rare APIs / Endpoints
SSL Certificates
API Key Management
Diagnositics
PosGreen
Server to Client Messages
Overview
Resources / Objects
Purchase Order
Invoice Payable
Invoice Payment
Product
Supplier
Location
Sale Lines
Sale Delivery Details
Sales
Price Maps
Employees
Carriers
Payments
Product Kits
Department 1
Customers
Webhooks & Firehoses
FD1 Scale/Weighing Devices
These functions allow you to query available weighing devices and control them. Scales are usually configured to send weight values as they become available, so in general interfacing to scales involves handling the random inbound messages received over the websocket
To use scales in your application
- Pair with a scale using fd1.devices.pair_to_scale This only needs to be done once and we suggest you save the pairing either locally in the browser or on your session (or both!)
- Setup a message handler to receive fd1.devices.scale_read_ready events
- Optionally, use fd1.devices.enable_scale_reading to control if you are wanting to actively receive scale events. This function allows multiple browsers to potentially share a scale by requesting access to it.
fd1.devices.get_scale_devices
Fetch allocated and potentially available scale and weighing devices
Example.
{ a: "fd1.devices.get_scale_devices", q: { latitude: -34.892344, longitude: 174.99988872, location: 45 } }