Master slave setup pausing sequence every 35 seconds - SOLVED

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
I have set up two Pi's, one as master and the other as a slave. I have the slave running off a USB power bank which the lights also run off (50 square pixels 5V) and have wired things up as per others have done with the ground of the pi and the ground of the power bank connected together.
When I run a sequence, the lights running off the USB power bank and slave Pi are nicely in sync for about the the first 35 secs and then the sequence pauses and stutters for about four seconds and then goes back in sync. About 35 secs later that same thing happens. I have tried different effects in the same sections of the sequence in xlights but always happens in the same place (sequence runs fine on the computer monitor in xlights)Any ideas why this would be happening?
I have the outputs all set to multi sync on the Pi's. The lights are connected to the Pi via one of SmartAlecs Pi pixels.


Any thoughts appreciated.
 

CaptainMurdoch

Apprentice elf
Joined
Jan 21, 2013
Messages
60
Re: Master slave setup pausing sequence every 35 seconds

What is your log level set to on the remote? Does the master continue to play at the right pace when the remote goes out of sync?
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

I'm not familiar with log level, I will have to look at that when I get home.
Yes the master plays fine. The seconds tick up continuously and the music is not interrupted.
Now, I am only testing the lights running off the slave Pi so no other lights are connected or going (this set of lights is going to be used in a wearable item with lights sequenced to the show, hence the powering from a USB powerbank).. I know having things set to unicast can cause issues if all controllers etc are not connected but I have the Pi's all set to multicast. Could that still be an issue?
When the slave Pi pauses and stutters, it then plays the required effects very rapidly in trying to catchup with the sequence and then the next lot of effects will play right on cue until another pause occurs 35 secs later.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

To be honest, I think I have been a little light on the detail of my exact setup which would make it quite tricky to diagnose the problem. When I get home tonight I will try and post up a more detailed account of my setup with pictures of things I think might be relevant. I really appreciate the help but I should probably get you more info.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

Ok, first off I see that the log level is set to info.


Now, here is my setup hopefully described more fully.
I have three Pi's but at the moment I am only trying to set this up using two.
For the PIs I have 1 x Version1 model B and 2 x Version2 model B.
The video link shows what happens with the Model B V1 as the Master and the Model B V2 as the slave. (I tried using both Model B V2 Pi's instead of using the V1 Model B but using the two model B V2 Pi's, the stuttering was worse and the lights were totally out of sync which surprised me.


So I have the model B V1 setup using the wifi dongle set to 192.168.1.45 (to be able to communicate with my home network and the internet). I have the eth0 set to 192.168.2.40 (so it communicates with my controllers on a 192.168.2.X network).
The slave Pi is set to 192.168.1.46 so it can connect to the master via wifi.


I have the V2 Model B set up as a slave and it is attached to a USB power bank. A string of 50 5V pixels is also connected to the USB Powerbank (the +ve) and the GND and Data connected to the Pi.
The GND wire going to the pixels is also connected to a ground wire coming from the USB power bank.


Pictures 1 & 2 relate to settings on the slave.
Picture three shows how the outputs are setup on the Master. Universe 51 is the lights connected to the slave Pi
Picture 4 shows how the lights, Pi and power bank are connected.

In the video you can see where the lights paused, stutter and then try to catchup with the sequence. Happens in exactly the same places each time. (40s-44sec and 1:15-1:20)


My Movie 3 - YouTube
 

Attachments

  • 1.JPG
    1.JPG
    897 KB · Views: 20
  • 2.JPG
    2.JPG
    950.4 KB · Views: 19
  • 3.JPG
    3.JPG
    1.2 MB · Views: 20
  • 4.JPG
    4.JPG
    1,022.5 KB · Views: 20

DrNeutron

Just starting in this crazy hobby
Joined
Oct 19, 2012
Messages
228
Location
Glace Bay
Re: Master slave setup pausing sequence every 35 seconds

This sounds like a wifi issue. You are using multicast and connecting one pi to another via wifi?
I would try changing slave to use wired connection and then run sequence.
I'll bet the multicast traffic is causing the pauses over wifi.
Once you prove it is a wifi issue, I would try switching to unicast and see how it works.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

Ok, thanks for that suggestion. The Slave Pi will have to be connected via wifi as this will be a mobile set of lights attached to something like a jacket.
I will try wired and unicast tonight and see if that makes a difference.
If it is a wifi issue over multicast, any ideas as to why the pauses would be occurring at exactly the same point in the sequence each time (i.e every 35 secs for 4 secs)?
Cheers
Logan
 

Gilrock

Full time elf
Joined
Jan 4, 2013
Messages
438
Location
Tucson, AZ
Re: Master slave setup pausing sequence every 35 seconds

Maybe that's when the Pi tries to go out to the internet to get time.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

Gilrock said:
Maybe that's when the Pi tries to go out to the internet to get time.


Good thought.
Last year I had a Pi running my show that was connected to the internet over wifi and to the controllers via ethernet without any pausing. The Master Pi doesn't do any pausing, only the slave. Of course I presume the slave has to get it's time via the master's connection to the internet but I would be surprised that grabbing the time would cause such a big disruption. Admittedly last year my Pi was using unicast and this time I am trying things with multicast so maybe that combined with a trip to the internet is causing an issue? Anyone know how often the Pi goes out to the internet to get time data? This problem I am having happens every 35 seconds ( so it's as regular as clockwork :D )
But then again, I'm no techy and I don't understand all the intricacies of hows these things all work :confused:.
Me just like to plug in lights and go wow :D
 

