INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Turning on AV Equipment Automatically  (Read 7539 times)

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Turning on AV Equipment Automatically
« on: June 07, 2017, 11:31:17 am »

We're starting to think about how Engen and MC can help make it easier for a novice to get the AV equipment all turned on and set correctly.  This is an area that can cause a lot of frustration for new users.


SETUP
I'll use my own setup as an example:

My receiver is connected to a TV, using an HDMI cable

It has three possible inputs:

A PC

An IdPi

A Blu-ray Player

All three of these devices are connected to the receiver by HDMI.

They are plugged into a ZooZ Z-Wave power strip, so I can power them completely off (no standby power is used).  I can turn these on individually, using our software, Engen and Panel.

OPERATION
To play media from MC, a user of this system must:

1.  Turn on the power strip.
2.  Turn on the receiver (currently done with an IR remote)
3.  Turn on one input device (also done with the IR remote)
4.  Select the right input on the receiver (IR remote)
5.  For video, the TV must also be turned on.

Those steps are an obstacle.  If you miss any one of them, there is no joy.  We're trying to see if we can automate this and we could use your help in thinking it through.

PARTIAL SOLUTION
If music playback is started in MC, we should be able to check the Zooz to see the power state.  It provides total wattage consumed and power per plug, so we can find out whether anything is on, and can query individual devices.  We should be able to turn on what is needed.

We then need to send an IR signal to the receiver to set the correct input.  MC can do this with the remote control software support it has.

Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10968
Re: Turning on AV Equipment Automatically
« Reply #1 on: June 07, 2017, 11:44:32 am »

Steps 2 and 4+5 can in theory be done through HDMI-CEC, unfortunately graphics cards don't implement CEC, but there is gadgets that can do that, or well, one gadget - the USB CEC Adapter from Pulse8. They also make a special one for NUCs that plugs directly into the NUC instead of being an external USB dongle.

USB Dongle: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter
Intel NUC adapter: https://www.pulse-eight.com/p/154/intel-nuc-hdmi-cec-adapter

There is external software you can run to control the USB CEC dongle and instruct the devices to wake up from standby and switch inputs, or one could conceivably implement this into MC which could then also support using the TV remote to control Theater View through CEC, for example.

I use one of those dongles to put the TV into standby or wake it up as appropriate, because my TV doesn't even go into standby when the HDMI signal goes away, but I don't use the more advanced functions - this was all I needed. :)

Outside of controlling the power strip, its probably more of a MC topic then Engen, at least if you consider the HDMI-CEC approach.
Logged
~ nevcairiel
~ Author of LAV Filters

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Turning on AV Equipment Automatically
« Reply #2 on: June 07, 2017, 12:26:54 pm »

This begs the question:  Is JRiver going to produce a product that does remote control and home automation?  If so, you need to support IR sending and receiving.  You need a library of IR codes, a way to access them, and a way to learn new ones.

IR isn't going anywhere.  CEC is fine, but only supports a small subset of devices that might be found in the typical home theater.  IR is also very well known and "mature" in the sense that it's the defacto standard for wireless remote control and has been for what?...  35 years?

All of the functionality that you described above can mostly be done with a macro capable learning (or universal) IR remote control.  Of course a real software app that can control IR senders and receivers can do lots lots more!  It's potentially very exciting.  There are a good number of other home automation and remote control applications around, but none that really stand out.

The 300 pound Gorilla is, of course, Control 4.  But it's exceptionally complex and requires a great deal of operator (programmer) skill.  I haven't really examined the market in detail, but every time I search for these kinds of things, I find half a dozen products that are seemingly half baked.  Some focus on phone apps to do everything.  Some focus on automating the programs on your computer via remote control.  Some speak IR; none seem to do all of this.

I personally would be looking for a product that speaks IR, as well as RS-232, and TCP and is really home theater/home entertainment centric.  Just some thoughts.

Thanks for reading.

Brian.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Turning on AV Equipment Automatically
« Reply #3 on: June 07, 2017, 01:09:17 pm »

MC already supports IR, both sending and receiving.

The trick is to integrate the functions that Z-Wave supports.  It's able to flip all kinds of switches.  Play music, lights dim, fish tank bubbler quits, etc.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Turning on AV Equipment Automatically
« Reply #4 on: June 07, 2017, 05:22:11 pm »

IR control of devices was always meant to be a customized procedure. Audio and video manufactures try to make it universal by including codes for other devices for their remotes. But the codes are almost always inadequate for anything but the simplest system. Very few people are ever successful in using a TV or a receiver remote to control all the necessary functions.


