0

Sanity check



Hi, I recently received my HD1010 eval unit and GPIO board. After some fiddling with it, I'm beginning to wonder whether what I want to do with the Brightsign unit is really feasible. I understand that what I'm about to describe liklely requires some some heavy custom scripting, which isn't too big an issue for me, however before I even embark down that path, I'd love it if someone from Roku could sanity check what I'm trying to accomplish and perhaps even provide a few directional pointers to make sure I'm not trying to push this thing further than it's really able to go. What I'm trying to create is an information clearing-house for the development team at my company to keep everyone more in the loop with the goings-on within the company. As such, what I had envisioned was a nice HD display with several different "modes" or groups of information that would sequentially cycle all day long, but then also have the GPIO board interface hooked up to provide a few buttons that would allow forced switching of modes and pause/start capability. To give some deeper context, the kinds of "modes" I'm referring to would actually be several different layouts. I'd like a layout that's 100% video and nothing else for showing the company's demo reel on days when clients are getting toured around the office. Another example of a layout would be a team schedule (could be created as an image ... doesn't have to be a complex XML feed. Would show impending project due dates, ins and outs, etc.). Also, some more complex layout modes using structures more like the 3-4 box + ticker kinds of layouts found in the BrightAuthor default layout selections that would convey more analytics info about websites (charts, graphs, etc. Kinda that executive dashboard type thing). It seems to be at the moment that I'm kind of stuck with "one layout to rule them all" shy of rebooting the device upon "mode" switch via the GPIO button, which isn't a very slick solution. Another level of this problem aside from whether multiple layouts can easily be achieved is the dynamic creation and updating of network content. One of the information modes I want to provide the team is traffic graphs for ours and other websites that the company hosts. This info would change nightly and be generated as a result of a call to the Google Charts API to create slick looking transparent-background PNG files with all the relevant graphical data rendered in them, however as I've been learning, it's not just a simple case of having a playlist with "graph1.png" in it and then overwriting graph1.png on the server whenever the data needs to be updated. Is this SyncSpecCreator tool really the only way to generate an updated list of content? My plan for this unit hinges on being able to trivially update images on the server with new content and just have the Roku be a dumb unit that displays whatever updated version of the image I've created up on the big screen. Also, I'd like to integrate some of our network/service monitoring software into the display. For instance, if there's a server outtage, I'd like to be able to poll an XML or RSS file to look for certain error condition values stored within and do something like change the background movie in the layout to something more indicative of an error (e.g. an angry red siren, rather than subtle gentle background fades <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> So, to boil it all down, is it even feasible to: a - have more than one layout, controllable by GPIO button (or dynamically modify the one master layout by hiding/changing/destroying zones on the fly?) b - have the button board play/pause/stop whatever happens to be on screen at any given moment regardless of what presentation "mode" the system is currently showing? c - force the unit to not display a cached version of an image and reload over HTTP every time so that I can update graphs and charts in images under its nose and not have it care d - dynamically change the background movie or foreground images based on values read from a ticker widget that is constantly looking for new data on the server I'm happy to elaborate on any or all of these points/comments if it helps clarify what I'm driving at. I'm just honestly beginning to wonder after my initial trials mucking around with this thing whether it's more trouble than it's worth to achieve my goals with this device. Would appreciate any community or coporate feedback anyone has to offer. Thanks! -Justin P.S. This is a much simpler but similar in concept execution of the kind of thing I'm driving at: http://www.panic.com/blog/2010/03/the-panic-status-board/

4 comments

  • 0
    Avatar
    RokuLyndon


    a. While you can't do multiple layouts via gpio in BrightAuthor, there's nothing stopping you from doing it via a custom script. You can delete zones and create new ones via scripting to build new layouts. BrightAuthor only supports layout changes via the scheduling of different projects that have different layouts.

    b. Again, you can do this easily via custom script. In brightAUthor, you could have all zones listening for input and go a blank image or video when a button press is received. This would work for all but the rss/ticker zones which don't currently listen for input. Again, you can do this via custom script.

    c. Again, you can do this easily via custom script with an http get. It's not too difficult to add a manual entry to the script that brightauthor uses to do a manual httpget for every image that the unit attempts to play. You could also use an image based media rss feed for the image playback on the brightsign, then all you would need to do is update the feed.

    d. I worked with a customer on a project like this where they were updating xml files every 3 - 5 seconds, and wanted the brightsign to change what was on the screen based on what was in the xml file. This can also be done via custom script.
  • 0
    Avatar
    jkominar


    Thanks for your prompt reply, Lyndon.  I'm happy to hear that what I'm attempting to make this thing do isn't too far out of its comfort zone ... of course, it would be nice if I didn't have to script absolutely everything I want out of it, but such is life <!-- s;-) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";-)" title="Wink" /><!-- s;-) -->

    I did have one question for you, however.  I've browsed through the BrightScript and Object Reference guides a couple of times now looking for functions that will allow me to modify/destroy zones via script and couldn't find anything that seemed to allow you to do that.  Could you elaborate a little bit more on how, via script, I'd go about achieving dynamically changing layouts as per your response to part a) of my original post?

    Thanks very much for your insight!

    -Justin
  • 0
    Avatar
    RokuLyndon


    You are most likely correct that the object ref mioght be missing this info.

    Ok...here's an example creating a video object and setting it to a certain size.

    r=CreateObject("roRectangle", 60, 60, 1386, 800)
    v=CreateObject("roVideoPlayer")
    v.SetRectangle(r)


    You can stop playback, and set this video object to zero like this:
    v= 0

    And, then create a new one and set it to a new rectangle.
  • 0
    Avatar
    jkominar


    Thanks for the tip on zero'ing out the player object.  That will definitely come in handy.

    I've gotten fairly deep into the BrightScript language at this point and have gotten fairly far along in my GPIO control management code, and having the system pull a custom-built XML playlist file and media from a remote server based on the mode selected from the GPIO feedback.

    My question now would be, before I go to all the trouble of building one from scratch, is there a scheduler object of some form that's missing from the documentation or do I need to build my scheduling loop?  Let's say, for example, my XML file defines a set of 5 images that are part of one "presentation mode", so I want it to just transition at a set inveral between those 5 images until someone changes the display to a new "mode".  Is there some pre-existing object that I can feed an array or xml object or something that will just handle looping over those 5 pieces of media until I tell it to do something else, or is that something I have to build from scratch?  I have a feeling based on everything I've read that scratch is what it'll end up being, but I wanted to make sure that was the case and that I wasn't missing something before I go to the trouble.  

    Finally, I read somewhere that after script errors the unit essentially has to be rebooted because the objects are never properly cleared from memory or something to that effect.  My experience has been that this is indeed the case and each time I run a script that fails in any way, I have to reboot my machine before I can attempt to run a fixed script.  I'm finding this to be a VERY slow process, as I'm making lots of syntax mistakes and error as I get my head wrapped around Brightscript better.  Is there any way to speed up this process and force a memory clean-up or whatever else is required without having to do a complete reboot?  It'd sure make scripting this box more enjoyable to not have to spend half the time I'm working on it waiting for it to reboot after one silly little syntax mistake kills the thing.

    Thanks for your help!
Please sign in to leave a comment.