Kodi Community Forum
Automating HTPC setup questions - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Video Support (https://forum.kodi.tv/forumdisplay.php?fid=264)
+--- Thread: Automating HTPC setup questions (/showthread.php?tid=371047)



Automating HTPC setup questions - Shredder_guitar - 2023-01-01

I'm at a point where i have my kodi setup pretty close to the way i want it and is stable (....most of the time). I've recently started diving into Home Assistant: home automation and I am wanting to fully automate turning on and off both my TV and HTPC at various points in the day. After researching, I'm of the understanding that turning off the machine isn't the difficult piece...it's turning it back on again that seems to be the challenge. 

The process i have for turning off the machine through home assistant is sending a switch to turn the machine off and configuring the TV to power off after 10 minutes. I'm able to do that now and it seems to work well enough. 

My question is surrounding the powering on and off of the TV in a controlled fashion and a process in which to do that, that will also play well with Home assistant. I am able to power on my HTPC without any issues...but I also would like to be able to remotely power on and off the TV through automated process and the only way i have seemed to find to do that is by basically making the TV a 'slave' process to what the HTPC is doing...i.e. if the HTPC is powered on, then turn the TV on...If the htpc is powered off, then auto power off the TV based on the configured setting in the TV. This isn't the way i want to go about it..but seems to be the only way that i have found. 
 
It seems that the only way to even come this far is to add a USB CEC device that will allow the TV to recognize when the HTPC is powered on and off...Overall, I'd prefer not to add another device in the chain if i don't have to as i feel it would degrade HDMI signal quality and amazon reviews seem to state that this device seems to perform as "hit and miss". Also, I have found a setting in the Bios of my motherboard that says 'CEC Ready enable/disabled'...I set it to enabled, but that didn't seem to do anything. 

My questions are....
What do most people do to accomplish automating their HTPC/TV setup?
Does anyone know what the bios setting i mentioned actually does? I can't seem to find info on the internet about it anywhere other than, that it exists as a setting?
What are experienced kodi users experience with the USB-HDMI CEC Adapter Device for those that have purchased it for the use of automating their setup?
Does it, in fact, degrade the signal noticable?
For those that have used it...Have you used it with an 'arc' surround sound setup? Does it work? 
Has anyone attempted to use the CEC Adapter device with Home Assistant? Does home assistant allow functionality to the CEC Adapter? If so, how were you able to set it up? Resources/Documentation Links?

Here is my setup
Vizio M55-E0
https://www.displayspecifications.com/en/model/3f3fb8a

PC is custom built.... MSI mobo and an 8 GB Nvidia Graphics card

Amazon link to CEC adapter
USB HDMI CEC Device


*Edit* A small update. I have literally just discovered that depending on HOW the device is set up in Home Assistant will determine what options you have available to work with. I had set my living room TV up through the HomeKit Controller integration, and also through the Vizio integration. Upon further researching, I found that if i use the wake_on_lan add_on and have my TV hardwired through ethernet then Home assistant provides the option to Power on and off the TV which is EXACTLY the ability i was looking for, with the added benefit of not having to purchase any additional hardware. 
I now have to figure out a similar situation with my Sharp Roku TV...perhaps it will be a similar situation where it needs to be hardwired, but i was only able to discover the TV through a Homekit Controller integration, which doesn't seem to provide the option of powering on/off the TV...to be fair it's not hardwired at the moment, so maybe that's something. Home Assistant is still much of an Enigma to me.


RE: Automating HTPC setup questions - brazen1 - 2023-01-01

(2023-01-01, 03:00)Shredder_guitar Wrote: What do most people do to accomplish automating their HTPC/TV setup?

I'm using a completely different approach for over a decade, and I'd bet I'm the only person in the world automating my setup the way I do mostly because I had the hardware laying around and the time and ambition to tinker.  I'm sure there are other ways, but this works for me faithfully:

Harmony 900 remote control.
X-10 Transmitter module
X-10 IR Momentary on/off switch module.

I soldered the momentary switch + and - leads to my HTPC manual on/off button using an RCA female connector mounted at the rear of the case for the momentary switch male to plug into the HTPC. 
I plugged the Transmitter and momentary switch modules into the wall plugs.

I pick up the remote and press 1 button and set the remote down and this is what happens:

I programmed the Harmony 900 with a 'HTPC' activity macro sequence to send an IR signal to the momentary switch which simulates pressing the HTPC manual button and the HTPC turns on.
Included in that same macro sequence are commands sent to the display, AVR, bass shaker amp, subwoofer, lighting, etc.  Each device is turned on and adjusted for the environment they are going to duty - 'HTPC' in this case.  Some of these devices use X-10 IR appliance modules to turn them on/off independent of each other depending on the activity used. 
When Windows has booted, task manager applies a 'Start Kodi' command and Kodi initiates.

Everything happens with one press of a button on the Harmony.  The same can be said for other Harmony activities such as 'Cable TV', 'OTA TV', 'Xbox', 'PC Only', etc.  Certain devices will be turned on and others remain off depending on the activity selected.  What is being used is adjusted for the duty it will perform.  The Harmony database for devices is extensive making the programming fairly easy when creating activities.  I use the 1 Harmony remote to control every aspect of my home theater and have complete control including on-the-fly adjustments of everything.  No other remotes are used at all.  That said, Logitech does not manufacture remotes anymore.  I should purchase a backup used someplace.

I don't like to leave any equipment on or in standby when I'm not using them.  
When I'm done using Kodi, I select Exit and press Enter on the Harmony which is a home menu item in the Kodi home page GUI and Kodi closes properly.  I can either continue to use the Windows HTPC for other PC duties or shut it down too.  If I wasn't going to continue using Windows, I suppose instead of using the Quit function in Kodi, the Shutdown Kodi and Everything Else (or whatever it's called) could be selected instead.  

But I prefer to use the Exit button on the Harmony which is mapped to Alt + F4.  This brings up a Windows Shut Down pop-up window.  I press Enter and the HTPC turns off.  Then I press the Harmony Off button.  This turns off all the equipment the Harmony turned on during the start of the 'HTPC' macro sequence.  So, 3 remote control button presses, and everything is Off.  The same is true for other activities although they only require 1 button press because Kodi and the HTPC aren't in use.