CCOSTAN / Home-AssistantConfig

:house: Home Assistant configuration & Documentation for my Smart House. Write-ups, videos, part lists, and links throughout. Be sure to :star: it. Updated FREQUENTLY!
https://www.vCloudInfo.com
Other
4.77k stars 509 forks source link

Mute PC at bed #723

Open CCOSTAN opened 4 years ago

CCOSTAN commented 4 years ago

Need to figure out a good way to mute PC at night to not wake the kids on alerts.

Would love to have it HA aware but at a minimum, some sort of scheduled task.

255

pinkywafer commented 4 years ago

I use eventghost... you can set it up to expose any command you like to rest commands, then control with home assistant

CCOSTAN commented 4 years ago

Ahh.. That's a Good Idea. https://www.youtube.com/watch?v=jG8TN0YvRNY

YouTube
Use Home Assistant to turn your computer on and off
In this video, I’m going to show you the method that I personally use to send commands from Home Assistant to a Windows computer. So you can do things like t...
CCOSTAN commented 4 years ago

@pinkywafer Do you have any links to code in your repo with examples?

CCOSTAN commented 4 years ago

https://github.com/EventGhost/EventGhost/releases

GitHub
EventGhost/EventGhost
EventGhost is an advanced, yet easy-to-use extensible automation tool for Windows. - EventGhost/EventGhost
pinkywafer commented 4 years ago

I don't, the rest commands are all in secrets, but none are set up normally - you can configure eventghost to do them as you like. With eventghost installed, on the configuration tree, you need to have a webserver plugin set up on autostart. You can use any port you like. Then you create a macro for each event you want, hit new macro, find one of the mute options and add it. then you add an event to that macro. call it eg HTTP.mute and you're done. accessing http://<<pc_ip_address>>:<<chosen_port>>/?mute will activate it, so in HA you just need to call a rest command for it in your automation

pinkywafer commented 4 years ago

I've just looked at the video, and that is waaay more complicated than the method I'm using. In my method, eventghost is just running a webserver and that's it... no join or any of that!

CCOSTAN commented 4 years ago

Ooh I like that method. Agreed. With the WebServer plugin, you can pretty much control it completely with REST commands. Love it. All my automations will be HA controlling the PC so this seems like a perfect fit. Thanks for the inspiration! Stay tuned for a video on it.

pinkywafer commented 4 years ago

hang on though.... I've just found the eventGhost MQTT plugin!... investigating now!

pinkywafer commented 4 years ago

ok... FYI: I have managed to set up a mute / unmute in eventghost using MQTT, with autodiscovery (not really needed, but I had to try!!) It's a little bit more involved than the HTTP version, but it does give you full feedback to Home Assistant as well! If you're interested, I'll send you a how to!

CCOSTAN commented 3 years ago

I think this might be a contender for PC control.

https://system-bridge.timmo.dev/

System Bridge
A bridge for your systems.