If you are going to support IR/RF (RF for all those people who do not have direct line of site to their equipment) commands then, as Brian says, you need to supply codes a full range of devices.  Remote companies like URC and Harmony/Logitec do that, but it is a signficant amount of work. Even within the same company, different models of the their TVs use different IR codes.

Programming a remote control can be quite complicated if you have than one or two devices. Ideally you also need to know the state of each device, especially if it does not have unique codes for some functions, e.g. like most DVR boxes.

Harmony will automatically produce a set of code that runs in their remote, assuming they have all the IR codes. It works for simple systems but for more complicated systems it is often only partially successful. At that point, the user has to learn to program their remote through the Harmony software, which takes some effort.

Let me give just one example where things get complicated.  Say you want to use Amazon Prime or Netflix on your TV or on your Blue Ray player. Some devices have a single IR command to pull up that app. Most do not. So, you need to do some macro - like Menu, Down Arrow, Down Arrow, Enter, Left Arrow, Left Arrow, Left Arrow, Up Arrow, Up Arrow, Enter. That gets complicated pretty quickly.

And, unfortunately, there are still TOAD devices out that - that is, toggle only devices with no direct on/off code, just toggles. That is where the state of the device becomes important.

Other companies like URC, Control 4, Creston have their own programming languages and interfaces. These allow very customized systems, but can also be complicated to program. Most users will not be able to handle that programming.

I have a small side business programming remotes. I always ask people if they want to learn how to do it so they can make changes. Almost nobody ever wants to do that. For many, even doing Harmony is somewhat difficult. Now, many MC users are relatively sophisticated so could handle some simple Harmony like setup. But a large number of your users would probably not be able to do it.

Also people with real audio systems are probably not going things like a Z Wave power strip. They already had hundreds if not thousand invested in a power condition which often is not controlled by IR or RF. Some power strips will turn on with an IR code, but again, you need to somehow assemble those codes.

I suggest you find someone who does home automation with remotes on a regular basis. Other than being protective of their business, my guess is they will tell you it is often much more complicated than you may think except for a very simple system.   You might be able to do something for very simple systems, but to even do that you need the IR codes for the devices, which, as I said, are a lot of work to come up with.

You might want to go to RemoteCentral and browse the Customer Installer board to see what troubles professionals run into. Now, they deal with complicated systems, but you will start to see the issues.

Personally, I would not suggest you try to compete with the learning remote companies and custom installers. That leaves the installation with a TV, BR player, receiver and not much else. You might be able to do something there. But, honestly, Harmony is probably a better solution for those setups.

By the way, CEC can be very problematic. It does not always work across different manufacturers and sometimes not even within the same manufacturer. I would be careful about using it as a universal solution. Again, you can do some reading on RemoteCentral about it. Those guys are down on most new things, but they do have examples when it has proved very problematic for them.
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72534
  • Where did I put my teeth?
Re: Turning on AV Equipment Automatically
« Reply #5 on: June 07, 2017, 05:35:29 pm »

Lots of valuable feedback.  Thanks.

I realize that Z-Wave and AV device control seem worlds apart.  My bet is that they will eventually move closer together.  Control technologies that are more open and universal, when compared to IR, may eventually win.
Logged

dtc

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 3125
Re: Turning on AV Equipment Automatically
« Reply #6 on: June 07, 2017, 06:12:59 pm »

JIm - I'd love to see it work. The current remote/home automation world is way too closed and way too expensive. But, unfortunately, the main manufacturers do not make it easy.

Personally, I think the voice control systems are what will win - eventually. Two of my customers recently ditched my remotes for most tasks because they just talk to their Comcast remotes. 

I was in a friends rental home recently and closed caption was on in all 6 TVs in the house. I picked up a remote and went through the menus to turn it off. Another friend picked up another remote for another TV and said Closed Caption Off. Done.

I have two Ecobee 3 WiFi thermostats. The Ecobee 4 are just coming out, complete with Alexa Voice System built in. The Alexa is not just for the thermostats - it is full Alexa.  You might want to look at the concept as you look at automated devices. It does really seem like a great way to bypass the remotes, the PCs, etc. With Apple now in the fold, although obviously with a competing product, I think it is going to explode.

I am going to be out of a job soon. Oh well, time for more golf.

Logged

Mans

  • Galactic Citizen
  • ****
  • Posts: 418
Re: Turning on AV Equipment Automatically
« Reply #7 on: June 08, 2017, 03:20:18 am »

Super idea Jim, i'm already a fan :-)

I'm a recent user of MC(22).
Actually used WMC for the last 12 years.
And so i'm still struggling with some 3th party plug-ins and tricks - till there's a complete alternative from within MC :-)

