Git Product home page Git Product logo

mmm-sonosselect's Introduction

MMM-Modulebar

This an extension for the MagicMirror².

This Module gives buttons for each of the rooms in your Sonos setup and allows you to select which rooms are playing music or grouped together.

Screen shots

Module with symbols only in row mode:

Modulebar Row Symbols

Module with symbols only in column mode:

Modulebar Column Symbols

Module with symbols and text in column mode:

Modulebar Column Symbols Text

Module with symbols and text in row mode:

Modulebar Row Symbols Text

This is my own mirrors view (Bottom Bar) using some addition in the custom.css see below

Modulebar Custom CSS

Installation

In your terminal, go to your MagicMirror's Module folder:

cd ~/MagicMirror/modules

Clone this repository:

git clone https://github.com/basnelso/MMM-SonosSelect

Using the module

To use this module, add it to the modules array in the config/config.js file:

modules: [
    {
        module: "MMM-SonosSelect",
        position: "bottom_bar", // This can be any of the regions.
        config: {
            // See 'Configuration options' for more information.
        }
    }
]

Configuration options

The following properties can be configured:

Option Default Description
showBorder true Determines if the border around the buttons should be shown.

Possible values: true or false
minWidth 0px The minimum width for all the buttons.

Possible values: css length
minHeight 0px The minimum height for all the buttons.

Possible values: css length
direction row The direction of the menu.

Possible values: row, column, row-reverse or column-reverse
buttons Clock example button All the different buttons in the menu.

Possible values: a button configuration, see Configuring Buttons

Configuring Buttons

Buttons have to be placed in buttons in the config. A button contains a uniqe number as a key and a set of options in the object ({}).

Each button starts with it's own uniqe number (ex. "1"), then add the options needed.

Option Description
room The string of the room name in sonos.

Possible values: string
symbol A symbol to display in the button.

Note: if no value is set no symbol will be displayed.
Possible values: See Font Awesome website
size The size of the symbol.

Note: will only have effect on a symbol.
Default value: 1
Possible values: 1, 2, 3, 4 or 5
width The width of the image.

Note: will only have effect on an image.
Possible values: number
height The height of the image.

Note: will only have effect on an image.
Possible values: number

An example:

  buttons: {
    "1": {
      room: "Living Room", // Needs to match the room name in your sonos app
      symbol: "couch"
    },
    "2": {
      room: "Kitchen",
      symbol: "utensils"
    },
    "3": {
      room: "Bathroom",
      symbol: "toilet"
    },
  }

Notes

  • Important: unfortunatly positioning this module as fullscreen will result in the menu floating top left. I currently do not know how to fix this but will look into it. If you know how don't hesitate to either write me or send me a pull request!
  • If the image is an local path and it does not show. Try different ways to write the local path. If this still does not work then try putting the image in a folder in your MagicMirror folder and use as local path foldername/imagename.
  • If only heigh or width is set for an image the other size will scale to maintain it the image it's original aspect ratio.
  • Module name is case sensitive.
  • If both the text and symbol aren't set for a button then the button won't contain anything, but still show the border.
  • The symbols are all form the Font Awesome website.
  • The text may contain HTML tags and will be displayed as HTML.

mmm-sonosselect's People

Contributors

basnelso avatar snille avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.