Skip to content

Repository files navigation

ovos-PHAL

ovos-PHAL is the Plugin-based Hardware Abstraction Layer for OpenVoiceOS. It runs as a service that loads PHAL plugins based on the environment, either from known configuration or from device fingerprinting. Each plugin connects a specific piece of hardware or a specific system feature to the OVOS messagebus.

A PHAL plugin can provide a hardware integration, such as a respeaker, mk1, or mk2 device. It can also provide a system integration, such as a network manager or the OVOS shell.

Install

pip install ovos_PHAL

Extra plugin sets install with the package:

pip install ovos_PHAL[linux]   # alsa, system, network-manager, wallpaper-manager
pip install ovos_PHAL[mac]     # ovos-phal-plugin-mac
pip install ovos_PHAL[mk1]     # ovos-PHAL-plugin-mk1
pip install ovos_PHAL[mk2]     # ovos-PHAL-plugin-hotkeys
pip install ovos_PHAL[mk2dev]  # ovos-PHAL-plugin-mk2-fan-control
pip install ovos_PHAL[extras]  # ipgeo, connectivity-events, oauth

Usage

Start the PHAL service from the command line:

ovos_PHAL

This reads the PHAL section of mycroft.conf and starts the plugins listed there:

{
  "PHAL": {
    "ovos-PHAL-plugin-display-manager-ipc": {"enabled": true},
    "ovos-PHAL-plugin-mk1": {"enabled": true}
  }
}

To run PHAL from Python, use ovos_PHAL.service.PHAL:

from ovos_PHAL.service import PHAL
from ovos_utils import wait_for_exit_signal

phal = PHAL()
phal.start()
wait_for_exit_signal()
phal.shutdown()

An admin variant that loads root-only plugins runs with the ovos_PHAL_admin command.

Related projects

License

Apache-2.0

About

No description or website provided.

Topics

Resources

Contributing

Stars

0 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages