Skip to content

Enable S7 MaxV live video, iPhone two-way audio and remote driving. - #95

Open
pponce wants to merge 2 commits into
DonSidro:masterfrom
pponce:video-support
Open

pponce wants to merge 2 commits into
DonSidro:masterfrom
pponce:video-support

Conversation

@pponce

@pponce pponce commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Enables live viewing and remote controls for S7 MaxV (roborock.vacuum.a27) through local_roborock_server, with two-way audio on iPhone. It could work for others too but i've only tested with my S7 MaxV

  • Video shortcut beside Settings; pattern entry opens video automatically when accepted. Numeric PIN remains available.
  • Fullscreen Exit, Fit/Fill, compact call icon, and an expandable Pin-and-Go map.
  • Hold-to-drive with handoff from this viewer's Pin-and-Go, release-to-stop, setup progress and command-specific errors. Failed motion commands are not replayed.
  • Pause/Resume for an existing clean; no Start cleaning in the viewer.
  • Explicit calls, independent microphone/robot-audio mute and robot speaker-volume presets. Opening video alone leaves audio off; leaving/backgrounding ends the call.

Known limitations

  • HD/SD switching does not reliably change the received stream. An acknowledged selection is not proof of a quality change.
  • Enable/Disable Remote Viewing is unavailable and disabled. Initial activation uses the official app.
  • Calls are iPhone-only; Android calls and other camera models are not enabled as i don't have them to test.

Validation and setup

S7 MaxV firmware 02.59.36: live video and hearing/speaking through iPhone calls confirmed. Latest combined TestFlight testing had no control issues. Exact installed build number and individual mute/volume/interruption results were not recorded.

Shared tests, Android build, unsigned iPhone build and native WebRTC offer checks passed at f15f474:
https://github.com/pponce/LocalRock/actions/runs/40965289293

Requires existing server camera support and a reachable TURN endpoint. Python-roborock/local_roborock_server#185 improves setup checks but is not a runtime dependency.
#87 may require a small top-bar integration adjustment.

EB4C0C4F-CB0C-4B2E-9F19-98DFB13E858C AE449F30-7FB5-4559-BD20-91F27C948536

Provide pattern-first entry, fullscreen video controls, Pin-and-Go and held-direction driving with bounded cleanup. Keep HD/SD switching and remote-view activation limitations documented.
@pponce

pponce commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author

Testing other models

I’ve tested this with an S7 MaxV (roborock.vacuum.a27), firmware 02.59.36, using an iPhone. The current code explicitly restricts access to that model.

The camera/WebRTC implementation may be reusable on other robots with remote-viewing support. To experiment in a development build:

  • Add the robot’s exact model ID to experimentalCameraSupported() in CameraLiveSession.kt and update the corresponding allowlist test.
  • Configure the existing server camera/TURN support and activate remote viewing through the official app.
  • Initially disable calls and movement controls in the test build. Verify credential handling, video start/stop, reopening, and cleanup when leaving or backgrounding the app.
  • Test audio and driving separately before enabling them for that model, including release-to-stop and connection-loss behavior.

A camera capability flag alone does not establish compatibility with every command used here. Please include the model ID, firmware, phone/OS version and sanitized errors when reporting results. Contributions to broaden support are welcome.

Android two-way audio

Android live video is implemented, but two-way calls still need Android platform code. AndroidRtcPeer currently inherits unavailable/default call methods from RtcPeer; changing supportsVoiceCall to true alone will not enable calls.

An Android implementation needs to:

  • Declare RECORD_AUDIO and request microphone permission when starting a call, handling denial and cancellation. Replace the shared iPhone-specific permission messages.
  • Implement requestMicrophonePermission, startVoiceCall, both mute methods, and stopVoiceCall in RtcPeer.android.kt.
  • Attach a microphone track to the existing negotiated audio sender and manage incoming audio tracks for playback and independent muting. Ordinary video viewing should leave audio capture and playback off.
  • Handle Android audio focus, routing and interruptions. Release microphone capture and playback on hang-up, cancellation, backgrounding, disconnect and peer disposal.
  • Reuse CameraVoiceCall for the robot’s call-start, call-stop and speaker-volume commands. The iPhone WebRtcPeer.swift implementation provides a reference for the intended behavior.

Once implemented, enable supportsVoiceCall in the Android test build. Test on physical hardware: both audio directions, both mute controls, permission denial, cancellation, call restart, volume and lifecycle cleanup. Initial Android testing can use the already-enabled S7 MaxV without broadening the model allowlist.

Show both video shortcuts only for exact models with documented remote viewing support. Require an unchecked-by-default opt-in for untested models before credential checks, video connections or calls. Preserve S7 MaxV controls and limit movement and cleaning controls to that tested model. Document compatibility sources and add access, audio and control-gating regression tests.
@pponce

pponce commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Added an opt-in checkbox for testing video and iPhone audio calls on other known video-capable models. Both the map icon and More Actions entry use the verified model list.

The screen explains that only S7 MaxV has been tested and asks users to report whether video and audio work on their model. Driving controls remain limited to S7 MaxV.

This branch has not been deployed

No deployments
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