The Voice Assistant's Body: Understanding OVOS Hardware Integration
While previous articles covered how your assistant listens, thinks, and speaks, now we’ll explore how it interacts with physical hardware through the Platform Hardware Abstraction Layer (PHAL) system.
Evolution of Hardware Support
The PHAL system’s history helps explain its design. Originally, Mycroft AI’s code was tightly coupled to their Mark 1 device, which included:
- LED panel for eyes and mouth
- Custom Arduino-controlled circuit board
- Specific audio hardware configuration
When Mycroft developed their Mark 2 device, they discovered this tight coupling made supporting new hardware difficult. OVOS solved this by abstracting hardware controls into plugins, making the assistant hardware-agnostic.
Understanding PHAL
PHAL plugins can control various hardware components:
- Volume controls
- WiFi configuration
- Display screens
- Cooling fans
- Custom circuit boards
- Robotic components
- System-level functions
Messages flow through the bus to control hardware. As a theoretical example:
{
"type": "ovos.phal.volume.set",
"data": {
"level": 75
}
}
Browse available PHAL plugins for supported hardware.
Admin PHAL
Some hardware operations require root privileges. Rather than running all PHAL plugins as root, OVOS provides Admin PHAL plugins that:
- Only load when the service runs as root
- Handle privileged operations
- Keep other plugins running with minimal privileges
This follows the principle of least privilege, improving system security.
Community Hardware Examples
The PHAL system’s flexibility has enabled the community to integrate OVOS with diverse hardware:
- Mycroft Mark 1 (original reference design)
- Mycroft Mark 2 (complete hardware redesign)
- Google AIY Voice Kit
- Adafruit Voice Bonnet
- Standard laptops and desktops, including MacBooks
- Custom robots and devices
Each implementation uses different PHAL plugins to control its specific hardware while running the same core assistant software.
Conclusion
The PHAL system gives OVOS incredible hardware flexibility. Whether you’re running on a custom device or standard computer, PHAL plugins provide a consistent interface for hardware control while maintaining security through proper privilege separation.
Next in series: The Voice Assistant’s Brain: Understanding OVOS Skills
Previous: The Voice Assistant’s Mouth: Understanding OVOS Audio Services