amixer --quiet -c 1 set Digital VOLUME
I tried that (Raspberry Pi 2 running Wheezy playing an MP3 file) with a space after the word Digital (I am using the 3.5mm connector for audio) and different values as parameter passed by an inject node. Made no difference at all ???
Pete.
--
http://nodered.org
---
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/YGITXaAOnzM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for that – you started me off
amixer cset numid=1 --
That did the job with 100% stuck on the end - a little sub-node I think as 40% is almost silent.. Got it – great.
From: node...@googlegroups.com [mailto:node...@googlegroups.com] On Behalf Of Nathanaël Lécaudé
Sent: 05 January 2016 15:38
To: Node-RED <node...@googlegroups.com>
Subject: [node-red] Re: Volume control PI in Node-Red
You can control the volume of the ALSA mixer using an exec node in Node-RED with this command:
--
[{"id":"45776f8a.ba889","type":"ui_tab","z":"e17f5ace.1e80a8","name":"Home","icon":"dashboard","order":"1"},{"id":"7b75ca20.848a34","type":"ui_slider","z":"e17f5ace.1e80a8","tab":"45776f8a.ba889","name":"Slider","topic":"","group":"","order":1,"min":0,"max":"100","x":130,"y":200,"wires":[["c871e3ff.378e2"]]},{"id":"3058a916.cfa756","type":"exec","z":"e17f5ace.1e80a8","command":"amixer set PCM","addpay":true,"append":"","useSpawn":"","name":"","x":438.5,"y":200,"wires":[[],[],[]]},{"id":"c871e3ff.378e2","type":"function","z":"e17f5ace.1e80a8","name":"","func":"msg.payload = msg.payload + \"%\";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":200,"wires":[["3058a916.cfa756"]]}]
I was so pleased the numid thing worked I did a little blog item – I’ll try yours now – thanks! http://tech.scargill.net/raspberry-pi-volume-in-node-red/
[{"id":"45776f8a.ba889","type":"ui_tab","z":"e17f5ace.1e80a8","name":"Home","icon":"dashboard","order":"1"},{"id":"7b75ca20.848a34","type":"ui_slider","z":"e17f5ace.1e80a8","tab":"45776f8a.ba889","name":"Slider","topic":"","group":"","order":1,"min":0,"max":"100","x":130,"y":200,"wires":[["c871e3ff.378e2"]]},{"id":"3058a916.cfa756","type":"exec","z":"e17f5ace.1e80a8","command":"amixer set PCM","addpay":true,"append":"","useSpawn":"","name":"","x":438.5,"y":200,"wires":[[],[],[]]},{"id":"c871e3ff.378e2","type":"function","z":"e17f5ace.1e80a8","name":"","func":"msg.payload = msg.payload + \"%\";\nreturn msg;","outputs":1,"noerr":0,"x":270,"y":200,"wires":[["3058a916.cfa756"]]}]
Thanks for that. I found my modification necessary as for some reason all the volume seems to be concentrated at one end of the scale. Good idea to use the slider from UI
Pete.