Hey fellow Home Assistant tinkerers and smart home geeks,
If you are using or modding Astrion as your dedicated smart home client/remote, you’ve probably run into the ultimate dilemma when choosing your dashboard strategy:
1\The Full Web Approach (WebView / Official App): Unbeatable freedom. You can run any crazy HACS custom card, card-mod, and highly customized Lovelace UI. But on lower-spec hardware, heavy dashboards easily trigger OOM (Out Of Memory) crashes, and trying to navigate a web page blindly with physical buttons (D-pad, volume rocker, back button) is a laggy, clunky nightmare.
2/The Dedicated Native Card (RosCard) Approach: Blazing fast. When switching to a native view, the remote controller handles the rendering locally. Because it completely bypasses the browser shell and communicates directly via Home Assistant’s official APIs, it consumes virtually zero web resources. It’s incredibly smooth, responsive (<20ms latency), and perfectly solves the physical button blind-control experience for AV and media devices. The catch? You lose the dynamic flexibility of the latest Lovelace card updates.
To kill this pain point once and for all, our R&D team is developing a brand-new Hybrid Container Architecture for Astrion RemoteOS. We want to share our technical approach and get your honest feedback!
The Core Magic: View Routing & “Soul Hijacking”
Instead of forcing you to choose a single app-wide approach, we are introducing a View Router Layer. By adding a simple renderMode attribute to your view configurations, you can mix and match rendering styles page by page, making Lovelace and Native Android Views (Jetpack Compose) seamlessly coexist.
+-----------------------------------+
| View Router Layer |
| Parses local JSON/YAML config |
+-----------------------------------+
|
Is renderMode == "webview"?
|
+----------------+----------------+
| YES | NO
v v
+-------------------------+ +-------------------------+
| Lovelace Web View | | Pure Native RosCard |
| Loads dynamic HA Canvas | | Parses HA configs & |
| & injects Bridge JS | | generates UI locally |
+-------------------------+ +-------------------------+
|
[ Focuses Media Card ]
|
v
( "Soul Hijack" Triggered )
|
v
+-------------------------+
| Native RosCard Overlay |
| * Blazing fast <20ms |
| * Direct HA API |
| * Physical key takeover |
+-------------------------+
1. The View Router: Hybrid Page Management
You can now explicitly declare how each tab or screen should be handled by the OS using the renderMode property:
-
renderMode: WEBVIEW: The OS dynamically spins up a WebView instance to load your highly-customized, full-fat Lovelace dashboard. -
renderMode: NATIVE_ROS: The remote skips the web engine entirely. It parses your card configurations and generates the native user interface locally on the fly. It is incredibly lightweight, fluid, and perfect for fast-glance status pages.
2. “Soul Hijacking” (Soul Hijack) for Media Cards
What happens when you are inside a Web View but need quick physical control?
-
You swipe and browse your gorgeous Lovelace dashboard using the touchscreen (100% aesthetic freedom).
-
The moment you focus on or tap a media ROScard (like specific AV media player entities), our injected bridge script instantly sends a high-priority signal to the Android system.
-
Android immediately suspends the WebView’s key listeners and smoothly fades in/slides up a locally-rendered Native RosCard control panel.
-
Your remote’s physical buttons (D-pad, volume wheel, play/pause, back) are instantly hijacked by the native system, sending direct API commands to HA with <20ms latency. Tap the physical “Back” button, the panel slides away, the keys are released, and you are seamlessly back on the Lovelace web canvas.
Video DEMO: