Skip to main content

An OVOS PHAL plugin to control DotStar type LEDs

Project description

ovos-PHAL-plugin-dotstar

Compatible with

  • Respeaker 2/4/6/8 i2c microphone HAT's
  • Adafruit 2 mic VoiceBonnet

Usage

There are a few ways for this plugin to get enabled.

  • Enable manually

Add this to your ~/.config/mycroft/mycroft.conf

{
    "PHAL": {
        "ovos-PHAL-plugin-dotstar": {
            "enabled": true
        }
    }
}

With this configuration, no other validation checks are made. It is assuming you have a compatible HAT installed.

When ovos-i2csound is installed and running, it creates a file at /etc/OpenVoiceOS/i2c_platform with the HAT name it detected. This plugin then checks that file and if a compatible HAT is detected, the plugin is activated.

  • Automatically with hardware detection

If the above two options don't work, the plugin tries to detect a compatible HAT using i2c-detect. If a compatible device address is found, the plugin will activate.

From this point, if you are using a ReSpeaker i2c microphone, your LED's should give you prompts of what is going on with your OVOS assistant.

Adafruit 2mic voicebonnet

The Adafruit voicebonnet can be used with this plugin, but it requires one more step of manual configuration. While the above detection options will properly enable the plugin, this HAT uses different GPIO pins for it's LED's, therefore cannot be easily distinguished from a ReSpeaker 2mic HAT.

Add the following to your ~/.config/mycroft/mycroft.conf file

{
    "PHAL": {
        "ovos-PHAL-plugin-dotstar": {
            "dotstar_hat": "ADAFRUIT2MIC"
        }
    }
}

And restart OVOS

Your LED's on your Adafruit voicebonnet will now show the same prompts as the ReSpeaker devices.

Custom Configuration

Colors and animations can be configured in ~/.config/mycroft/mycroft.conf

{
    "PHAL": {
        "ovos-PHAL-plugin-dotstar": {
            "main_color": "Mycroft blue",
            "background_color": "OVOS red",
            "listen_animation": "breath",
            "talking_animation": "blink"
        }
    }
}

main_color -> str:

    rgb value -> "32, 195, 63"
    name -> "blue"
    hex value -> "#22A7F0"

background_color -> str

    rgb value -> "32, 195, 63"
    name -> "red"
    hex value -> "#FF1A1A"

listen_animation -> str:

    one of:
        'breathe'
        'chase'
        'fill'
        'refill'
        'bounce'
        'blink'
        'alternating'

talking_animation -> str:

    one of:
        'breathe'
        'chase'
        'fill'
        'refill'
        'bounce'
        'blink'
        'alternating'

Conflicts With

There are two pre-existing plugins that either need uninstalled with pip, or blacklisted in your mycroft.conf file.

ovos-PHAL-plugin-respeaker2mic ovos-PHAL-plugin-respeaker4mic

TODO

  • Add more animations
  • User configurable colors
  • Theme support
  • User configurable animations
  • Add github tests and automation

Please enjoy this plugin and don't be afraid to create an issue if you run into any problems.

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

ovos_phal_plugin_dotstar-0.0.3a1.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

ovos_phal_plugin_dotstar-0.0.3a1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ovos_phal_plugin_dotstar-0.0.3a1.tar.gz.

File metadata

File hashes

Hashes for ovos_phal_plugin_dotstar-0.0.3a1.tar.gz
Algorithm Hash digest
SHA256 beca7d60eae03b99139dfc209fb52aafeacecc86dfed01a5b6b77889bd3d21b7
MD5 caff7beefe4a765e11efefedd7c73cdb
BLAKE2b-256 ed94655dcc68b864e707a6c8f134ce12cd4965c6da29f222de8a38736cb3f357

See more details on using hashes here.

File details

Details for the file ovos_phal_plugin_dotstar-0.0.3a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_phal_plugin_dotstar-0.0.3a1-py3-none-any.whl
Algorithm Hash digest
SHA256 597ecd85068275a4b414d108591817259ef4065bcdc3fc3ae18e81cffdc7b1f0
MD5 4b79b243343b137f8488874443652e23
BLAKE2b-256 29bf92462d0fba665a2061777edb99660c6041f549d1b304655f51daa8f8f62e

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