Automatically detect if audio is enjoying
Hi, I’m utilizing dwelling assistant to play sound on my powered audio system linked instantly to three.5mm audio output. I would like to have the ability to flip them on/off when wanted, so I linked them via a sensible plug.
Now the problem is to find out whether or not any sound is popping out of the pc to set off on/off automation.
I discovered this PulseAudio
command which supplies me output IDLE
or RUNNING
:
pactl record | grep State
It works nice, however I’m struggling to get it working in HA.
My plan is to run automation each 5 seconds which is able to verify for IDLE
/RUNNING
standing and management the good plug accordingly.
I created shell command for that, however every time I run it, it returns an error:
shell_command:
check_audio_output: /bin/bash -c "pactl record | grep State"
output:
stdout: ""
stderr: "/bin/bash: line 1: pactl: command not discovered"
returncode: 1
Same command works after I run it in terminal.
Anyone has any concepts why does it fail or perhaps there’s a higher approach to verify for sound enjoying?
1 submit – 1 participant
HI-FI News
by way of Home Assistant Community – Latest matters https://ift.tt/Ylk0jUX
March 9, 2024 at 10:11AM
-
Product on saleAudiophile Vinyl Records Cleaning BundleOriginal price was: €44.95.€34.95Current price is: €34.95. excl. VAT
-
Product on saleEasy Start Vinyl Records Cleaning KitOriginal price was: €39.90.€29.90Current price is: €29.90. excl. VAT
-
Vinyl Records Cleaner Easy Groove Concentrate€19.95 excl. VAT
-
Easy Groove Super Set€199.00 excl. VAT
-
Easy Groove Enzycaster – vinyl records prewash cleaner€25.00 excl. VAT
-
Easy Groove Spray&Wipe vinyl records cleaner€19.95 excl. VAT