Hello,
I have a issue in the code, the Buttons will not work. How I can control the voiceradio with Buttons?
Thanks
Blackmirror
Hello,
I have a issue in the code, the Buttons will not work. How I can control the voiceradio with Buttons?
Thanks
Blackmirror
How can i integratet USB-Soundcard with omxplayer in javasript?
omxplayer -0 alsa:hw:1,0 modules/MMM-Podcast/video.mp4 works in the terminal,
but not omx.play(modules/MMM-Podcast/video.mp4,{audioOutput: alsa:hw:1,0}) in the javasript.
thanks Blackmirror
import RPi.GPIO as GPIO
import time
#Board Mode: Angabe der Pin-Nummer
GPIO.setmode(GPIO.BOARD)
#GPIO Pin definieren fuer den Dateneingang vom Sensor
PIR_GPIO = 13
Relay_GPIO = 37
GPIO.setup(PIR_GPIO, GPIO.IN)
GPIO.setup(Relay_GPIO, GPIO.OUT)
GPIO.output(Relay_GPIO, True)
GPIO.setup(32,GPIO.IN)
read=0
wait=0
ein=0
button=1
while True :
#PIR auslesen
read = GPIO.input(PIR_GPIO)
button = GPIO.input(32)
if ((read==1 or button==0) and wait==0):
GPIO.output(Relay_GPIO, False)
wait=1
ein=1
time.sleep(0.5)
elif ein==1 and button==0:
ein=0
time.sleep(0.5)
Have found in the web and I have modified for me, the Pin 32 is a button to make the monitor, ampilifier and the mirror light always on.
Wenn you use a usb-soundcard,
you must take
omxplayer -o alsa:hw:1,0 video.mp4
But where can I it insert in the node_helper.js?
Hello,
I can’t hear Sound over the USB-Card, only over HDMI.
Only I make Speakertest , I can hear a noise.
And I see it at alsamixer, but when I switch to USB Card at alsamixer and Close it and make a reopen , it’s the setting back to standard.
Hello,
I can no hear sound over the usb-card, only over hdmi.
But when I start speakertest I can hear the white noise.
I have test a few things what google say, but nothing works.
So, I Have modified, and hope it will doing what I want:
Module.register(“MMM-Myvoiceradio”,{
// Default module config.
defaults: { text: “
notificationReceived: function(notification, payload, sender) {
var self = this;
Sender = 0;
If (notification === “Sender+”){
Sender = Sender+1;
If (Sender > 1){
Sender = 2;
}
}
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 === “Volume+”){
self.sendSocketNotification(‘VolumeUp’, {});
if (notification === “Volume-”){
self.sendSocketNotification(‘VolumeDown’, {});
if (notification === “radiostop”){
self.sendSocketNotification(‘radiostop’, {});
}
This was the Myvoiceradio.js
I search for a simple web-radio that I can use with buttons,
Volume , on, off, and chance the different streams.
Only show short the station, after change.
Nice to make a output gpio in this module, so I can installed a relais, to switch thinks on, only when I am in the house.
I Have solve this problem without MMM-PIR-Sensor this a python-skript in rc.local.
But bei DHT22 - Sensor is not working now, destroyed? But why?