changeset 1282:61ce2830dea7

set source volume at start Ignore-this: 7bb0fe3c3df3a9172490227c1b3e6aaa darcs-hash:9973562f7b7d404f7b571ea1af8cacc258212af4
author drewp <drewp@bigasterisk.com>
date Sat, 20 Apr 2019 23:57:47 -0700
parents 80397afd5b52
children d36cd59b145a
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