That seems somewhat strange - which screensaver are you running that "jerks"? This sounds like a cpu usage issue clearly, either by the screensaver or by your app, but I wonder what is going on under the hood of your channel besides waiting and an occasional http request? When you say "waits" is that a sleep(10000000) or is that
while timer.gettotalseconds() < 10000000
or is it
Basically, unless your channel is duplicating screensaver functionality in some way - the screen is updated frequently, every pixel on the screen is changed at least once every 15 minutes - we want the screensaver to run, we don't want you burning in an image on someones old Plasma flatscreen.
There are couple of ways (i can think of) that may be of help:
- Your code can "tickle" the player over ECP every so often to keep it awake
- You can include screensaver functionality in your channel, that takes precedence over the system-wide SS. Unfortunately this will be harder, since the documentation on how to do that is not available right this moment. But it has been long coming (for years) and for a while this week it was even visible.
What RokuJoel said applies, take care not to burn-in screen.
The jerk you observed is interesting - but even more interesting is when you say on 3rd request "Roku crashes and I have to restart the device". Since you say have to manually reboot Roku, it does not seem like system crash but rather error handled by BRSr. Do you see something interesting in debug console?
eol = Chr(13)+Chr(10)
adrs = createobject( "roSocketAddress" )
adrs.setAddress( m.IPaddress+":8060" )
tcp = CreateObject( "roStreamSocket" )
tcp.setSendToAddress( adrs )
obuf = createobject( "roByteArray" )
obuf.FromAsciiString( "POST /keypress/Lit_X HTTP/1.1"+eol+eol )
z = obuf.Count()
obuf[z] = 0
tcp.send( obuf, 0, z )
"greubel" wrote:... tcp = CreateObject( "roStreamSocket" ) ...
Almost biting my knuckles for being unable to do it in one-liner. Also of note, "localhost" won't do on legacy fw3 (needs proper IP).
req = createObject("roUrlTransfer")
What do you mean by tickle the player? ... And how not going in screen saver mode can burn-in the screen (sorry didn't know about burn-in just googled what it is)?
Periodically send in a keystroke via ECP BUT please be aware of screen burn in !