Jump to content
C4 Forums | Control4

Programming Delay


Recommended Posts

I have a situation where the programmed delays don't appear to be run properly all the time.

If the room starts on, the code runs ok
If the room starts off, the delays seem to be ignored

Any thoughts on why and how to resolve?

 

Scenario:

I use Roku for YouTube and Netflix, but here in New Zealand many of the other apps we use are not available on Roku so I need to use either Apple TV or my Panasonic TV.
But to cater to my watch list, I use the Roku Mini apps for these others anyway.
Along with some code on the 'When the video selection changes' function

example:
If I am already watching TV and I choose 'Neon', I can clearly see the TV's IR bug send a command, wait 3 seconds, send the home command, wait 3 seconds and send the Enter command. I think get NEON.

If the TV is off and I select 'Neon', I can see a long glow of multiple commands with no delay. I am left with the home menu.

It has worked fine in the past.

I've rebooted but no change.

image.png.22515c69114e97b45f7fe205f58a41ca.png

Link to comment
Share on other sites


1 hour ago, South Africa C4 user said:

What event is this programmed against?

When room video selection changes

image.png.eb36f0f9f5f0971a7b1ddaea84de9d19.png

1 hour ago, South Africa C4 user said:

Have you tried running this code direct from Composer with the room off?

Running this code from composer with the room off does not do anything, all the if statements are looking at the selected video device - when room is off, nothing is selected.

 

 

Link to comment
Share on other sites

4 minutes ago, msgreenf said:

why do you even have this code? this looks like all stuff that should work without any code

I hope you are right - perhaps there is a better way?

I use ROKU for Netflix and YouTube - using the mini-apps - no coding required - just works!

I use my smart TV for TVNZ and NEON
I use AppleTV Gen 3 for Disney+, Prime and Apple movies etc.

To have TVNZ, NEON, Disney+, Prime on my 'Watch' list, I have used some mini apps linked to ROKU channels and added this code to run the TV IR commands when that selection is made.
Note: my TV does not have direct IR codes for the apps, this is why I run the sequence of commands with delays.

Cheers.

 

Link to comment
Share on other sites

I haven’t given this much thought... as is clear from my first question above... but I suspect you may need to add a delay before any of the rest of the code (start with a long delay - say 20 seconds - I.e. make the very first line of code before the ifs a 20 second delay) and if this works, reduce it until you get an optimum result (as shot as possible but it works on a stable basis )...

Just a thought and it may not work.

Link to comment
Share on other sites

2 minutes ago, South Africa C4 user said:

I haven’t given this much thought... as is clear from my first question above... but I suspect you may need to add a delay before any of the rest of the code (start with a long delay - say 20 seconds - I.e. make the very first line of code before the ifs a 20 second delay) and if this works, reduce it until you get an optimum result (as shot as possible but it works on a stable basis )...

Just a thought and it may not work.

I'm just playing with this idea now.

My TV's driver has a 13 second delay built in, but even this seems to be ignored in some instances.

Will run some more testing over the weekend.
For now, I have America's Cup racing to watch.

 

Link to comment
Share on other sites

After a few trials, I have done the following:

Removed the built in delay within the TV's driver.
Moved all my code to a macro.
Added a variable to record if the TV is 'powering up'
Added delays to the macro based on the above variable.

Commands seem to be a bit more consistent now.

 

I'm really not sure what has changed, as this was all working fine for a long time.

My theory is:
The programmed commands are all queued and because they are for the TV, they don't run until the TV driver's in built delay is expired.
However the programmed delays are probably started immediately, therefore all expired prior to the tv driver delay.
Resulting in all commands running one after the other without delay.

------------------------------------------------------------------------------------------------------------------

New macro:

image.png.7ecc4f22cd94130c2efe05171ee9cac2.png

Link to comment
Share on other sites

Sure is!
The apps on the TV are pretty average to be fair, they are unresponsive when the TV first turns on for anywhere from a few seconds up to about 12 seconds - which is why the big delay.
button clicks are slow, the menus movement is not smooth, and they even freeze sometimes.

While on the other hand, Apple TV and Roku are smooth and very responsive.
I'm just waiting for the day Roku is available in NZ and all our local content is available....

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

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