Jump to content
C4 Forums | Control4

SOLVED: How to stop script if it detect's TV is already on?

Recommended Posts

Here's my scenerio:

I have the TV in my living room scheduled to turn on @ 4:30 pm and select my MCE as the source. at 4:31 i have a task scheduled to run to launch MCE and auto play in slideshow mode. this makes my TV turn into a large digital photo frame. since i have my TV over my fireplace, it looks very cool.

what im having trouble with is if my TV is already on, i want the script to end without executiving.

My TV is a Samsung UN46C7000WF and does not have a Serial Port. i'm using IR from an IO Extender to control it.

is there anyway for Control4 since that what i'm using to control everything with to recall if the TV is turned on?

or any other suggestions on how to do this?

Link to comment
Share on other sites

Couple of thoughts...

Do you have discreet power on / off ir codes? or is it a toggle?

You could use voltage sensing outlet switches to determine if the tv is on.

You could also use the video sense inputs on a 300 to see if video is being sent, but that would require the tv switch to that input.

Also, it looks like in your programming, you don't have the turn on tv under the if statement, drag it so it is indented under the if statement.

Link to comment
Share on other sites

the codes are descreet, unfortunately i can't use the video sense input on the 300 since i have all of my video distriputed through an HDMI matrix.

i thought about the boltage sensing outlet but i figured i would see if their was a programing solution first.

apologize for my lack of knowledge,

what do you mean by this? "you don't have the turn on tv under the if statement, drag it so it is indented under the if statement?" how do i indented it?

Link to comment
Share on other sites

I just looked at your screenshot. What you have would work fine if your statements were nested under the conditional.

Just drag the second line of code up, and drop it ON TOP of the question mark. You'll see the little arrow point to the right. When you drop it there, it will become "nested" underneath it, and only execute if the conditional above it is met. Do that with both the actions. Then it will work fine.

The way you have it now, every line of code executes, regardless of whether or not the conditional statement is meant.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.