Volume control

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Volume control

Post by Gerwin »

I would like to change the volume in domoticz

I have a tablet on the wall where I play the music ( headphone Jack)then I would go to the USB soundcard mic input, and then go to the line in from the radio
Can someone tell me how I can do that (script) I like the dimmer like picture

I have speakers in the hole house i can set them on and off with Domoticz

But i like to change the volume in Domoticz
Is that possible ?????


I have a Raspberry Pi
With stable domoticz latest version

GerwinImageImageImage

Verstuurd vanaf mijn HTC Desire 650 met Tapatalk
Attachments
IMG_20170821_151146.jpg
IMG_20170821_151146.jpg (117.94 KiB) Viewed 1913 times
Last edited by Gerwin on Friday 02 March 2018 7:43, edited 1 time in total.
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume control

Post by Gerwin »

Nobody can tell me how to do????

Gerwin
Xztraz
Posts: 107
Joined: Tuesday 31 January 2017 21:54
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume control

Post by Xztraz »

you can control the playback volume of kodi(media player) from domoticz. could that be a part of the solution for you?
volume_kodi.PNG
volume_kodi.PNG (10.35 KiB) Viewed 1898 times
User avatar
emme
Posts: 909
Joined: Monday 27 June 2016 11:02
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Milano, Italy
Contact:

Re: Volume control

Post by emme »

quite difficult to understand your settings...

How you setup the volume in the actual ooms? (manually I assume..)

try to look to a possible solution: I'm using volumio on raspberry as a multiroom system... and Domoticz can handle playlist (a selection of), radio (a selection of) and volume as well, plus a text device that reflect the actual playing status

My system work with some scripts in domoticz and a service that (using websocket) update domoticz
ciao
M
The most dangerous phrase in any language is:
"We always done this way"
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume control

Post by Gerwin »

We have special applications that run on the tablet on the wall for my son, if there is an alarm goes off and you're radio listening on the tablet the radio goes off, so you will always hear the alarm, so kodi or something else is not useful because everything on this tablet runs When we go to bed we push on the button sleep, as lamps in certain places are go out, speakers go out in the House, and into the bedroom go on , but sometimes i forget the volume of the tablet set right , and so I would like to control the volume in domoticz.
Gerwin
Posts: 84
Joined: Friday 12 August 2016 13:08
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Volume control

Post by Gerwin »

I found a simple solution using just ALSA and uses little CPU - around 3-5% on RPi 3 using latest Jessie build and a USB Audio Device

It appears that recent builds all come with ALSA's dmix plugin built-in. This allows you to share and output audio output stream

Create New .asoundrc

pi@raspberrypi:~ $ sudo nano .asoundrc
Copy/Paste this based on USB Audio Device is the second card in system

pcm.LineOut {
type dmix # Kernel PCM
ipc_key 1112233 # Any Unique Number Number
slave {
pcm "hw:1,0" # Card # of USB Audio from aplay -l
period_time 0
period_size 1024
buffer_size 8192
rate 48000
#periods 128
}
}

pcm.!default {
type hw
card 1
}
ctl.!default {
type hw
card 1
}
Modify ALSA settings to make the USB Audio device the default using

alsamixer
<F6>
Select the USB Sound Card
Change Inout to Line if you have a high end Audio device, otherwise leave as Mic
Modify volumes to 40-50%
On exit, save settings

alsactl store
Start the stream playback from Audio In direct to Audio Out (& will return to command line)

arecord -f dat | aplay -D "LineOut" &
<CR>
Reduce volume of line input:

amixer set Line,0 0%
Use dmix shared pcm device to insert wav file previously recorded from line in:

aplay -D LineOut -R 48000 hiVol.wav
When it's all done restore the volume back to normal:

amixer set Line,0 50%
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest