This commit is contained in:
2025-12-07 21:46:10 +01:00
parent 35c24f9527
commit b361e043c5

View File

@@ -691,6 +691,7 @@ def on_message(client, userdata, msg):
else: else:
writeLog("Linux Vol Control") writeLog("Linux Vol Control")
if myObj['target'] == "start": if myObj['target'] == "start":
os.environ["MQTT_SRV_CUR_VOLEUME"] = subprocess.Popen("amixer sget Master | awk -F\"[][]\" '/Left:/ { print $2 }'", shell=True)
myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%' myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 20%'
else: else:
myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 100%' myCmd =f'sudo XDG_RUNTIME_DIR=/run/user/1000 -u jd amixer set Master 100%'