Model device state explicitly
Connected, disconnected, stale, updating, and unknown are genuinely different states, and an app that collapses them into a single reading will eventually show a confident number that is an hour old.
We model them separately and surface the distinction in the interface, because a user who can see that data is stale will retry, whereas a user shown stale data as current will file a complaint about accuracy.
Make onboarding recoverable at every step
Each stage of pairing has its own failure mode, and each needs its own recovery path rather than a shared error screen. Bluetooth disabled, permission denied, device not advertising, wrong network credentials, and backend unreachable are five different problems, and the user can only act on the one that actually occurred.
Separate the consumer app from the administrative tool
Support engineers, commissioning staff, and end customers want different things and carry different risk. Commissioning tools that ship inside a consumer app tend to be either hidden behind a fragile gesture or exposed to people who should not have them. A separate internal application is usually simpler and safer.
Test against real hardware and real failure
Simulators do not walk out of range, run out of battery, or reboot mid-transfer. We test against physical devices under the conditions that actually break connected apps, since those paths are where the defects live.