Hello Home Assistant community!
I’m thrilled to introduce MQTT Alive Daemon v0.2.0, a lightweight go daemon I’ve developed to enhance the way Home Assistant interacts with our computers.
Key Features:
- Reports when the PC is on
- Reports the result of any custom command (super useful for checking USB peripherals, hard drive space, etc.)
- Integrates with HA seamlessly
- New in v0.2.0: Support for launchd and systemd for background running
I created this because I wanted to know when my computers were on and I was at my desk to automate my lights and manage desk electronics. The HA Ping and Glances integrations weren’t responsive enough, and Glances was using too many CPU cycles for my liking.
Use Case Example:
commands:
at_desk:
command: "ioreg -p IOUSB -l -w 0 | grep \"CalDigit Thunderbolt 3 Audio\""
device_class: "plug"
connected_to_monitor:
command: "ioreg -p IOUSB -l -w 0 | grep MG-XU"
device_class: "plug"
This allows my home to automatically manage my desk electronics based on my actual usage. It’s helped me save energy by automatically managing 3 speakers, a mixer, a monitor, lights, and various USB music peripherals.
Support: https://buymeacoffee.com/crmne
Contributions are welcome! I’d love to hear your thoughts, ideas for improvement, or how you might use this in your setup!