Switching out sequences in bulk?

Hi I have an idea to run different sets of sequences for each day of a 4 day installation. ie. day 1 would be mostly solid fades and simple patterns, day 2 be more complicated chases, and so on. What would be the best way to accomplish this? Do I need to have all my patterns for each day saved on a device and then delete everything from the previous day inside pixelblaze and then load up all the patterns for the current day? Would there be an easier way to do this, or even automate it?

Yes, right now that would be one way to do it using the built in sequencer. The sequencer is pretty simplistic at this point.

Another option is to use Firestorm or the websocket API directly to implement a sequencer that did what you wanted. You could hack Firestorm directly, or use it’s API to control one or more Pixelblaze. You’d need a computer or raspberry pi to run Firestorm.

A third option, is that you can write the sequencer logic in a pattern, where one large program does multiple effects, and uses delta or time() to measure passing of time to call different render functions. In that case, you could have 1 pattern for each day and leave them installed and disable the built-in sequencer.

Thanks! I’ve been looking at firestorm but still think im a bit too novice to understand how it works/ implement it. It seems like that’s the next thing on my list of stuff to learn. For now I think I’ll try saving the code for each pattern I like, saving them into folders separated by day, and then just upload new patterns each day. Considering how easy it is to change out patterns, it shouldn’t be too difficult to achieve a brand new sequence in a minimal amount of time. Could you point me in the direction of where i can learn about how to use firestorm? The help is much appreciated :slight_smile:

Doesn’t the built in sequencer have a time interval feature? Can you set the interval for day (1140 minutes)? Then it would be automated, as long as you fire it up at midnight of the first day (or whenever the transition time is).

I should have linked Firestorm!

There’s some docs on getting it up and running in the readme. In terms of using it, it serves up a web page at the specified port.

There’s a json rest api, so if you have experience with that, its a bit easier than working with the websocket API.

If you wanted to hack it, the key thing is that all of the known PB are in the discovery section. Each discovery record has some info, but also a controller object that can be called to send commands like changing the program by name.

Here’s a quick hack that switches to one of 3 random patterns by name every 3 seconds:

const _ = require('lodash');

setInterval(() => {
  const patterns = [
      "fast pulse",
      "blink fade",
      "marching rainbow"
  ];

  let i = Math.floor(Math.random() * patterns.length);
  let name = patterns[i];
  console.log("switching to " + name);

  _.each(discovery.discoveries, (record, id) => {
    if (record.controller)
      record.controller.setCommand({programName: name});
  });

}, 3000);

If you paste that at the bottom of server.js, it should work and give you a starting point.

cjn, it does, but that would mean it would only play one pattern per day. I’m going for a set of patterns each day. Kind of like… themes.

Ben, thanks for the link, I’m gonna start delving into firestorm, seems like thats the best way to achieve the results I’m looking for, at least for now. Or at least until PB has a select and deselect function for the patterns inside the sequencer.