Used to work with a RF/IR blaster and LM Remote to map keys, actions and create 'start-up and swich' activities.

Looking forward to see more from Engen and MC in the near future :-)

Thanks.
Logged

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Turning on AV Equipment Automatically
« Reply #8 on: June 08, 2017, 09:45:40 am »

Steps 2 and 4+5 can in theory be done through HDMI-CEC, unfortunately graphics cards don't implement CEC, but there is gadgets that can do that, or well, one gadget - the USB CEC Adapter from Pulse8. They also make a special one for NUCs that plugs directly into the NUC instead of being an external USB dongle.

USB Dongle: https://www.pulse-eight.com/p/104/usb-hdmi-cec-adapter
Intel NUC adapter: https://www.pulse-eight.com/p/154/intel-nuc-hdmi-cec-adapter

There is external software you can run to control the USB CEC dongle and instruct the devices to wake up from standby and switch inputs, or one could conceivably implement this into MC which could then also support using the TV remote to control Theater View through CEC, for example.

I use one of those dongles to put the TV into standby or wake it up as appropriate, because my TV doesn't even go into standby when the HDMI signal goes away, but I don't use the more advanced functions - this was all I needed. :)

Outside of controlling the power strip, its probably more of a MC topic then Engen, at least if you consider the HDMI-CEC approach.

