Skip to main content

Linear/Ring LED Interface

Project description

PHAL Linear LED Plugin

Enables interaction with LEDs in a one-dimensional physical arrangement.

Standard LED Events

There are default LED animations that are shown when certain things happen. Note that some of these behaviors are configurable while others are hard-coded so users can be confident they know the device's state.

Listening

This will always be a breathing animation. The color may be specified in settings or will default to the theme color (same as the screen border when listening).

Sleeping

This will always be a static LED ring color. The color may be specified in settings or will default to Red.

Muted

This will always be a static LED ring color. The color may be specified in settings or will default to Burnt Orange.

Microphone Muted Error

This will flash all LEDs 3 times in the microphone muted color. This happens if the user tries to start listening while the mic is muted.

Speech Input Error

This will flash all LEDs 1 time in the error color (default Red). The color may be specified in settings.

Skill Intent Error

This will flash all LEDs 4 times in the error color (default Red). The color may be specified in settings.

Utterance sent to skills

This is disabled by default, but when enabled will provide an animation in the theme color when an utterance is emitted.

Skill intent handler start

This is disabled by default, but when enabled will provide an animation in the theme color when a skill intent starts.

Configuration

For Neopixel devices, the plugin requires root permissions and must be enabled explicitly in the system configuration in /etc.

PHAL:
  admin:
    neon-phal-plugin-linear-led-neopixel:
      enabled: true

Note: If any other config is present here (i.e. colors), it will override all configuration in PHAL.neon-phal-plugin-linear-led for Neopixel devices. It is recommended to not include config here so that it applies to all linear LED classes.

Colors

By default, the plugin will use theme colors for different events, but these colors may also be overridden in configuration.

PHAL:
  neon-phal-plugin-linear-led:
    listen_color: white
    mute_color: burnt_orange
    sleep_color: red
    error_color: red

Optional Event Animations

There are standard messagebus events that you can choose to show animations for. These are disabled by default, but may be desirable to provide more user feedback or troubleshoot specific error cases.

PHAL:
  neon-phal-plugin-linear-led:
    utterance_animation: refill
    handler_animation: bounce

messagebus API

This plugin exposes messagebus listener neon.linear_led.show_animation to trigger showing an animation. Any skill, plugin, or other integration can request an LED ring animation by emitting a Message:

from mycroft_bus_client import Message

Message("neon.linear_led.show_animation",
        {'animation': 'chase',
         'color': 'green',
         'timeout': 10})

Note that the plugin may enforce a limit to how long the animation is displayed and also may replace the animation with a different one that is triggered.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

neon-phal-plugin-linear_led-0.2.4.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

neon_phal_plugin_linear_led-0.2.4-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file neon-phal-plugin-linear_led-0.2.4.tar.gz.

File metadata

File hashes

Hashes for neon-phal-plugin-linear_led-0.2.4.tar.gz
Algorithm Hash digest
SHA256 4f76f4437a27e3a62ee0160bd7b6382bcf4bbe4349c43c43c898322732218e73
MD5 b082fde86c304d025afbd07acdb3e519
BLAKE2b-256 5ff989b6a4ad999114de1cbea2880b2c1349163909a4814a15521f0db92c57cf

See more details on using hashes here.

File details

Details for the file neon_phal_plugin_linear_led-0.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for neon_phal_plugin_linear_led-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b5cf4b1a8afd90b46d24477fc6ce2999311a5dc8d6eb4333e24dd884e554f7e1
MD5 e1f452d3b715c04dd38dc90dd9a0fcbd
BLAKE2b-256 ddb789180adace66635bfcf5248603e0ce84a2ee9970459c2eba5d8714465f82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page