MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    MMM-Myvoiceradio with button

    Scheduled Pinned Locked Moved Troubleshooting
    1 Posts 1 Posters 901 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      Blackmirror
      last edited by

      Hello,
      I need help, I will use the MMM-Myvoiceradio module with buttons not this microphon.

      I have make buttone with MMM-Buttons for
      Sender+ to switch to the next sender and
      Sender- to switch to the previous sender
      VolumeUp to make a higher Volumen and
      VolumeDown to make a lower Volumen
      and radiostop for stop the radio.
      And have change the MMM-Myvoiceradio.js
      but nothing works.
      But I muss learn a lot of Javascript

      Module.register(“MMM-Myvoiceradio”,{

      // Default module config.
      // defaults: { text: “

      Sender1: BigFM
      Sender2: Einslive
      ”
      // },

      notificationReceived: function(notification, payload, sender) {
      var self = this;
      Sender = 0;
      If (notification === “Sender+”){
      Sender = Sender+1;
      If (Sender > 2){
      Sender = 1;
      }
      }
      If (notification === “Sender-”){
      Sender = Sender-1;
      If (Sender < 1){
      Sender = 2;
      }
      }

      if (Sender === 1){
      self.sendSocketNotification(‘einslive’, {});
      }
      if (Sender === 2){
      self.sendSocketNotification(‘bigfm’, {});
      }
      if (notification === “VolumeUp”){
      self.sendSocketNotification(‘VolumeUp’, {});
      if (notification === “VolumeDown”){
      self.sendSocketNotification(‘VolumeDown’, {});

      if (notification === “radiostop”){
      self.sendSocketNotification(‘radiostop’, {});
      }

      },

          // Override dom generator.
          getDom: function() {
                  var wrapper = document.createElement("div");
                  wrapper.innerHTML = this.config.text;
                  return wrapper;
          }
      

      });

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Enjoying MagicMirror? Please consider a donation!
      MagicMirror created by Michael Teeuw.
      Forum managed by Sam, technical setup by Karsten.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy