Last active
December 27, 2024 10:35
-
-
Save coolbho3k/e61f1c5529363fca595ef13a41aef9f8 to your computer and use it in GitHub Desktop.
Script to continuously force Samsung soundbar sound mode
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This works around a STUPID issue on Samsung TVs/soundbars which will always | |
# set the sound mode to Game and never switch it back when game mode is | |
# enabled once. | |
# | |
# This script just sets the sound mode to whatever you want every 2 seconds. | |
# | |
# 1. First connect your soundbar to your SmartThings account | |
# 2. Find your soundbar's device ID here: https://my.smartthings.com/advanced/devices | |
# 3. Generate a bearer token here: https://account.smartthings.com/tokens | |
# 4. Replace "adaptive sound" below with your desired sound mode | |
while true | |
do | |
curl -s -X POST https://api.smartthings.com/v1/devices/[YOUR_SOUNDBAR_DEVICE_ID]/commands \ | |
-H "Authorization: Bearer [YOUR_BEARER_TOKEN]" \ | |
-H "Content-Type: application/json" \ | |
-d '{"commands":[{"component":"main","capability":"execute","command":"execute","arguments":["/sec/networkaudio/soundmode",{"x.com.samsung.networkaudio.soundmode":"adaptive sound"}]}]}' | |
sleep 2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made this very helpful script into a Dockerfile: https://github.com/snipem/force_samsung_soundbar_mode_docker