- Local time
- 4:32 AM
- Posts
- 122
- OS
- Windows 11
My setup requires me to manually turn my speakers on and off, I want to automate that.
I got a smart plug, installed python, and the python program that controls the plug
so I can now run a bat file with the line of
When the computer starts or I login, and the computer wakes from sleep: I want the command to turn the speakers on to run
When the computer shuts down and sleeps: i want the command that turns the speakers off to run
I'm finding solutions for each condition, except when I want the command to run when sleep is initiated. I want the computer to be put to sleep by any normal means and turn off the speakers when doing so,
There seems to be a program that only works for Windows XP era systems and doesn't work, and there seems to be a Windows 7 era program, but all download links are broken.
How do I run a command that is automatically triggered when the computer starts to go to sleep, and completes running before the computer goes to sleep?
I got a smart plug, installed python, and the python program that controls the plug
so I can now run a bat file with the line of
kasa --alias "speakerplug" off
to turn the speakers off, and "...on" to turn on.When the computer starts or I login, and the computer wakes from sleep: I want the command to turn the speakers on to run
When the computer shuts down and sleeps: i want the command that turns the speakers off to run
I'm finding solutions for each condition, except when I want the command to run when sleep is initiated. I want the computer to be put to sleep by any normal means and turn off the speakers when doing so,
There seems to be a program that only works for Windows XP era systems and doesn't work, and there seems to be a Windows 7 era program, but all download links are broken.
How do I run a command that is automatically triggered when the computer starts to go to sleep, and completes running before the computer goes to sleep?
My Computer
System One
-
- OS
- Windows 11
- Computer type
- PC/Desktop
- Manufacturer/Model
- "Selene"
- CPU
- AMD Ryzen 5 3600
- Motherboard
- Gigabyte A520I AC Mini ITX AM4
- Memory
- G.Skill Flare X 16 GB (2 x 8 GB) DDR4-3200 CL16 Memory
- Graphics Card(s)
- Dell OEM RX 5700
- Monitor(s) Displays
- LG 29UM69G-B 29.0" 1.5X Ultrawide 75 Hz Monitor
- Screen Resolution
- 2560 x 1080
- Hard Drives
- Intel 660p 1.02 TB M.2-2280 PCIe 3.0 X4 NVME Solid State Drive
Western Digital Caviar Blue 1 TB 3.5" 7200 RPM Internal Hard Drive
- PSU
- Corsair CX650M 650 W 80+ Bronze Certified Semi-modular ATX Power Supply
- Case
- Thermaltake Suppressor F1
- Keyboard
- SteelSeries APEX RGB Wired Gaming Keyboard
- Mouse
- SteelSeries Rival 300 Wired Optical Mouse
- Other Info
- SteelSeries Arctis 5 7.1 Channel Headset