Error lookup and operator-facing text#
This project treats error presentation as a first-class part of a partner integration. Instead of showing only a raw detected code, it resolves the code into four fields:
Error code
Description
Explanation
Suggestion
Replace this placeholder with a screenshot of the error detail panel in your environment.#
Why this matters#
Raw codes are compact, but partner-facing tools often need a more explanatory output. Operators, service engineers, and integration teams benefit from seeing what the code means and what kind of response is expected.
Database-backed lookup#
The repository includes ur_error_codes.sqlite3. The client uses it locally, so the GUI and the API can perform lookups without requiring a network service.
That makes the project practical for:
isolated service laptops,
factory environments with restricted outbound access,
partner demos where you want predictable behavior.
Live detection path#
A live error can be recognized from:
structured message fields,
detected code strings inside message text,
raw packet inspection when needed.
Once a code is detected, the client resolves it into the four user-facing fields and exposes them under the errors namespace.
Typical API usage#
from ur_client import ClientInterfaceAPI
with ClientInterfaceAPI("192.168.0.10", error_db_path="ur_error_codes.sqlite3") as api:
api.wait_until_ready(timeout=5.0, minimum_packet_count=1)
print(api.read("errors.latest.error_code"))
print(api.read("errors.latest.description"))
print(api.read("errors.latest.explanation"))
print(api.read("errors.latest.suggestion"))
Fallback behavior#
Sometimes a very specific code maps cleanly to a detailed entry. In other cases, a group-level code may be the best available match. The client therefore supports fallback lookup behavior so that an application can still present useful information even when the most specific entry is not present.
Using the lookup outside live traffic#
You can also use the lookup as a standalone utility in your own application logic.
info = api.lookup_error("C204A7")
if info:
ui_model = {
"error_code": info["error_code"],
"description": info["description"],
"explanation": info["explanation"],
"suggestion": info["suggestion"],
}
That pattern is useful when your product stores historical codes and later needs to render them in a report or HMI.