Skip to content

Show where an unresponsive robot was last seen - #109

Closed
virtitnerd wants to merge 2 commits into
DonSidro:masterfrom
virtitnerd:pr/last-known-state
Closed

virtitnerd wants to merge 2 commits into
DonSidro:masterfrom
virtitnerd:pr/last-known-state

Conversation

@virtitnerd

@virtitnerd virtitnerd commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Depends on: Python-roborock/local_roborock_server#251

Why

When a robot stops answering, the detail screen showed an empty map. The local server keeps each robot's last status,
position and map, so the app can show them.

What

  • GET /user/devices/{duid}/last_known client call and model.
  • While the robot does not answer, its last map stands in on the detail screen, with where it was last seen and when.

Depends on

The server PR "Keep each robot's last-known state and serve it at /user/devices/{duid}/last_known". Without it the call
fails and the screen is unchanged.

Testing

Unit tests for the "last seen" text.

GET /user/devices/{duid}/last_known gives the last status, battery, error and position the
server heard, and with map=1 the last map the robot sent. Adds kotlinx-datetime for showing
when.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
When a robot has not answered for 10 seconds, the detail screen fetches the server's
last-known state, draws the last map it sent (with the robot's last position on it), and
says when it went offline and what it last reported. It clears itself when the robot answers.
The current time comes from the platform epoch helper, since kotlinx.datetime's
Clock.System does not resolve in common code with this kotlinx-datetime version.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@virtitnerd

Copy link
Copy Markdown
Contributor Author

Folded into #115 together with #111 so they can be reviewed as one; closing this one.

@virtitnerd virtitnerd closed this Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant