Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

ovos-phal-plugin-ha-link

An OpenVoiceOS PHAL plugin that links the device to Home Assistant.

The device connects to Home Assistant itself and carries its message bus both ways to the OpenVoiceOS integration. In Home Assistant it shows up as a device, with what the bus can see and set:

  • volume, mute and listening on/off: automations can turn listening off at night
  • its state (idle, listening, thinking, speaking), the last question and the last answer
  • Say (notify.send_message) and Ask (ovos.ask)
  • the device's own sensors, when a plugin reports them (ovos.phal.sensor)

No port is opened on the device and nothing has to reach it from outside, so it also works behind NAT. Any OVOS install can use it: ovos-installer, raspOVOS, a Mark II, an OVOS in a VM.

Install

pip install --pre ovos-phal-plugin-ha-link

In Home Assistant, install the OpenVoiceOS integration (0.3.0 or newer), add it, and choose An OpenVoiceOS device. That lets devices connect. Then make a long-lived access token: your profile → Security.

Configure

In mycroft.conf:

{
  "PHAL": {
    "ovos-phal-plugin-ha-link": {
      "url": "http://homeassistant.local:8123",
      "token": "<the long-lived access token>",
      "name": "Kitchen"
    }
  }
}
Setting
url Home Assistant's address
token a long-lived access token
name the device's name in Home Assistant (default: the host name)
model shown on the device page (default: OpenVoiceOS)
panel_url the device's ovos-control-panel, reached here on the device (default http://127.0.0.1:8500; false for none)
panel_token its access token (default: webui.access_token from mycroft.conf)
panel_public_url where a browser can open the panel, for "Open control panel" in Home Assistant (optional)

Restart OVOS' PHAL service. The device then appears in Home Assistant under Settings → Devices & services → Discovered. Add it there, once. The plugin keeps the device's id in ~/.local/state/ovos-phal-plugin-ha-link/device_id, so it stays the same device.

How it works

It uses the integration's protocol (docs/protocol.md): ovos/connect over Home Assistant's WebSocket API, then bus messages both ways. What Home Assistant sends goes on the bus as it is. Of the device's own messages, only the types Home Assistant asks for (the forward list) are sent. It connects again by itself when Home Assistant restarts.

The control panel

When ovos-control-panel runs on the device, Home Assistant also gets what it can set: language, units, voice, speech to text, wake word, skills on and off, updates, restart and reboot (ha-ovos-integration#15). Home Assistant's requests come through this link, and the plugin calls the panel here on the device, so the panel never has to be opened on the network. Restart and reboot need the panel's access token (webui.access_token).

Coming

  • What the device sends out on the network (#16).
  • The device as an Assist satellite (#13).

License

Apache-2.0

Metadata

Release files for ovos-phal-plugin-ha-link 0.1.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ovos-phal-plugin-ha-link 0.1.0a1
File Size Uploaded Provenance Actions
ovos_phal_plugin_ha_link-0.1.0a1.tar.gz 10.8 kB With provenance Details for ovos_phal_plugin_ha_link-0.1.0a1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ovos-phal-plugin-ha-link 0.1.0a1
File Interpreter ABI Platform Actions
ovos_phal_plugin_ha_link-0.1.0a1-py3-none-any.whl Python 3 none any Details for ovos_phal_plugin_ha_link-0.1.0a1-py3-none-any.whl

Total release size: 22.9 kB

Security for ovos-phal-plugin-ha-link 0.1.0a1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page