Mercurial > code > home > repos > homeauto
changeset 479:9ab114450284
set source volume at start
Ignore-this: 7bb0fe3c3df3a9172490227c1b3e6aaa
author | drewp@bigasterisk.com |
---|---|
date | Sat, 20 Apr 2019 23:57:47 -0700 |
parents | c7534a417c6d |
children | 53ceedcc2809 |
files | service/audioInputLevels/audioInputLevelsPulse.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/service/audioInputLevels/audioInputLevelsPulse.py Sat Apr 20 23:56:57 2019 -0700 +++ b/service/audioInputLevels/audioInputLevelsPulse.py Sat Apr 20 23:57:47 2019 -0700 @@ -2,7 +2,7 @@ # # https://github.com/swharden/Python-GUI-examples/blob/master/2016-07-37_qt_audio_monitor/SWHear.py is similar from __future__ import division -import socket, time, logging, os +import socket, time, logging, os, subprocess from Queue import Queue from ctypes import c_void_p, c_ulong, string_at from docopt import docopt @@ -175,7 +175,11 @@ log.setLevel(logging.DEBUG if arg['-v'] else logging.INFO) - influx = InfluxDBClient('bang6', 9060, 'root', 'root', 'main') + # todo move this into the PeakMonitor part + subprocess.check_output(['pactl', + 'set-source-volume', arg['--source'], '94900']) + + influx = InfluxDBClient('bang.vpn-home.bigasterisk.com', 9060, 'root', 'root', 'main') hostname = socket.gethostname() METER_RATE = 8192