Skip to content

Socket.IO events

Socket.IO provides a device-level integration path: clients connect to the backend and interact with a specific connected RFID device through supported events. This can be used independently of SmartTrackerCloud's inventory workflows. A direct device command and its response do not by themselves create a permanent record of the client's stock transaction or a complete audit trail. An integration using this path to manage stock must keep its own inventory and audit records. Use the SmartTrackerCloud API for transactions that should be managed and recorded in SmartTrackerCloud.

Direction Event Purpose
Backend → device stock:get Request a scan with an action history ID
Device → backend stock:put Report a drawer or device stock snapshot
Device → backend stock:scan_complete Mark all snapshot reports for the scan complete
Backend → device processes:created, processes:updated, processes:deleted Synchronize selection and pick-to-light state
Device → backend processes:get, processes:update, processes:delete Fetch or update a process
Device → backend users:get, users:put Optional user and badge synchronization
Client → backend client:stock:get Request a validated scan of a company device
Backend → client client:stock:get_accepted, client:stock:get_result, client:stock:get_error Report that scan's state
Admin client ↔ backend ↔ device terminal:* Authorized, session-bound remote terminal

For a commanded scan, copy the stock:get action ID into the parent_id of each stock:put report. Emit stock:scan_complete only after all reports have been sent. The backend correlates the reports and returns a completed result to the requesting client. Check stock:put_result for ingestion status.

The admin terminal is restricted to authorized administrators and one active session per device. Its terminal:input and terminal:output relay is specific to that session; it cannot forward arbitrary event names. The full device payload and setup notes remain in source-archive/rfid_socketio_protocol.md.