A VERY simple Web radio player controled by voice



  • Ok, guys,

    here is my first module for the MM². It will be very simple because I’m not have any coding experice.

    Here I like to say THANKS to @tyho and @strawberry-3-141 which helped me a lot!

    And I have to say thanks to @alexyak for the great voicecontrol module!

    Here my module:

    https://github.com/gismo2006/MMM-Myvoiceradio

    OHHH before I forgett, there a no Pictures because my module didn’t show anything. (Ok thats not the true it will only show you the name of the station if you want :-) )


  • Module Developer

    Brilliant, however.
    I don’t get the exec command to work, nothing wrong with the .sh scripts but it seems like the shell doesn’t start from MM.
    I’m trying to auto start the playback on load with

    start: function() { this.sendSocketNotification('einslive', {});},
    

    Right or wrong?

    Edit
    Yes, the start:function works

    after som guidance from gismo2006 i changed the .sh script file to be executable (chmod +x ) and now it works :D


  • Module Developer

    You do know that with a slight change in the .sh-file you can make mpg123 play local m3u-playlists, right?

    How do you handle multiple starts of radio channels?
    Following the force-close method I suggest adding :

    killall mpg123
    sleep 0.1
    #and the mpg123 play command
    

    This would kill all mpg123 processes before starting the next mpg123 process with the other station.

    I wonder if hotkeys can be assigned to mpg123…



  • Hi,

    In best case you haven´t got any problem whit multiple starts of radio channels. Because, they will only start the radio stream you like and was detected by hotword. And because there only run one stream or sound at the moment the kill order there no problem. I think you will not like to hear more than one stream at the same time. I mean it can be happen but then, i think, you will stop all streams because it will be terrible for your ears.

    Maybe I did understand your question false… :-)

    greets gismo


  • Module Developer

    @gismo2006

    What I mean is if you want to change the station from one to the other you have to use the hotword for stop(radiostop) before you change stations.

    You really need the kill before starting the new stream/playback otherwise you get multiple streams at the same time.


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.