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;
}
});