This is an extension for the MagicMirror. It can show/hide a webradio stream provided by Radio.de You can start and stop this web radio stream by hiding the module. It uses the suspend/ resume method of MagicMirror for this. Currently the setup is rather simple. Potential extensions for the future might be selection of the radio station via remote control plugin, tuning of volume. Currently I do use the module to start in the evening the favorite radio channel of my children and to stop it again once they do sleep.
- Navigate into your MagicMirror's
modules
folder and executegit clone https://github.com/SteffMUC/MMM-RadioDe.git
. A new folder will appear navigate into it. - Execute
npm install
to install the node dependencies. (Currently not really necessary since there are no dependencies).
To use this module, add it to the modules array in the config/config.js
file:
modules: [
{
module: 'MMM-RadioDe',
config: {
// See 'Configuration options' for more information.
}
}
]
The following properties can be configured:
Option | Description |
---|---|
station |
Station name of the desired radio station. Default (if nothing specified) is Antenne Bayern Hit for Kids. The station name can be obtained from |
api_key |
Must be specified. Without api_key the browser player will be displayed but will not start. The api_key can be derived one time in your browser, start any radio station of radio.de, click the embed button, you will see an embed code, copy your api_key from there. |
height |
Optional: Specify the height of your player. Default is 92 (pixel). Please specify only as decimal number without pixel as unit. |
width |
Optional: Specify the width of your player. Default is 360 (pixel). Please specify only as decimal number without pixel as unit. |
- Currently no dependencies
If you use this configuration you need to hide/ unhide this module manually, e.g. with MMM-Remote-Control
{
module: 'MMM-RadioDe',
position: 'top_right', // This can be any of the regions.
config: {
// See 'Configuration options' for more information.
station: "antenne",
// can be obtained in embed section of station, e.g. http://antennekids.radio.de/
api_key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
//optional,
height:"92", // in pixel
width:"360", // in pixel
}
},
Alternatively you can use the module MMM-ModuleScheduler to start and stop the radio stream automatically.
{
module: 'MMM-RadioDe',
position: 'top_right', // This can be any of the regions.
classes: 'scheduler',
config: {
// PLAY RADIO BETWEEN 18:05 and 18:15 EVERY DAY
module_schedule: {from: '05 18 * * *', to: '15 18 * * *' },
// See 'Configuration options' for more information.
station: "antenne",
// can be obtained in embed section of station, e.g. http://antennekids.radio.de/
api_key: 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
//optional,
height:"92", // in pixel
width:"360", // in pixel
}
},