1. New to Christmas lighting? Get started with the AusChristmasLighting 101 Manual:
    auschristmaslighting.com/wiki/AusChristmasLighting-101

My Interactive Wi-Fi Matrix

Discussion in 'The Development Lab' started by BradsXmasLights, Dec 20, 2014.

  1. BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    This thread is documenting my interactive Wi-Fi Matrix system that I built during 2013 for last year's display, and once again running this year.

    Basically, I'm running a Wi-Fi hotspot where by visitors can come along and type their name in; and it will then appear on my matrix automatically, in sync with the sequence's colouring.

    Technically there's a few things happening in the background to make all this happen seamlessly. Lets start with this block diagram:
    WiFiMatrix-Diagram.jpg


    Basically, my Sequencer (eg: LSP last year, FPP this year, or any E1.31 source), rather than sending directly to the light controller, is transmitting to another computer on my network which is running my own 'Matrix Controller' software that 'rewrites' these E1.31 packets, which in turn are transmitted to the board running the Matrix.

    The 'Matrix Controller' software is constantly reading from a MySQL Database to see what names there is to display. This database also contains the whitelist of safe names to display; and names not to display so I can auto-ban anyone who's being silly with it. More on that later in part 2.

    WiFiMatrix-Software.jpg

    The controller software has some manual / testing controls, along with timing options. Every 15 names I insert a 'promo slide' loop, where by artwork is shown telling users that the matrix is interactive, etc

    To overlay the names themselves, what my software is doing is alpha blending a monochrome masking image (the name) against a colour matrix (that is being received from the sequencer) Each pixel has a bitwise calculation performed (eg: colour value AND masking value = result) so a simple 'photoshop' style merger takes place. This merge imaged is then translated to new E1.31 packets

    My matrix is 136x10 Pixels (8 universes off fully loaded P2 board- but since the Sydney meet earlier this year is now adjustable for different sizes, and different matrix wiring patterns/channels mapping. (zigzag vs left-right, right-left, etc.)

    WiFiMatrix-Masking.jpg

    Now to save CPU time on calculating how to scale text to fit the matrix, every name in the system has been pre-rendered as a GIF Image. This was done by script using ImageMagicK, and took a while to churn out 130,000+ images. (I also have another app that runs that monitors the database for new names, and if detected, will render the artwork GIF file, update database, so the Matrix Controller can then display it. :)

    WiFiMatrix-Images.jpg

    PART 2 - The Wi-Fi Portal coming soon. :)
     
  2. fasteddy

    fasteddy I have C.L.A.P Global Moderator Generous Elf

    Joined:
    Apr 26, 2010
    Messages:
    6,501
    Likes Received:
    22
    Location:
    Albion Park NSW
    Find Me On:
    Still finding some weired names that dont register in the database
     
  3. OP
    OP
    BradsXmasLights

    BradsXmasLights WiFi Interactive

    Joined:
    Dec 23, 2010
    Messages:
    506
    Likes Received:
    10
    Location:
    Brisbane, Australia
    Find Me On:
    Every night I'm adding new names Eddy, and have had some very creative attempts too! Everything is logged so it can be monitored.
     
  4. David_AVD

    David_AVD Bite my shiny metal ass!

    Joined:
    Jun 12, 2010
    Messages:
    3,536
    Likes Received:
    81
    Location:
    Victoria Point (Brisbane)
    Find Me On:
    I think that using a white list (pre-approved names) is really the only option unless you want to sit there approving (or not) each one manually as they come in.

    The black list (bad words) would be optional from a display perspective but handy for blocking future requests from the same device.
     
  5. fasteddy

    fasteddy I have C.L.A.P Global Moderator Generous Elf

    Joined:
    Apr 26, 2010
    Messages:
    6,501
    Likes Received:
    22
    Location:
    Albion Park NSW
    Find Me On:
    The Martin Place Christmas tree in Sydney has a similar feature where people can text a message that will scroll up the ribbon. This needs to be monitored all the time as people can be very creative when trying to bypass a profanity filter and the only way to ensure its all clean is to manually do it.
     
  6. kel

    kel Dedicated Elf

    Joined:
    May 12, 2010
    Messages:
    1,526
    Likes Received:
    0
    Location:
    Tenterfield, NSW/Qld border

    I think you meant to say 'nice' and 'naughty' lists ;)
     
  7. David_AVD

    David_AVD Bite my shiny metal ass!

    Joined:
    Jun 12, 2010
    Messages:
    3,536
    Likes Received:
    81
    Location:
    Victoria Point (Brisbane)
    Find Me On:
    Nope, that's what they are called. No PC pandering here. :)
     

Share This Page