DrNeutron

Just starting in this crazy hobby
Joined
Oct 19, 2012
Messages
228
Location
Glace Bay
Re: Master slave setup pausing sequence every 35 seconds

It sounds like a buffering problem with wifi/multicast.
The buffer fills up (you then see a pause) and when it empties you see the sequence catching up.
You seem to have a rough approximation of when it happens in the sequence, have you tried changing to a slower/faster sequence to see if the rate of pauses change?
Just try switching things to unicast and see if problem goes away.
Let us know if anything changes.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

Yep, will definitely try that tonight and report back.
Thanks
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Re: Master slave setup pausing sequence every 35 seconds

Ok, so I have managed to solve the problem :D but now I'm a little confused as to how it is working :eek: .
So, on the Master Pi I made all the E1.31 output settings unicast but then I realised that Pi's don't like unicast if you don't have controllers attached because they like to hear back form the controllers that they have received their respective data and if the Pi don't hear back, the Pi get upset . So I unticked the boxes next to each universe to make them inactive except for universe 50 that is for the slave Pi which I left active as unicast. Tried the sequence again and the pause and stutter was still there. So on both the Slave and Master Pi's I unticked all the E1.31 outputs to make them inactive (see image Master Pi), ran the sequence and it went perfectly fine.
So, how does the slave Pi know to play Universe 50 lights if the master isn't telling it to. Does the slave know to play universe 50 because it gets that info from the sequence loaded onto it and because I have set the start channel for universe 50 in the "Other output" section? See photo called Slave Pi
As I said before.... me not very techy... me like to plug in lights and go wow :)
 

Attachments

  • Master Pi.png
    Master Pi.png
    182.1 KB · Views: 17
  • Slave Pi.png
    Slave Pi.png
    89.5 KB · Views: 17

Gilrock

Full time elf
Joined
Jan 4, 2013
Messages
438
Location
Tucson, AZ
Ah....so you were trying to transmit the data to the pi wirelessly. The main advantage of using a "slave" Pi is that you don't need to send it the data the master just has to send a sync packet. We should have picked up on that earlier. This is just like when you run a P10 panel you don't want to have the E1.31 output for the P10's being sent out to the slave running the panels. You just have the master send sync packets to the slave because it already has all the data it needs to run the pixels it just needs to know when to run them.
 

logandc99

Dedicated elf
Joined
Jul 13, 2012
Messages
1,153
Yes, it was starting to dawn on me as I was typing my update that the problem had been solved. I had misunderstood the whole Master/slave relationship thinking that the master was telling the slave" hey! do this, do that and when I say!" when instead the slave already knows what to do (it has the sequence file on board already), it just needs to keep in time with the master. So the poor old slave was probably getting confused by running it's own sequence and then getting harassed by the master also sending out sequence data.
But hey, that's one fun part of this hobby....having a problem and then getting it solved. :D
 

DrNeutron

Just starting in this crazy hobby
Joined
Oct 19, 2012
Messages
228
Location
Glace Bay
Glad you figured it out. I only have the one pi so was unfamiliar with how data was transmitted between pi's.
Good to know!
 
Top