HDMI CEC is a great idea but manufacturers have really botched its implementation.  I have the pulse eight adapter also (Which, as far as I can tell isn't being actively supported), and I've tried it on two separate TVs with no luck.  I've also read countless complaints on various forums about how its hard to setup, and never works quite right.  On my one successful HDMI CEC setup it took a month for it to randomly decide it wanted to start working.  If I were to go out and buy all new gear today I would assume that HDMI CEC is not going to work correctly with the pulse eight adapter, even if I spent tens of thousands of dollars.

Logged

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Turning on AV Equipment Automatically
« Reply #9 on: June 08, 2017, 10:10:32 am »

One capability I haven't seen anyone mention on this forums is that JRiver can also control external equipment via serial communication.  When I had JRiver setup like this, it was the most reliable remote setup I've owned.
Logged

Hendrik

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 10968
Re: Turning on AV Equipment Automatically
« Reply #10 on: June 08, 2017, 10:24:53 am »

HDMI CEC is a great idea but manufacturers have really botched its implementation.

I've obviously only owned a small list of devices, not many people have a very broad personal experience, but between the two TVs and two AV receivers i've had, and a bunch of source devices, at least the basics like turning devices on and switching input seems to work rather reliably. But maybe I just got lucky on that.
Logged
~ nevcairiel
~ Author of LAV Filters

jachin99

  • Citizen of the Universe
  • *****
  • Posts: 559
Re: Turning on AV Equipment Automatically
« Reply #11 on: June 08, 2017, 11:03:32 am »

I only got my TV, and computer to talk to each other on on installation, and i don't know how it happened.  I set it up, it didnt work for a while, then one day it decided to start working.  A big problem for me personally was that when i had A PC, and chromecast hooked up with CEC enabled, the chromecast would always change the input back to itself.  I also had a problem where each time i selected the input my PC was set to, the TV would change inputs, and register my PC on another logical port.  I still use CEC for my chromecasts but i also won't hook any other CEC devices up to a TV with chomecast on it.  Its a shame it doesn't work better because it is the perfect way to only have one remote. 
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 691
Re: Turning on AV Equipment Automatically
« Reply #12 on: June 08, 2017, 05:39:31 pm »

JimH, I have a post somewhere where I described a project with a similar goal to what you describe here - Press a button, music plays! Easy, huh?

I agree with all of the general statements here, esp. in regard to the challenges of IR programming and home automation. I'm going to outline the specifics of my system in the hope that it is useful to you all as you build and of general interest to the forum, feel free to split this post if I'm a bit off topic.

I got the single button control years ago from JRiver's Car Radio feature, but it first took flight when you all developed reliable windows command line switch control via Engen. Over the past year I added a lot of moving parts. It ended up a bit like the Johnny Cash Song, I built it "One…Piece…at a Time…"

Here I will outline the hardware and software I am using and what they do, and at the end some of the challenges and surprises. I find it tricky to describe everything in technical language, so thanks for reading along and bear with me!

My System:

Living Room Samsung TV => modest audiophile system
3 Zone Players

Hodgepodge of Sources:

Low Power PC running JRiver and control software, connects to DAC via USB
JRiver => Zone Players via Tuneblade Airplay
Chromecast videos
Amazon Prime video via Samsung Smart TV audio out via optical out
LP player
Pandora
Possible Bluetooth in future?

A lot of the complexity stems from wide variety of sources and from the streaming system, which captures audio from Windows Direct Sound (thank you Hilton!!!). My wife and I switch back and forth between Pandora and JRiver, and if both play simultaneously it causes domestic troubles. Also, I dont want video to stream audio throughout the house, so there has to be some separation via zones or inputs.

Control Hardware:

USB-UIRT: IR blaster and receiver
FLIRC: IR Keyboard Emulator, can associate any IR blast with keyboard shortcut (ie. Control-Shift-X)
Engen Switches: Aeon Labs switches and Engen scene controllers
Eventghost: This is the brains/nerves of the system. Eventghost runs in the background and detects events and keystrokes, sends associated commands and runs programs.
HDMI CEC: I just added this last month and use it exactly as Hendrik describes above, it helps turn the TV monitor on and off at the correct time.
Bluetooth Keyboard
TV Remote
Preamp Remote (Source Selection and Volume)

(I had at one time a HP JRiver remote, but I don't have one at the moment. I remember it having some issues with controlling volume when JRiver wasn't in focus. These could be resolved at the moment, I don't know.)

My original plan was to map all remote functions onto the Samsung Remote and use IR receivers and blasters to send commands. This didn't work because sometime the PC and TV could get different commands simultaneously, ie the arrows and enter keys would launch icons etc. Also Windows 10 focus issues made behaviour unpredictable, keyboard shortcuts would work on the desktop but not in JRiver and vice versa.

Then I tried complete Evenghost control, mapping a spare remote control to keyboard functions and commands. This works pretty well. An IR blast can send a message to stop all music, or turn off all the lights, etc. Or, Eventghost will take the event "System.unidle" when you touch the keyboard and then turn the TV on via HDMI CEC.

I also ended up building desktop icons which launched music playlists and .bat scripts. A .bat script would turn off the current music, check to make sure Tuneblade was working, play a new playlist, and then turn off the TV. Each script has a shortcut with a custom icon and they are all held together with the program Fences to keep the categories separate. It looks nice and is endlessly customizable.

Surprises and solutions

-Music won't play, again. Many moving parts mean many possible point of failure. I've tried to create some redundancies unique to my system as backups, also things like auto reboot and periodic program restarts.
-Forgetting what IR button I had mapped to a new function and why two weeks later - oops. I'm now avoiding remapping commonly used buttons like arrows and enter key.
-Eventghost only saves configuration on exit, so lots of work lost if I don't save. Solution was to use Eventghost to auto save and restart
-HDMI CEC: I was hoping to use some advanced functions to detect when I was using Chromecast and stop music playback, which many AV receivers do automatically but Audiophile separate components don't. Turns out you can't really get enough info out of the CEC feed into Eventghost to do this. But it may be possible, as the HDMI CEC terminal shows a lot of traffic.
-Sometimes USB-UIRT jams up and won't work. I think Eventghost hits it too hard sometimes, because adjusting the timing of IR blasts helped.

Thanks for reading this far! I'm aware that a lot of this is implemented in a way that is totally unique to my hardware and requirements. If any of this experimentation is help to Engen development, let me know and I can elaborate further.

Here are the features I commonly use that I think would be most useful to Engen AV control:

-IR libraries, IR learning and IR blasting
-HDMI CEC
-Engen Macros: The sequence is often important for powering up devices, also grouping commands together
-Conditional switching: If voltage flows through my LP player, that means it is on and you can turn on the amp and set the source correctly via IR.

Also, bonus could be:

-Engen sending command line argument or REST commands (this would enable Engen to control Eventghost, or possibly Phillips Hue etc). This could also be how you talk to MC, opens up the entire MCWS command library.

Good luck, can't  wait to see how things develop!
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 691
Re: Turning on AV Equipment Automatically
« Reply #13 on: June 08, 2017, 11:26:22 pm »

TLDR, I got all the gadgets. They work but don't always work well together. Lots of room for improvement in the coordination of control hardware.
Logged

drmimosa

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 691
Re: Turning on AV Equipment Automatically
« Reply #14 on: June 09, 2017, 06:54:33 am »

One more thing. One of the best things I've done with Engen and Eventghost is associate system states with Engen commands. So every time I touch the mousepad, 'system unidle' appears in Eventghost and Eventghost sends Engen commands to wake up the stereo.

It works really well because it is not tied to the Windows application in focus. It also means I only have a 5 watt computer running continuously.
Logged
Pages: [1]   Go Up