Bringing some of it together. Media, lights, Blinds and simple Automation

 In the last post I was mainly talking about the Kitchen. I did that mostly because it gave me the opportunity to talk about different ways that you can decide to control your lights. Smart Lights themselves, or use Smart light switches.... but now I'm going to go back to the living room.

If you remember I have an LG TV, 2016 model, and a Denon X1500H Amplifier. LG now have HomeKit complaint TV's, but have decided to not support their 2016 models... indeed, they have been on and off again with regard to their 2018 models. So I have no chance... which is annoying as I want a 3D TV, and 2016 was the last year that the major manufacturers produced 3D TV's.... although it's not so uncommon in projectors.

The Denon AVR is Airplay 2 compatible, but I can't control the amp from HK except to send audio to it.

So, what to do?

May I introduce you to Homebridge?

Homebridge

Homebridge is an interesting open source project and has come on leaps and bounds since I've been playing with it. It is based on nodejs and, essentially, provides an environment where people can integrate non-Homekit products into Homebridge which then get presented to HomeKit as non-certified devices. Interesting enough, they actually say that their intention is to not exist... because you won't need it any more.

It runs on a number of platforms. Mine runs on my Macmini, which runs as my media server. However, it can also run on a Raspberry Pi and, if you aren't that technical, there is HOOBS (Homebridge out of the Box). There are other hubs that use it as a base too, such as Starlinghome which apparently does an excellent Nest integration, and definitely Soma who do an automation for various forms of blinds.

When I first started mine, it was to be able to integrate my LG TV and my Denon AVR. It was all very technical then, all very much on the command line and you have to modify JSON files, essentially the configuration, yourself.

Now it has got much more sophisticated as there is a GUI and a lot of the guess work is removed from you.


This shows the 3 main plugins I'm going to talk about here. The first is the UI. Obviously it is providing the UI, but also enables you to run Homebridge as a service in the background, rather than from the command line. There is little to tell here, in terms of setup. You can pretty much take the defaults. However, it has made a huge change in usability of homebridge. I'm not going to go into how you se Homebridge here, there are plenty of tutorials on the net about it and, if you are a little scared, then I really suggest HOOBS. It's a package deal, and you get support.


This, though, shows you the main screen on my homebridge instance. Notice how long it's been running's and that last server reboot (12 days) was because of an OS upgrade and the homebridge (3 days) was because of a plugin upgrade.

So, why do I want to control my AVR and my TV? Well, basically so I can include them in an Automation.

In iOS14, my Living Room looks like this:


Pretty much everything you see here is going to be included in what I talk about next.... except the lights.

The tv is the AirPlay 2 instance, as is "Amplifier". They just show up in the UI. The fan is actually a Hunter Symphony Fan, and is a native integration. However, "Telly" & "Denon Amp" are via Homebridge, and the Blind is a custom blind from Leviosa Shades for my 12ft wide living room window. Their hub runs on a Raspberry Pi and, again, is not certified.

The TV now gives me complete control. I can actually fire up LG apps if I want, but I'm essentially using my TV as a monitor. So, when I select the controls for the TV, what I get is:


 The ability to turn it on/off and select the HDMI input I called Amplifier as well as run the application called Screen Share. Personally I have no need for Screen Share, but it is there just incase I have some weird friend who uses Android. The point is, I now get the on/off status of the TV.

My AVR, "Denon Amp", also looks like this (Don't be confused about the TV icon, it's because ether screen shot is from macOS Catalina) :


Again, I have On/Off, but now I can select the input as well. If I wanted to, I could also add volume but I'm figuring I'm in the room so no real need.

All of the inputs I have are:

  • Airplay
  • AppleTV (Which is my default)
  • Aux1
  • Blu-Ray
  • Phono
  • Tuner
  • USB/iPhone (Which is a direct plug in)
Now I've really got control of my multi-media experience in the living room.

Simple Automation

If you remember, from an earlier post, I had set up HDMI-CEC to co-ordinate the turning on/off of all my multi-media appliances. Now, though, I know their status. This means I can automate:




I have a folding around my living room. I've used it for two things:
  1. to mount by side and rear speakers
  2. to run two Philips Hue Lightstrips to give me a complete 360 degree uplighting.
As you can see from the video, when I turn on the TV, the Lightstrips come on, and the blind closes. This happens no matter the time of day.

How do I do this? It's a simple automation inside HomeKit. The logic is:

When 
    accessory "Living Room Telly" has status "on"
Then
    Turn on "Living Room Lightstrip" to 51% (Lightstrip is a group of the two light strips)
    Close the "Living Room Blind"
End



So, you would probably assume that turning off the TV would would do the opposite. And so it does.... except you don't want that to happen at night. you want the Blind to stay down and the light strip to stay on. so now the logic looks like:

When
    accessory "Living Room Telly" has status "off"
    From "30 minutes after sunrise" to "30 minutes before sunset"
Then
    Turn off "Living Room Lightstrip" (Lightstrip is a group of the two light strips)
    Open the "Living Room Blind"
End


 

Comments