Audio activity monitoring tool for Windows (WASAPI/ASIO) with HTTP notification support and Home Assistant MQTT integration.
- ✅ Monitor WASAPI devices (Windows Audio Session API) - standard Windows audio devices
- ✅ Monitor ASIO devices - professional low-latency audio interfaces
- ASIO devices can be detected through input monitoring - the application uses silent capture to activate audio metering
- ✅ Monitor multiple devices simultaneously
- ✅ Send HTTP requests when audio starts (ON) and stops (OFF)
- ✅ Configurable delay before sending OFF signal
- ✅ Real-time peak level monitoring for LED control
- Peak values are smoothed by sampling every 10ms and sending averaged values
- ✅ Home Assistant MQTT Discovery integration
- Binary sensor with device class "sound"
- Automatic discovery - no manual configuration needed
- ✅ System tray icon with context menu
- ✅ Pause/resume monitoring
- ✅ Modern settings interface with tabs
- ✅ Configurable audio detection threshold to filter background noise
I use SoundWatcher to automatically power on my Yamaha HS-80 studio monitors only when needed:
This works by sending HTTP requests to a Sonoff switch running Tasmota firmware:
As a bonus, an LED strip controlled by Tasmota pulses to the music:
- Windows 10 or newer
- .NET 8 Runtime (Desktop) - https://dotnet.microsoft.com/download/dotnet/8.0
One of the following:
- .NET 8 SDK - https://dotnet.microsoft.com/download/dotnet/8.0 (Recommended)
- Build Tools for Visual Studio 2022 with ".NET desktop build tools" component
Don't have .NET 8 SDK? Run download-sdk.bat - it will open the download page.
Full installation instructions: INSTALL_SDK.md
build.batThe script will automatically detect available build tools (.NET SDK or MSBuild).
Create a single EXE file with all libraries:
publish-single-file.batOutput: bin\Release\net8.0-windows\win-x64\publish\SoundWatcher.exe
- Size: ~950 KB
- Portable: Single EXE file, icon embedded, no dependencies
- No PDB: Debug symbols excluded from release build
- Requires: .NET 8 Runtime installed on the system
Create an EXE file with embedded .NET runtime (works without .NET installation):
publish-standalone.bat- Size: ~70-80 MB
- Requires: Nothing - works immediately
Using .NET SDK directly:
dotnet build -c ReleaseSingle-file publish manually:
dotnet publish -c Release -r win-x64 --self-contained false -p:PublishSingleFile=trueManually using MSBuild (requires VS 2022 Build Tools):
msbuild SoundWatcher.csproj /p:Configuration=Release /restoreExecutable is located at:
bin\Release\net8.0-windows\SoundWatcher.exe
Copy the entire net8.0-windows directory to your desired location.
Executable is located at:
bin\Release\net8.0-windows\win-x64\publish\SoundWatcher.exe
Copy only the SoundWatcher.exe file to your desired location - no other files needed.
- Run
SoundWatcher.exe - Icon will appear in the system tray
- Right-click the icon → Settings
- Configure:
- Audio Devices: Check the devices you want to monitor
- HTTP Notifications: Enter URLs for ON/OFF notifications
- Timing Settings: Set check interval and OFF delay
- Home Assistant: Configure MQTT connection (optional)
- Click Save
To see real-time logs:
cd "d:\dev\soundwatcher"
dotnet runOr run the compiled exe from terminal:
cd "d:\dev\soundwatcher\bin\Debug\net8.0-windows"
.\SoundWatcher.exeLogs are also saved to:
%APPDATA%\SoundWatcher\soundwatcher.log
- Turn ON - Manually send ON notifications
- Turn OFF - Manually send OFF notifications
- Pause Monitoring - Pause/resume monitoring (icon shows white pause overlay when paused)
- Settings - Open settings window
- Exit - Close application
Settings are saved to:
%APPDATA%\SoundWatcher\settings.json
{
"OnUrls": [
"http://192.168.1.10/cm?cmnd=Power%20ON",
"http://192.168.1.20/webhook/audio-started"
],
"OffUrls": [
"http://192.168.1.10/cm?cmnd=Power%20OFF",
"http://192.168.1.20/webhook/audio-stopped"
],
"OnUrlsEnabled": true,
"OffUrlsEnabled": true,
"VolumeUrl": "http://192.168.1.30/?m=1&d0={VOL}",
"VolumeUrlEnabled": true,
"VolumeUpdateIntervalMs": 120,
"CheckIntervalMs": 1000,
"TurnOffDelayMs": 30000,
"AudioThreshold": 2.0,
"MonitoredDeviceIds": [
"{0.0.0.00000000}.{device-guid}"
],
"MonitoringEnabled": true,
"MqttEnabled": true,
"MqttBroker": "192.168.1.100",
"MqttPort": 1883,
"MqttUsername": "",
"MqttPassword": "",
"MqttDeviceName": "PC Audio Monitor"
}The VolumeUrl supports a {VOL} placeholder which is replaced with the current peak level (0-100):
http://192.168.1.219/?m=1&d0={VOL}
This is useful for controlling LED strips or other devices that respond to audio levels.
The application dynamically adjusts its checking interval to minimize CPU usage:
- Audio OFF: Checks every 1000ms (check interval)
- Audio ON without peak monitoring: Checks every 1000ms (check interval)
- Audio ON with peak monitoring: Checks every 120ms (peak update interval)
MQTT state changes are only sent when the state actually changes, not on every check.
- ❌ Dependency on CSCore.dll
- ❌ Dependency on bass.dll
- ❌ Requirement for Visual Studio to build
- ❌ .NET Framework 4.5.2
- ✅ Direct P/Invoke for WASAPI (no external DLLs for WDM)
- ✅ Input device monitoring via silent capture (enables IAudioMeterInformation)
- ✅ ASIO support (via NAudio.Asio)
- ✅ Multi-device selection
- ✅ .NET 8 (modern, faster, better support)
- ✅ Tabbed settings interface
- ✅ URL testing from settings
- ✅ Better OFF delay management (cancels when audio detected again)
- ✅ Peak smoothing for LED control
- ✅ Configurable audio detection threshold
- ✅ Home Assistant MQTT Discovery integration
- ✅ Enable/disable individual URL groups (ON, OFF, Peak)
.
├── Audio/
│ ├── WasapiInterop.cs # P/Invoke for Windows Core Audio API
│ ├── WasapiMonitor.cs # WASAPI device monitor
│ ├── AsioMonitor.cs # ASIO device monitor (NAudio)
│ └── AudioMonitor.cs # Unified monitor (WASAPI + ASIO)
├── Configuration/
│ └── AppSettings.cs # Configuration management (JSON)
├── Network/
│ └── HttpNotifier.cs # HTTP notification sender
├── HomeAssistant/
│ └── HomeAssistantMqtt.cs # MQTT Discovery integration
├── Logging/
│ └── Logger.cs # Dual console+file logging
├── UI/
│ └── SettingsForm.cs # Settings interface
├── Program.cs # Entry point + system tray
└── Resources/
└── AppIcon.ico # Application icon
- Make sure ASIO drivers are installed
- Some ASIO drivers require administrator privileges
- ASIO devices can be detected via input monitoring
- Check URLs in "HTTP Notifications" tab
- Use "Test ON URLs" / "Test OFF URLs" buttons
- Check firewall/antivirus settings
- Increase "Check interval" in timing settings (e.g., to 2000ms)
- Disable peak monitoring if not needed
- The application uses silent capture to activate metering
- This works for most devices, but some drivers may not support it
This project uses:
- MQTTnet (MIT License) - https://github.com/dotnet/MQTTnet
- NAudio.Asio (MIT License) - https://github.com/naudio/NAudio
AIAC
Rebuilt from .NET Framework 4.5.2 to .NET 8


