0

Documentation on Custom Scripting



Where is the documentation on scripting for the BrightSign? All the links point to the same docs as the Roku and there is nothing I can find on BrightSign specific scripting such as creating your own autorun.brs file. I've spent the day using the BrightAuthor tool and it won't work for our needs, not enough flexibility in the tool. Attempting to set one of my existing Roku apps as the autorun for the project throws an error that it's not a valid autorun file and I can't find the documentation that says what is expected in the file. Thanks, Mike

15 comments

  • 0
    Avatar
    RokuLyndon



    I'm not sure where you're looking. At www.brightsign.biz , under support, under documentation, there's a brightscript reference, and an object reference that cover scripting in great detail.

  • 0
    Avatar
    RokuLyndon


    I forgot to ask.

    What are you trying to do that you can't do with brightauthor?
  • 0
    Avatar
    vinull


    None of that documentation (that I can find) talks about what is required to run the scripts - how to deploy (hash requirements), creating a custom autorun.brs, meaning of xml config files, etc.  

    I manage our real-time dashboards.  With Roku I can pull in an XML feed and update screens with the data.  BrightAuthor has no XML support, and the RSS support is very limited - no control over what feed items are shown where, can only refresh every 5 minutes, etc.

    I've tried grabbing custom scripts in the forums here, and using them as a custom autorun.brs file, but even some of those throw errors as "not a valid file" in brightauthor.
  • 0
    Avatar
    RokuLyndon


    Brightauthor doesn't just take any custom script. The custom scripting docs are for writing your own scripts from scratch, not for modifying the autorun script that brightauthor uses. For the most part, BrightAuthor is designed to be used as is. If you want to modify, there isn't a ready made sdk.

    If you want to pull in an xml feed, you would have to write the xml parser in brightscript, and create the text zones on the screen where you want to enter this data. It sounds like you need a fully custom script and not something that ties into brightauthor.

    Maybe, if you send us @ support, a more detailed description of what you're trying to do, we can provide more assitance.

    BrightAUthor doesn't have direct xml support, but the scripting language does.
    Yes, you can't pick and choose where rss feed items go.

    The rss refresh can be set to 1 minute in brightauthor. Anything less would require a making changes to the autorun script to set the call in frequency for rss more frequent.
  • 0
    Avatar
    vinull



    I have sent a support request, and it just come back with the same response - a link to the incomplete docs.

    So what you're saying is, I pretty much need to hack the unit and find out what it does, like others here in the forums have.  For example, to have the unit pull the custom script down from a web folder on boot - there is no documentation on this, including how to deploy my script.  Or I rewrite this all from scratch.

    I think to explain what a real-time stats dashboard is, it just easier to show an example - http://www.usdebtclock.org/  This has way more fields than I'm working with, but the idea is the same.

  • 0
    Avatar
    RokuLyndon


    In order to download a file at startup you would need to include a simple http get in your script, and once the file was fully downloaded, reboot the player to use your new script. If you didn't want the unit to go into a loop doing this over and over again, you would need some version number also available in the script file so you could compare what you downloaded to what you're currently running, before deciding whether you want to reboot.

    I'm not sure what you mean by "hacking into it to find out what it does". But, you are correct that if what you want to do is very different from the normal use case for brightauthor, then it requires a custom script.

    Based on the link you provided, that would need to be fully custom.

    Are all those values available from the same xml file? To do something like this you could have a video or background image for the headings, and then create a text widget for each of the fields where the values are being updated. Then, all you need is a loop to download a new xml file, and push the updated values into their respective fields.
  • 0
    Avatar
    vinull


    Attempting to write my own script is proving to be an exercise in insanity.

    From the forums and (lacking) documentation I can find hardly any information on debugging a script.  Because it's 2011 I don't have NULL Modem cables laying around - how do I redirect output to the VGA port, a file, or even the USB port?  Hell, the Roku setup up a port I can telnet into for debugging, and that's not even an "enterprise" solution!

    The slim documentation makes reference to a WinBrightScript for debugging in a separate window, but I can not find this tool anywhere on the site and I wasn't included in the BrightAuthor download.
  • 0
    Avatar
    RokuLyndon


    There's no telnet port to connect to on the BrightSign. There isn't a windows debugging environment for the scripts.

    The shell output cannot be redirected to the vga output, but you can download firmware 3.7.44.  That firmware release allows you to turn on the diagnostic web server. If you log into that web server, you can see the system log which will include any script errors. See the attached pdf for details about enabling the diag server and using it.

    If you want to step through the debugger, you have to do it from the serial shell.

    There are plans to move to the same brightscript release that's running on the Roku units, but that's not likely to happen before the end of the year.
  • 0
    Avatar
    vinull


    I've enabled the web server, however the authentication is not working.  According to the PDF you linked, setting a value for "http_auth" should require a password on the web server.  I'm setting this value like so:

    registrySection = CreateObject("roRegistrySection", "networking")
    registrySection.Write ("http_server","80")
    registrySection.Write ("http_auth","my_password")
    registrySection.Flush()

  • 0
    Avatar
    RokuLyndon



    password$="test"
    registry = createobject("roRegistry")
    registrySection = CreateObject("roRegistrySection", "networking")
    if type(registrySection) = "roRegistrySection" then
    registrySection.Write("http_server", "80")
    registrySection.Write("http_auth", password$)
    endif
    registry.Flush()


    This is what I use and it's never failed. I don't think there should be a difference using registry section to flush vs the whole registry.
  • 0
    Avatar
    vinull


    I have tried:
    registry = createobject("roRegistry")
    registrySection = CreateObject("roRegistrySection", "networking")
    registrySection.Write ("http_server","80")
    registrySection.Write ("http_auth","my_password")
    registry.Flush()


    and power cycled the box to be sure.  I'm using a HD1010w running 3.7.44.  The network settings show:

    Network

    System 0

    b = 'a0'
    tz = 'EST'
    ir = '00000000'
    nt = 'time.brightsignnetwork.com'
    v = '1280x720x60p'

    System 1

    BSN

    ss = 'Guest'
    ts = 'time.brightsignnetwork.com'
    rlmow = 'unlimited'
    uab = 'no'
    lc = '001'
    ud = ''
    ele = 'yes'
    dle = 'yes'
    ld = '111014'
    dwse = 'no'
    wifi = 'no'
    rlmid = 'unlimited'
    ple = 'yes'
    cdrl = ''
    tbnc = '300'
    rlrid = '0'
    http_auth = 'my_password'
    http_server = '80'
    un = ''
    cdr = 'no'
    dwsp = ''
    ut = '0'
    uat = 'no'
    dhcp = 'yes'
    rlrow = '0'
    rlmiw = 'unlimited'
    cdrs = ''
    pp = ''
    rlriw = '0'
    unm = ''


    So the setting is being updated, but it has no effect.
  • 0
    Avatar
    RokuLyndon


    is my_password you actually password, or is it a variable? If it's a variable, you can't put it in quotes.
  • 0
    Avatar
    vinull


    It is the actual password - and from the settings I listed I can see it's getting set.
  • 0
    Avatar
    RokuLyndon


    SO, can you login with no password, or does the password simply not work?
  • 0
    Avatar
    vinull


    No password is required, the web server is not requiring authentication.
Please sign in to leave a comment.