EXT‐StreamDeck - bugsounet/MMM-Bugsounet GitHub Wiki

This plugin allows to control your mirror with stream Deck by elgato©

Testing Video

This is a demo in video (sorry for quality)

Installation

To install this plugin, try this command:

cd ~/MagicMirror/modules/MMM-Bugsounet
npm run setup:EXT-StreamDeck

Prepare using StreamDeck

Some linux rules are needed. Let's set it !

cd ~/MagicMirror/modules/MMM-Bugsounet
npm run setup:EXT-StreamDeck:rules

And reboot your pi

Configuration sample

{
  module: 'MMM-Bugsounet/EXTs/EXT-StreamDeck',
  config: {
    debug: false,
    device: null,
    Brightness: 100,
    EcoBrightness: 10,
    EcoTime: 10000,
    keyFinder: false,
    keys: [
      {
        key: 0,
        logo: "tv-on",
        notification: "Bugsounet_SCREEN-WAKEUP",
        payload: null,
        command: null,
        sound: "opening"
      },
      {
        key: 1,
        logo: "spotify",
        notification: "Bugsounet_SPOTIFY-PLAY",
        payload: null,
        command: null,
        sound: "opening"
      },
      {
        key: 2,
        logo: "volume-up",
        notification: "Bugsounet_VOLUME-SPEAKER_UP",
        payload: null,
        command: null,
        sound: "up"
      },
      {
        key: 3,
        logo: "tv-off",
        notification: "Bugsounet_SCREEN-END",
        payload: null,
        command: null,
        sound: "closing"
      },
      {
        key: 4,
        logo: "stop",
        notification: "Bugsounet_STOP",
        payload: null,
        command: null,
        sound: "closing"
      },
      {
        key: 5,
        logo: "volume-down",
        notification: "Bugsounet_VOLUME-SPEAKER_DOWN",
        payload: null,
        command: null,
        sound: "down"
      }
    ]
  }
},

Detailed Configuration

Option Description Type Default
debug Enable or not the Debug mode Boolean false
device Path of the StreamDeck to use. null = the default String or null null
Brightness Set the brightness of the streamDeck Number 100
EcoBrightness Set standby brightness Number 10
EcoTime Delay before standby (in ms) Number 10000
keyFinder Display keycode with MMM-GoogleAssistant Alert when a key is pressed Boolean false
keys Define your keys rules (see bellow) Array

device: null value will use the first streamDeck found

If not works, you can discover the list of the streamDeck in backlog by activate debug mode [STREAMDECK] Found model: mini Path: /dev/hidraw0 serialNumber: BL36H1A06XXX

Just report the path. in this case: /dev/hidraw0

keys

keys is an array of params for control your mirror this array need keyCode, notification, payload, command and sound parameter

Option Description Type
key Key number. You can catch it with keyFinder activated Number
logo Set the logo to display (only in png) String
notification Notification to send String
payload Payload associated to notification (optional) String
command Shell command to execute (optional) String
sound Name of the sound when executed (mp3 only) String

key: Can be discover when you activate keyFinder Just press a key and MMM-Bugsounet Alert will say the associated keyCode and report it in this field

logo: logo name located in resources directory (without extension)

Notes: If you want more logo, just see in the icons-Sample directory ! Just past the new logo in the resources directory and use it!

notification: Generaly each module/plugins have some incoming notification for a fonction. Just past the notification name

payload: If needed you can add a payload to the notification

command: You want to execute an shell command (with python, bash, sh,...) Your file must be in scripts directory

Sample: if you want to execute test.sh command line is: command: "sh test.sh",

sound: If you want to play a sound, just see in the resources folder all sound must be in .mp3, just past the name without extension

Note: you can add your own mp3 too!