GithubHelp home page GithubHelp logo

mmm-myvoiceradio's Introduction

MMM-Myvoiceradio

A very simple radio Module for your MM² controlled by voice

Hello everybody!!! :-) Welcome to my first module.

Ok I created a very very simple module for my own MagicMirror, but I like to share it whit you. :-)

This is my first try of create a module and uploading it to github.

What do this modul?

This modul can start a radio staion and play a Live stream. Also you can stop the stream. At this standard config there was two radio stations from Germany. (Einslive diggi and BigFM).

How does it work?

To use this modul you have to install and config the voicecontrol Modul, too. If this works fine you have to create some Hotwords. One for every staion and one word to stop Radio. !!! Carefull!!! At my own mirror I create at first a Hotword called Sender1 (Station1) and a hotword called Sender2 (Station2). But then the voicecontroll Module detection can't regonize the correct Word and like to play everything. So I create some speziall Words, like the name of the two Radiostation and for STOPP the Hotword Radiostop.

It works very easy. There are two diffrent .js Files in this git. A js file for the module and a Node_helper.js file. And there are a folder whit scripts.

At first you have to create a hotword and config it in your config.js file. Like every hotword. Then you have to spezify a message which will send if the hotword will detected. In my case einslive for example. If the Hotword is now detected, the message "einslive" will send to all other modules. The MMM-Myvoiceradio.js file detected this message and send a soketnotification called "einslive" too. Now the Node_helper.js detected this soketnotification and started the right script at the Stations Folder. And thats all... Now you should hear some music.

Some times before I write about Radistop. If this hotword is detected, the Node_helper.js file send the order kill mpg123 to stop radio. This will a hard method but it works. And normaly no other Sound was playing at the same time the order kill mpg123 will ok.

!!! VERY IMPORTANT!!! A user called Broberg show me a mistake! The used exec command didn´t work. Because I forget to explain YOU have to make the script files exutable!!! I use the command "chmod +x " in the shell.

At last I will say: YOU HAVE TO CHECK EVERY FOLDERPATH in my files!!! Maybe at your MM² there was other Folders use. AND: I write, I use to play mp123. I didn't know if it will be install by standard.

OHHH and a little word to the script at the staion folder. You can see there will only start the stream. I use the option -q because they will no text display in your console. THE biggest Problem was to find out the right and direct Path to the Live stream. I remember I have google a lot. :-)

Here the chnage for your config.js

{ module: 'MMM-Myvoiceradio', position: 'lower_third', config: { } },

What did it display?

This module displayed at standard only one thing, the name of the two radio stations. You can change or delete this in MMM-Myvoiceradio. Where it will be displayed you can chnace in your config.js file.

mmm-myvoiceradio's People

Contributors

gismo2006 avatar

Stargazers

Ramez avatar Sorin Petrus avatar  avatar Olivier Lebhard avatar

Watchers

James Cloos avatar

mmm-myvoiceradio's Issues

Einslive doesn't start

Hi,
I want to test this module, because I want to play different web radios. To test, I wanted to play Einslive, but it doesn't start.
This module has been implemented in my mirrordir/config/config.js
I downloaded the voicecontrol module and added the following lines for 1Live to my config:
{
module: 'voicecontrol',
position: 'bottom_left',
config: {
models: [
{
keyword: "RadioEinslive",
description: "'Radio Einslive' sagen um Eins Live zu starten",
file: "RadioEinslive.pmdl",
message: "einslive"
},
}

The paths in the Voiceradio module are customized to my mirrordir structure and the RadioEinslive.pmdl is copied to mirrordir/

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.