vickyg2003 wrote:cauer29 wrote:vickyg2003 wrote:Really a 15 second macro? Does anyone ever point the remote at their unit that long?
Well, not really a macro in the conventional sense, but a precisely timed IR sequence output by a home automation controller.
Ahh, so this isn't a human holding and pointing a remote, but some controller running through a set of instructions. I can see that working. Machines are trainable, my humans are not! I can't train my family to point the remote at the TV long enough to let a long macro finish, even if there are clear indications on the screen and the remote LED is still flashing. That's why I fell in love with extenders with the
fast macros. The macro failure rate dropped dramatically as the speed of the macro increased. Back in the Yahoo days, John Fine was always talking about macro speed when he was excitedly writing about his extender development, and yet it took me 6 years to actually try an extender. The concept of the fast macro was too foreign for me to understand what all the excitement was about. (Any wonder it took me so long to understand IRP, haha.) Of course once I used an extender I immediately fell in love. Back then we had a 13 step macro that would switch from DirectTV to Antenna. The unextended remote stepped through that slower than it would take me to do it by hand.

The first time my extender ran that same macro, I couldn't believe how fast it ran! I was even more amazed that my impatient jump-happy sports fans could now switch from Fox (antenna) to ESPN (Directv) without getting into trouble. I no longer was having to "fix" the TV several times during each game, when the menu was stuck on the screen. You would think that using that macro probably 50 times on a typical Saturday afternoon, they would shortly figure out that they needed to wait until the macro finished. But after 5 years, they were still having trouble and couldn't leave me in peace. After the extender came into play, they could actually watch tv un-aided unless there was too much beer involved.

That's why I was so surprised that you would need more than 15 seconds for a macro to run! Now I understand.
The macros need more than 15 seconds to run, not because of any limitations on the controller sending cmds, but due to various equipment receiving the IR cmds needing delays. The TV doesn't listen for IR cmds during the 5 seconds immediately following power on. So, if the controller senses that the TV is off at the start, it inserts a delay. It's not a simple wait though, during the delay, other tasks are done, such as turning on the AV receiver and getting it switched to the proper input configuration. Other equipment may also need to be powered on.
The TV requires a lengthy procedure that involves up to 6 cmds stepping through input selections to arrive at the desired input source. When stepping through the internal HDTV tuner selection, there has to be a 1.5 second pause as the TV will not respond to cmds during the 1.5 seconds immediately following landing on that input. Some devices using RC5 or RC6 (your fav) require special treatment to get around the toggle bit problem.
Implementing a one button power off is almost as challenging. Naturally, the controller has to be smart enough to sense the power state of equipment so that it doesn't send a power toggle cmd to a device that is already off. Other devices have discrete pwr cmds but with RC5 or RC6. The toughest nut to crack is the kid's PS3 since there is no discrete pwr cmd and there is not even a power toggle at all. It requires on the order of 10 blind IR cmds to have anything approaching a guarantee that pwr will actually go off. Even then certain apps like Netflix prevent any blind sequence from being 100% successful. It does have a touch sensitive button that if held for 2 or 3 seconds, is a force pwr off, but I haven't gotten around to rigging something up to simulate a user holding their finger on the touch sensitive button yet.
Before I came up with all of this I had a large card with step by step procedures of how to do various things for family members. This worked ok, but it ended up with the kids simply doing it all intuitively and not being able to explain to my wife how to get from A to B. So, she would just not use it unless it happened to be left in the state she needed. Next I graduated to JP1 macros with an unextended 8910 which seemed to have pretty fast macro execution compared to other JP1 remotes, but requiring the user to hold the remote pointing at the equipment for 15+ seconds, was not popular at all and without any state sensing, there was always the "harmony" problem where the power state would get out of sync and I'd already solved that problem for the upstairs TV with power state sensing. So, I took on the task of moving the macros to the home automation controller. It took a really long time to do that and without any widget or other way of recording what exactly was happening, it was very challenging. Along the way, widget and logic analyzer capabilities were acquired, but by that time most everything was working. It was a real eye opener to see the exact interplay between all of the pieces, once I got the logic analyzer.
At this point, the only remaining issue is the upstairs TV setup once a month or so, fails to pwr off the AV receiver via the home automation controller macro. Since there is power state sensing for the receiver, I may end up implementing a feedback system where it sends the discrete power off cmd and if it doesn't receive confirmation via state sensing, it sends it again. Still, that is a band-aid and doesn't actually fix the root cause of the issue, whatever it is.
The really cool thing about this whole system is that it is self-healing. That is, anytime things get out of whack due to some glitch (happens rarely) and what the user wanted to do didn't happen, simply pressing the button again corrects it with no idiotic Harmony questions about what is on and what is off. Currently the downstairs system hiccups maybe once or twice a year and the upstairs system once a month. Once a month is annoying enough to me and irritates my wife sufficiently that I need to fix it.
A.A.