Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
squirreltown
Roku Guru

Prevent Black Screen or Timeout

Search the forum for "ECP" you'll find several discussions of this.
Basically the box sends itself a simulated remote keypress over TCP. Probably should make it less then five minutes since that's the minimum time the Roku can be set for before the screensaver kicks in ( that's the black screen you are seeing).
Kinetics Screensavers
0 Kudos
32 REPLIES 32
renojim
Community Streaming Expert

Re: Prevent Black Screen or Timeout

The minimum screen save time has been changed to one minute with the 6.1 firmware. I wonder how many channels using the ECP trick to disable the screen saver that will affect.

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos
Komag
Roku Guru

Re: Prevent Black Screen or Timeout

I searched ECP but all the posts are cryptic and hard to understand for me. If I only want to use this trick, is it pretty straightforward?
0 Kudos
squirreltown
Roku Guru

Re: Prevent Black Screen or Timeout

"renojim" wrote:
The minimum screen save time has been changed to one minute with the 6.1 firmware. I wonder how many channels using the ECP trick to disable the screen saver that will affect.

-JT

I would guess every single one that the user sets it below 5 minutes. Of course Roku doesn't let us access what that setting might be ( ifIcanHazFeature().screensavertime), so now we have a much higher possibility of annoying the user or making them think something was written wrong by the developer, because that was my reaction the first time I saw that black screen. I really wonder what pressing need there was to change that.

Komag - yes it's very simple, get the box ip from devinfo, and urltransfer post from (empty) string to the address with the ECP command. if you go back far enough you'll find a function posted by renojim(?) that I've been using.
Kinetics Screensavers
0 Kudos
Komag
Roku Guru

Re: Prevent Black Screen or Timeout

Thanks, I think this is it:
viewtopic.php?f=34&t=55236
0 Kudos
destruk
Binge Watcher

Re: Prevent Black Screen or Timeout

"renojim" wrote:
The minimum screen save time has been changed to one minute with the 6.1 firmware. I wonder how many channels using the ECP trick to disable the screen saver that will affect.

-JT



One Minute? Why not set it to immediate screensaver? It wouldn't be so much of a problem if the screensaver didn't screw up some roScreen displays. Maybe they fixed that, but prior using a doublebuffered roscreen for a custom menu system if the screensaver turned on it'd destroy the graphics display you had up for our channels.
0 Kudos
NewManLiving
Visitor

Re: Prevent Black Screen or Timeout

Some things that were shared on other threads. Don't know what support the GetScreensaveTimeout has but it works on what I have

The undocumented roAppManager.GetScreensaverTimeout to get timeout values
and a function to send a message at the interval returned by the above function with a global timer should do it
Function channel_wake_up_box() As Void

l_utr = createObject( "roUrlTransfer" )
l_utr.SetUrl( "http://localhost:8060/keypress/Lit_+" )
l_utr.PostFromString( "" )


End Function
My Channels: 2D API Framework Presentation: https://owner.roku.com/add/2M9LCVC
Updated: 11-11-2015 - Completed Keyboard interface
The Joel Channel ( Final Beta )
0 Kudos
Komag
Roku Guru

Re: Prevent Black Screen or Timeout

Ah, that script works great, no more black screen, nice!

I have it set to run every 45s


IF clock.TotalSeconds() >= ScrSav + 45
ScrSav = clock.TotalSeconds()
? "Resetting anti-screen-saver timer"
noSS()
END IF

then...
FUNCTION noSS() ' trig by Main(1) near bottom, every 45s
ipaddrs = CreateObject("roDeviceInfo").GetIPAddrs()
IF ipaddrs.eth0 <> invalid THEN ipaddr = ipaddrs.eth0
IF ipaddrs.eth1 <> invalid THEN ipaddr = ipaddrs.eth1
xfer = CreateObject("roURLTransfer")
url = "http://"+ipaddr+":8060/keypress/InstantReplay"
xfer.SetUrl(url)
xfer.PostFromString("")
END FUNCTION
0 Kudos
TheEndless
Channel Surfer

Re: Prevent Black Screen or Timeout

"Komag" wrote:
Ah, that script works great, no more black screen, nice!

I have it set to run every 45s

Out of curiosity, why do you need to prevent the screensaver? In general, this is a bad practice, unless you have a very specific need for it.
Side note, you're never calling Mark() on your timer, so it's only waiting 45 seconds the first time. After that, it's firing on every pass. You definitely don't want to do that.

"squirreltown" wrote:
I really wonder what pressing need there was to change that.

A few months ago, there were a handful of users who insisted there needed to be a lower setting for plasma screens to prevent burn in. I don't know if that had anything to do with it or not. That aside, it does make it a bit easier to test screensavers, since you don't have to sit and wait 5 minutes for them to kick in.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
Komag
Roku Guru

Re: Prevent Black Screen or Timeout

I just don't like that there is a black screen. That being said, hopefully Roku will fix the bug so that with roScreen games, the system screensaver will work properly and not just be black screen.

I'm not marking the clock, but "marking" the variable ScrSav I set to check against, then when the main clock progresses past that point 45s it cycles again, works as intended.
0 Kudos