0

Setting up HD225 with two GPIO inputs to start video playback, until end of video in BA:Connected

Hi,

I have a HD225 player setup to start playing a video file when a handset is picked up, using GPIO event.

The way it works, is that there are two handsets installed on the wall under the display that shows an attraction video loop until a visitor comes in and pick up one of the two handsets from the wall supports. The player will then receive a gpio trigger (button 01 or button 02 depending which handset is picked up) and start playing the main video. A second visitor can pick up the other handset and listen to the audio from the video that is playing.

The problem is that if one of the visitors puts it's handset back on the wall, it will cut playback of the video, even if the other visitor is still watching it.

How can I set things up so that once started, the video can not be interrupted when one of the handset is still in use?

My client wants the video to continue playing as long as one of the visitors is listening to it with the handset, even if the other visitor puts his handset back on the wall support.

They also want the display to return to the attraction loop if both handsets are back on the wall supports.

Is there a way to setup conditional targets or something else that's can let me achieve  this?

10 comments

  • 0
    Avatar
    JB_MPR

    Hi Eric,

    I would use "user variables". Are you familiar with that?

    As a rough idea:

    you lift up one headset: increase your variable
    lift up the 2nd headset: incrase your variable

    if you hang up: decrease the variable

    So, let your video check if the variable is bigger than 0. if yes, play. if no, stay. if the variable drops to 0, stop the playback.

    Just put at the media end a variable reset (so that the variable is 0 in any case). Also put in a logic that if the variable is 0 and you hang up (it would get to -1) tell the variable to go back to 0.

    With this you would get the szenario:

    1 user picks up --> start;  hangs up -> stop

    1user picks up --> start, 2nd user picks up --> keeps working, 1 hangs up --> keeps working; 2 hangs up --> stop.

    I hope I could explain it a little...

     

  • 0
    Avatar
    Eric Fauque

    Hi JB_MPR,

    Thanks for your help.

    Using user variables is new to me.

    I have set things up things like you suggested, but it doesn't work as expected. 

    I have an attraction video, with two GPIO events connected to it (GPIO 1 and GPIO 2), with an increment variable command on each GPIO event.

    I have created a variable that I called counter, with a default value of 0.

    First pick up of headset on GIPO 1 or GPIO 2, playback of main video will start, and increment the variable.

    I have added two GPIO events on the main video with commands to decrement the variable and I also added conditional targets that tells the player to keep playing the main video if the variable is 1 or 2., and return to the attraction video if variable is 0.

    When I pick up one headset the main video will start and keep playing if I pick up the other headset as well.

    But as soon as I hang up one of the headsets, the presentation will return to the attraction video even if the other headset is still up.

    I can't seem to get that part to work properly.

    Any idea what could be wrong?

    If you want, I can send you my presentation so you can have a look.

    thanks.

  • 0
    Avatar
    JB_MPR

    Yes, it might help if you send it to me.

    I think you have to enter an conditional target, depending on the value of the variable. If the variable is bigger than 0 stay in the same state, if the variable is 0 transition to the "hello, pick me up" video.

    How do you trigger the pickup and the hangup signal on the GPIO ports?

  • 0
    Avatar
    Eric Fauque

    Hi JB_MPR,

    Here is a link to download the presentation I am working on.

    I have many different versions with different ways I tried to make it work, but this is my latest attempt.

    Thanks for your help!

    https://we.tl/t-sb5eKnGjzV

  • 0
    Avatar
    JB_MPR

    So, I tried to change some things, but I could not test my presentation as I dont have any buttons in the office right now.

    I added on your static/home screen a "counter reset". This is necessary, because, if the media ends, you will get back to your static screen, but the counter will be e.g. 2. So I added on the "entrance" event a reset of the counter.

    Also I changed the behavior of you buttons. If the counter is bigger than 0 - "stay" in the presentation. If it is 0 go to the home screen.

    It can be a problem, that the counter is to slow, when you hang up the headfone, so that the "decrease" and the "check the counter" is in the same time, so it could not work. Than we would set it up with Zone commands to be sure there is the right sequence.

    Just check this presentation and let me now if it is working:

    https://we.tl/t-1GnxLdj0ma

  • 0
    Avatar
    Eric Fauque

    Hi JB_MPR,

    I will try your présentation tomorrow or the next day.

    I will let you know how it goes.

    Thanks a lot for your help!

  • 0
    Avatar
    Eric Fauque

    Hi,

    I tried your presentation and it's still not working.

    It seems to work sometimes, meaning that I do a sequence (pick up headset #1, video will start playing, pick up headset #2, video will keep playing, put one headset down, video keeps playing, put second headset down, video will return to home screen).

    But other times, it will start properly, but not stop when both headsets are put down.

    Or it will restart the main video when I put down a headset.

    I will try some different things in the next few days, and let you know if I find a working solution.

    Question: what do you mean when you say "Than we would set it up with Zone commands to be sure there is the right sequence." ? Where and how do you add a Zone command?

    Thanks.

     

  • 0
    Avatar
    JB_MPR

    As we do 2 commands more or less in the same time (decrease the counter & check the counter), I was not sure if is working 100% perfect.

    So There is a possibility to set up a 2nd Zone in BA connected.
    In this Zone, we would have only  eventhandlers without any content.

    I created 4 eventhandler (all headfones down, 1up2down, 2up1down, all up). When the buttons are pressed, we change from one to the other (you will see in the presention).
    If we enter one of the eventhandlers with one headfone up (coming from all down), we send the zone message "start".
    If we lift the other headfone we get to the eventhandler "all headfones up". Nothing will happen here (main movie is still playing).
    If we leave this eventhandler (all up) by putting down one headfone we will go back to the state "1up2down" or the other way round. Nothing will happen. Only if we leave this eventhander by hanging up the last headfone, we will get back to "all down" and here we will send the zone message "stop".

    In the 1st zone, we will have the static part which will listen to the "start" message. if the zone message is sent, it will start the main video. If we get sent the message "stop" by hanging up all headfones, we will get back to the static part.

    So in this version, there is no need for the counters, so I deleted the variable.

    I also added a kind of "reset". if the main movie will be finished, we will get back with a timeout event to the static part. In this case we send the massage "reset" wich will send us back to the "all down" handler in the 2nd zone (even if the headfones are still up). This will give a kind of reset if anything goes wrong.
    So you will have everytime when the movie is finished, a player which comes back to a clear status (independent if the headfones are up or down).
    If you are in this "original start position", hanging up a headfone will have no effekt. So this should make it save, if the player mis-calculates in any case.

    I think I didn't configer the buttons correct (with up and down), please check that in the presentation.

    here is the new presentation - I hope it will work.

    https://we.tl/t-S2CKXW0XLQ

     

  • 0
    Avatar
    Eric Fauque

    Thanks for the quick reply!

    I think we are almost there!

    I will look into it tomorrow and let you know how it work!

    I really appreciate your help with this.

    Thanks.

  • 0
    Avatar
    Eric Fauque

    Succes!

    I tested you latest presentation just now and it work perfectly!

    All scenarios seem to work like wanted.

    I did not have to change anything in the up or down configuration.

    I will let it run and test it some more .

    Thank you so much for your help!

Please sign in to leave a comment.