Experiments in controlling A/V equipment

Hello all!

This thread, and the linked Github repos, are to document my experiments in controlling A/V equipment from Hubitat.

This is an area of functionality that seems to be less developed (by Hubitat and the community) than things like lights, locks, motions sensors, etc. Hubitat supports some smart receivers, but not a lot else.

It's also only barely supported by the hardware companies themselves. Some TVs can connect to HomeKit, but open APIs are scarce. Some AVRs allow connection over telnet. Soundbars generally don't. Streaming devices are hit-and-miss for integrations.

My efforts certainly don't solve it all, but solved my own initial use cases. Hopefully they can provide inspiration so that either Hubitat or the community can develop a larger set of tools and unleash everyone's creativity.

My Immediate Goals

I wanted to integrate my home theatre with Hubitat/HomeKit/Alexa. For example, I wanted to be able to say "Alexa, turn on Apple TV". The following should happen:

  • The tv screen should turn on
  • The Apple TV should turn on
  • The HDMI switch should change to the input for the Apple TV

Other similar commands:

  • "Alexa, turn on cable"

  • "Alexa, turn on Nintendo"

  • "Alexa, tv off"


    To make this happen, I broke the work down into a number of subtasks, that could be developed/integrated/configured/tested individually.

    1. TV power needs to be controllable
    2. AppleTV power needs to be controllable
    3. Ability to control an HDMI switch from Hubitat
    4. Expose the HDMI switch to HomeKit
    5. Configure HomeKit with scenes for the AV equipment
    6. Integrate with Alexa routines

My Github repos document my development process, my thoughts, the hardware I built and the code I wrote. The starting point is here:


I control my Russound and most of my AV equipment with a combination of Telnet and webcore. The integration process has been difficult and painful. I have had to write most of my code, and publishing it for public use would be fraught with danger and difficult general integration. I echo your frustrations.

Yeah, there are just so many missing pieces right now. Ok, I had to write a driver for my HDMI Switch. But then there was no way to expose it to HomeKit, so I had to write that too. And then the HomeKit support for AppleTV was lacking, to put it mildly.

It seems that "smart" A/V is just way behind smart lights/locks/motion/etc. Most of the hardware is completely dumb, or locked behind proprietary APIs, or (in the case of my HDMI switch) has a serial interface but you have to do a lot of custom work to connect that up to anything useful. (And, there's no standards on the serial interfaces either. My code that works for my HDMI switch will likely not work with ANY other model of HDMI switch.)

Hopefully enough of us work through these issues that eventually we can form some kind of "standard library" of A/V integrations. And hopefully the hardware manufacturers will make progress. (Ha! Can it be monetized? No? Never mind.) :slight_smile:

1 Like

Miscellaneous ramblings from an avid Audio/AV hobbyist...
HDMI CEC sucks, it sucked when it came out, and it still sucks now.
I've never been able to get it to do anything reliable even on the most basic of systems, I even tried it again a few weeks ago on some very expensive gear, and it still sucks, so its disabled on everything I own like it has been for almost 10 years...

The most reliable AV interactions I have all connect to devices locally via IP, this includes a host of devices Hubitat already supports, Sonos, all the AVR drivers and the Global Connect devices, I'm sure I'm leaving something out.
Unfortunately devices that support these types of connections are not inexpensive and typically fall into the prosumer or integrator category.

I've wasted more money on universal remotes than I care to remember (an Original Pronto a Nevo, Harmonys and NEEOs) so I became a dealer for RTI just so I could have a full featured remote that might possibly be supported for more than a year or two, and I've not been disappointed in that investment so far.

For voice control of devices that Hubitat doesn't natively support look at direct support via your voice assistant of choice then use virtual switches to bring any events back into Hubitat.

There are IR controllers that work with Hubitat, but being fire and forget it's just fraught with sync issues and difficulty in programming...

Yep. That's my camp.

Planning to use my Harmony to its last breath, but hopefully I can buy a T4X (or whatever is the latest) from you when Logitech shuts it down for good.


My soundbar is one thing I haven't connected in any way yet. It's just too old. So I leave it on all the time, and at a reasonable volume level. I've thought about getting a newer one with Atmos, but hate spending that much money if it's hard to integrate. Maybe I should look at Sonos.

1 Like

Very happy our Sonos Beam. We use two IKEA Symfonisk bookshelf speakers for surround. Great for movies and music from multiple sources.

1 Like

How do you use these?

If you want relays and contact inputs that don't require polling you need to use the global connect series

1 Like

So to directly answer the question:

I am currently using the relay and contact input modules as part of an outdoor 2 zone av system that that has three potential inputs (a sonos connect, a bluetooth receiver and a nVidia Shield)
The zones consist of two independent 2.1 audio systems the subs of which live in a large buffet enclosure each with separate actuator controlled sliding doors.

I use three Bobwire DAT1's to monitor audio from the three sources.
These are wired to the CG module using GC ac/dc input sensors.
The GC relay outputs control SSR's that manage amplifier power as well as the door actuator circuit.
A monoprice 6 zone IP controlled preamp manages the audio routing.

A Hubitat C4 manages all the rules for these devices, the net effect of which being whatever audio input is detected turns on the amps, opens the door(s), switches the zone inputs ect...

A set of picos is used to control each zone audio level, source input and zone power when manual zone management is needed.
When the zone inputs are changed manually a dedicated IKEA Symphonic speaker announces the currently selected zone input.

So that's what I did with the dang thing...


Here's a path that can work: Use Control4! They've got AV nailed down. Configuring the system is like hooking up real components - ins to outs, amps to speakers, etc. Pay a remote dealer to add the components or Google is your friend in order to figure out how to do it yourself. Buy a Control4 EA-1 controller for <$200 on eBay. It's just gone EOL, is in plentiful supply, and has plenty of power. It will integrate with Alexa or Google natively ($125 per year). Or Apple Home via a $250 MSRP add-on driver. To integrate with Hubitat you'll need a $60 TCP/IP driver and patience to set up as many virtual switches as you want. The C4 remote controls are competent, if not great. If you want a number pad and don't want voice the older SR-260s are a good deal. The newer remotes include and are good for voice control of Apple TV and Xfinity.

1 Like

It's definitely an option. My father-in-law loves Control4, so he installed it for AV control in a home that I had already set up full Hubitat and Homekit. For my own home though, I'm heavy into Hubitat/Homekit/Alexa. And I hate (HATE) having extra remotes. I've worked really hard to make everything but my AppleTV remote hide in a drawer. But that's just me. I want one remote and one remote only. (Drives my wife batty, because multiple remotes don't bother her. "Joel, it's not that hard to use two remotes. Certainly easier than all this custom code and hardware you're building.")

1 Like

I get it, it's not for everyone. The new C4 remotes have voice control of AppleTV. It is a pass through, so it is native Siri. You can get Hubitat devices to show in C4. You need to go Hubitat→Home Assistant→C4. My lights are Lutron so I can skip HA for them.

1 Like

Raspberry Pi via cec-client. have used it for year and its can be a little slow but it works. You will need this for cross reference CEC IDs. https://www.cec-o-matic.com. They company that contributed libcec also sells a USB to CEC controller. Control your TV from Kodi, or vice versa! USB - CEC Adapter. Never tried it myself.