-
Notifications
You must be signed in to change notification settings - Fork 0
Some kind of power listening utility
License
dd86k/powerwatch
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
AC hum monitoring tool. In summary, this listens to an ALSA PCM capture interface and holds a memory buffer. If a power event happens, this utility will automatically dump the in-memory buffer into the disk. The goal of this project is to learn a little more on DSP and provide a monitoring tool for power events (flunctuation, brownout, or blackout). Needless to say, a laptop (or other battery-powered device) should be used. The code is in a bit of a rough shape, don't expect too much out of it. TODO: - Support hw: (and stereo) interfaces - Improve algorithm (currently unusable) - Increase FFT window, find peak, etc... - Do external action(s) on an event - ie, execute program/script in a new thread - $1: path to recorded event - $2: state (up/down) - $3: event type (when able...) - or do inline json (via stdio) with newline - Detect brownout and flunctuation events - Recover after sleep modes / interruptions LICENSE: CC0 1.0 Universal THANKS: pelp3;, cool_lantern, syncpulse # # Usage # Invoke with `--help` for usage. First, you can to list available capture devices: powerwatch list Then, use device to listen to: powerwatch listen --device=plughw:CARD=Generic,DEV=0 --verbose --binsize=128K # # Hacking # REQUIREMENTS: - DUB - A D compiler (dmd, gdc, or ldc) - ALSA static library - libasound2-dev (Ubuntu)
About
Some kind of power listening utility
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published