Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
simple CQC programming question
Hi All-
i've been dipping my toes in CQC off and on for a while now, but I have what I believe should be a relatively simple programming need--and I need a pointer in the right direction.

i have a serial connection to my TV, a Pioneer Plasma (PDP-6010FD), and an IP connection to my Onkyo Pre/Pro (PR-SC5508). We're currently using a Harmony IR remote for control but occasionally the Pre/Pro misses the On or Off command transmitted by the remote (we have an armchair that sometimes is perfectly positioned to block the IR transmission to the Pre/Pro).

I'd like some simple CQC-based automation that does the following:
  • When TV is powered off, wait 5 seconds and if the Pre/Pro is (still) powered on, turn the Pre/Pro off.
  • When the TV is powered on, wait 5 seconds and if the Pre/Pro is (still) powered off, turn the Pre/Pro on.

This means that we would not be able to have the TV off and the Pre/Pro on (say, to play music), but we never do that--the TV is pretty much always on when the Pre/Pro is on.

I started to look at EventTriggers but I wasn't sure how set a timer..

Any help or guidance would be appreciated

You wouldn't really need to use a timer or anything. What you'd do is put a trigger on the TV driver's power field. Set it to send out a trigger on any change. Set up an event in the triggered events. Set up the filter to watch for a field change event for that field.

When the event is triggered, the new value of the field will be available a a runtime value. So just do a pause for 5 seconds. Then you can look at the incoming value that caused the change. Use an If/Else to either turn the pre on or off, depending on the incoming value.

If you wanted to make it simpler, you could have two different events. Use the Is New Fld Vlaue For, and set up on to filter for True and the other for False. In each of them, sleep for Five minutes, then do a field write to the pre with the appropriate value for that particular event that got triggered (True or False.)
Dean Roddey
Explorans limites defectum

Possibly Related Threads…
Thread Author Replies Views Last Post
  SSL Certificate Question gReatAutomation 1 949 10-26-2020, 07:48 AM
Last Post: gReatAutomation
  V2 Question - OpenWeatherMap Using their New JSON Data Feed kblagron 7 2,125 05-07-2020, 01:40 PM
Last Post: Dean Roddey
  Dynamic Overlay Question bryanb 4 1,368 04-17-2020, 03:48 AM
Last Post: bryanb
  Simple device control from Admin Interface simplextech 7 3,155 01-04-2020, 12:18 PM
Last Post: simplextech
  Triggered Event on Timer Question znelbok 7 3,412 12-09-2019, 02:10 PM
Last Post: znelbok
  Question on CQC Driver Pack Install kblagron 1 1,305 11-26-2019, 06:38 PM
Last Post: Dean Roddey
  SONOS Driver Question gReatAutomation 13 5,673 08-23-2019, 12:37 PM
Last Post: Dean Roddey
  Insteon V2 Driver Question kblagron 1 1,274 08-01-2019, 10:51 AM
Last Post: kblagron
  Question on Parsing a String in a CML Macro kblagron 2 1,635 06-18-2019, 06:21 PM
Last Post: Dean Roddey
  ELK M1 Client Interface question lleo 1 1,333 06-12-2019, 08:15 AM
Last Post: Dean Roddey

Forum Jump:

Users browsing this thread: 1 Guest(s)