News:

LATEST RELEASE:  FPP 6.3 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/6.3

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 15698
Latest: kronescharles
New This Month: 16
New This Week: 2
New Today: 0
Stats
Total Posts: 128629
Total Topics: 15828
Most Online Today: 38
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 20
Total: 20

BRP Voting Plugin - Allow others to vote for your songs!

Started by Barkers Random Projects, January 05, 2020, 04:25:16 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Barkers Random Projects

Hi Everyone, I've been interested in light shows and how they work, and this year I finally got my own going. I also built a plugin that will allow people viewing your show to vote for what song comes next!

To Install:
You can use this URL to install the plugin in your falcon player: https://raw.githubusercontent.com/bbarke/brp-fpp-voting/master/pluginInfo.json

On the falcon player's UI, go to Content Setup -> Plugin Manager, past the above URL, then click 'Retrieve Plugin Info'.
Scroll to the bottom of the page right above the 'Template Pugin' section you'll see the plugin called BRP Voting - Song Voting Plugin For Falcon Player.

To Run:
Navigate to Status/Control -> BRP Voting. Click 'Start Service' or 'Generate New Key' and then 'Start Service'. A unique voting URL will automatically be generated for you and the voting service will begin running. Go back to the status page and start playing a song - that is if you don't already have one playing! Something neat I designed into the voting site is when someone votes for a song, it will instantly show up on everyone else's device that is also currently viewing your light show's voting page.

EDIT (Change log 12/03/2022)
Falcon Player Plugin Update (for v5+ and v6+ of fpp)
  • Reorganized the list of settings, so they make a bit more sense
  • Fixed bug where the current status of the plugin wasn't being displayed
  • Changed the UI to use more styling from the current player

EDIT (Change log 12/08/2020)
Please update the plugin in falcon player to take full advantage of this update!
  • Added the ability to add basic HTML to the top of the page
  • Basic song voting stats are listed on the bottom of the brp voting page (this will be and look much better next season!)
  • Added ability to allow dupicate votes (for testing purposes)
  • You cannot view this attachment.
  • You cannot view this attachment.

EDIT (Change log 12/06/2020)
Server side updates only
  • Fix 'Now Playing' song name not honoring the name preference (using audio vs sequence names)
  • Other internal bug fixes and added additional testing
   
EDIT (Change log 11/28/2020)
Prevent duplicate votes and button rework
  • Now preventing duplicate votes
  • Reworked buttons on the voters website to look much better
  • You cannot view this attachment.

EDIT (Change log 11/23/2020)
Customization Release! You should be able to update the plugin though the plugin manager. When you to update, be sure to stop and then start the voting service again!
  • Allow background / gradient colors to be picked
  • Allow header font colors to be picked (revamping voting buttons soon!)
  • Nativity background image option
  • Snowman background image options with and without gloves
  • Fixed the bug where the gradient wouldn't go to the bottom of the screen on some devices
  • You cannot view this attachment.
  • You cannot view this attachment.

EDIT (Change log 10/28/2020)
You may run into issues with updating because the update sript doesn't appear to be running.
To get around this, please uninstall and reinstall the plugin!
  • Fixed issue when the plugin is first installed, errors occur on the plugin page
  • Added ability to restart the plugin on reboot
  • Added ability to select different background images (Happy Halloween!)
  • You cannot view this attachment.

EDIT (Change log 10/23/2020)

EDIT (Change log 10/22/2020)
  • Fixed URL not resolving when no songs are playing
  • Fixed loading icons to work correctly
  • Adjusted timeout if server is unavailable to retry forever
  • Fixed note when indicating a new private key needs to be generated
  • Verified compatability with v4.3

EDIT (Change log 5/3/2020)
  • Install python 3 when installing the plugin - the most recent version of fpp on the master branch doesn't appear to have this version installed on it anymore. Python 2.7 support ended on January 1, 2020 - so I'd like to stay with a maintained version.
  • Removed debug path from player (accidentally left this in)

EDIT (Change log 5/2/2020)
  • Updated to save snowing theme
  • You cannot view this attachment.
  • Upgrade to using python 3
  • Fixed bug where on some networks the falcon player status couldn't be retrieved (Thanks for the logs Poporacer!)
  • Fixed bug where a missing sequence name would throw an exception - There is now an option to prefer the song name or the sequence name, falling back on the other if one is missing (Thanks for reporting dkNetwork)

EDIT (Change log 2/21/2020)
  • Added ability to save settings.
  • Added Voting message setting and allowing current playing song setting.
  • Added information tags to better describe what the settings do. Just hover over the (i) icon
  • Added plugin version to aid in keeping the server backwards compatible with older versions of the plugin if older versions of the plugin are still being used.
  • Voting website:
  • Settings page:

EDIT (Change log 2/7/2020)
  • No longer rely on any of the fppxml.php api calls (thanks again for letting me know dkulp!)
  • Fixed situation where the voting page would be blank if it was currently stopping the loop gracefully (new state added in fpp v3.6
  • The website is more fluid. Before this every vote would redraw the page - it now handles that much nicer
  • The website will now show a loading icon while waiting for a response when voting
  • Setup a ton of monitoring on the server so I can determine how large of a server is needed to handle multiple shows
  • Fixed situation on the website when no schedule was available, it would display an incorrect message indicating when the next show was

EDIT (Change log 1/24/2020) - This is a breaking change and you will need to update the plugin in falcon player for this to work! Features that were implemented:
  • Full support for schedules. You no longer pick a playlist to play, it will follow whatever falcon player is playing.
  • 'Now Playing' is now show to voters on the voting website. Soon I'll have the duration of the current song playing)
  • When a schedule is no longer playing, the time of the next show will be displayed to the voters. This is in military time, I want to adjust that in a future update so it shows in AM/PM. It will also work if you just start playing songs from the
  • When a playlist is stopping, voters will be notified
  • The plugin will not (and never) disrupt the show playing if the voting server goes down. The plugin is also much more resilient to the server restarting - if a restart happens everything should be back to normal within 60 seconds. Again a server restart will NOT disrupt the show from playing in any shape or form
  • Generating a key is a bit more intuitive now. A key can only be generated if the service is turned off, and also if there is no key (for a fresh install) it will generate one for us automatically if you start the service without first generating a key.
  • If there are no votes for a song, falcon player will just continue playing it's default order. You will no longer have duplicate songs playing twice in a row if there is no one voting for your song.
  • Gif of the update:

More to come! I'll keep this first post updated with the changes that are coming down the pipe along with a post in this topic
Checkout what else we are working on at https://barkersrandomprojects.com

Barkers Random Projects

#1
Edit (1/24/20) These limitations are no longer applicable with the most recent update

Current Limitations (That I know of) and good information:

  • The name of your sequence file will be used as the song being voted on
  • Schedules will not be honored (it will continually play as it sits right now) - I hope to have this fixed soon.
  • I don't know what happens if you have a item in your playlist that isn't a sequence file
  • Your playlist must not have any spaces in it because of a bug in fpp not saving spaces in it
  • I built this using a Raspberry Pi 3B+ and Falcon Player v3.5.7 (v3.5 branch) - I don't know how this will run on other platforms, but to my limited knowledge it should be OK
  • Currently, if there are no votes, it will pick a song at random. It is possible that the same song will run two times in a row

Let me know what you all think, if this is something people would be interested in next year let me know. Please let me know of any bugs as well so I can fix them.
Checkout what else we are working on at https://barkersrandomprojects.com

foxvalleypcgeek

I just discovered Xlights and Falcon a few weeks before Christmas. I was using xschedular in a VM. Picked up a pi 4 yesterday to put FPP on. Got it all set up and added this plugin to it. Seems to work great, except for the ignoring schedules part listed above. If that was fixed it would be awesome! Thank you!
Wisconsin, USA

Barkers Random Projects

Thanks that is great feedback. I'll be working on the scheduling part very soon! Glad you were able to get it running, was it pretty easy to get it setup? 

One of my goals was to make it as easy as possible to get it running without having to do a bunch of extra work.

I'm hoping to add some styling soon to the website so it looks a bit nicer - maybe have a dark theme so when people look at the voting site at night they won't go blind  8)

I'm open to feedback or feature requests. It is still in the development stage and I want to get all of the kinks worked out for this coming Christmas season!
Checkout what else we are working on at https://barkersrandomprojects.com

foxvalleypcgeek

Yes it was easy to set up. I clicked on the button to generate the code and didn't seem to do anything. Then clicked on start service, and nothing either. So just changed to a different page and back. Tried again and it worked. Also  manually started and stopped a few times and works as expected.

I generally prefer dark themes myself.
Wisconsin, USA

Barkers Random Projects

#5
Thanks for the feedback @foxvalleypcgeek

I have revamped the server code along with a ton of stuff so it is now completely compatible with schedules and also fixed the key generation issue you mentioned.

This is a breaking update so you will all need to update the plugin for this to work properly.

Some of the features that were implemented:

  • Full support for schedules. You no longer pick a playlist to play, it will follow whatever falcon player is playing.
  • 'Now Playing' is now there on the voting website. Soon I'll have the duration of the current song playing)
  • When a schedule is no longer playing, the time of the next show will be displayed to the voters. This is in military time, I want to adjust that in a future update so it shows in AM/PM. It will also work if you just start playing songs from the
  • When a playlist is stopping, voters will be notified
  • The plugin will not (and never) disrupt the playback if the voting server goes down. The plugin is also much more resilient to the server restarting - if a restart happens everything should be back to normal within 60 seconds. Again a server restart will NOT disrupt the show from playing in any shape or form
  • Generating a key is a bit more intuitive now. A key can only be generated if the service is turned off, and also if there is no key (for a fresh install) it will generate one for us automatically if you start the service without first generating a key.
  • If there are no votes for a song, falcon player will just continue playing it's default order. You will no longer have duplicate songs playing twice in a row if there is no one voting for your song.

All of the updates to the voting page happen nearly instantly, because of the technologies being used.

More updates are coming. If you'd like to see any features implemented, please let me know. The next thing I'm going to work on is fixing the UI so it looks a little nicer to the user, show the duration of the current playing song and such.

Please let me know if you find any bugs. I've done my fair share of testing, but I know there is always something I could have missed.
Checkout what else we are working on at https://barkersrandomprojects.com

dkulp

I'll try installing this at some point when I get some time to really look at it, but a quick look through the code popped up a concern:

You are using the fppxml.php endpoint for various things.   Please don't do that.   Please move to the REST api's available from /api/help or the FPP Commands (/api/command).   We're planning on completely removing the fppxml.php (and possibly fppjson.php) endpoints at some point soon (hopefully before 4.0) so relying on that is likely not a good idea.
Daniel Kulp - https://kulplights.com

Barkers Random Projects

Awesome feedback, I had no idea - Thank you! Digging into the code it looks like all of the endpoints i'm using (fppxml.php, fppjson.php) end up building a curl command that then sends the request to various endpoints to the falcon service on port 32322 like localhost:32322/fppd/status. It looks like the code for that lives in src/httpAPI

I'll make that adjustment and get another update out soon!
Checkout what else we are working on at https://barkersrandomprojects.com

Barkers Random Projects

More updates!

  • No longer rely on any of the fppxml.php api calls (thanks again for letting me know dkulp!)
  • Fixed situation where the voting page would be blank if it was currently stopping the loop gracefully (new state added in fpp v3.6
  • The website is more fluid. Before this every vote would redraw the page - it now handles that much nicer
  • The website will now show a loading icon while waiting for a response when voting
  • Setup a ton of monitoring on the server so I can determine how large of a server is needed to handle multiple shows
  • Fixed situation on the website when no schedule was available, it would display an incorrect message indicating when the next show was
Checkout what else we are working on at https://barkersrandomprojects.com

plaberge

Just tried this out, very cool! May well integrate this in this year's show. It would be nice to be able to add a title to the page showing the name of the show, e.g, Laberge Lights, and perhaps also the name of the current playlist.

Nice work!
Paul.
Halfmoon Bay, BC

SCUBA

just got it to run! great job... made a donation, hope it helps!

Kensington Graves

Question: Is the voting URL static or Dynamic, i.e., is a new voting URL generated every time the service is restarted or FPP is rebooted?  It would be slick if a viewer could scan a QR code to reach the voting URL.

Barkers Random Projects

Quote from: plaberge on February 07, 2020, 10:29:46 PMJust tried this out, very cool! May well integrate this in this year's show. It would be nice to be able to add a title to the page showing the name of the show, e.g, Laberge Lights, and perhaps also the name of the current playlist.

Nice work!
Thanks! Also great suggestions. I'll work on adding the option to put in a custom voting message and possibly adding the current playlist name. I'd also like to add the amount of time the current song has left to play


Quote from: SCUBA on February 08, 2020, 01:34:19 PMjust got it to run! great job... made a donation, hope it helps!
Thank you so much Scuba!!! That helps a ton and keeps my wife and I motivated!! 


Quote from: Kensington Graves on February 09, 2020, 06:47:03 AMQuestion: Is the voting URL static or Dynamic, i.e., is a new voting URL generated every time the service is restarted or FPP is rebooted?  It would be slick if a viewer could scan a QR code to reach the voting URL.
Good question - it currently is and will be static based on your generated key. I would wait until later in the year to make a QR code as we polish up the service - but yes the goal is that your voting URL will stay the same so you could create a QR code for your viewers. That voting URL is tied to your generated key and won't change if you reboot or restart the service.
Checkout what else we are working on at https://barkersrandomprojects.com

Barkers Random Projects

Another update

  • Added ability to save settings.
  • Added Voting message setting and allowing current playing song setting.
  • Added information tags to better describe what the settings do. Just hover over the (i) icon
  • Added plugin version to aid in keeping the server backwards compatible with older versions of the plugin if older versions of the plugin are still being used.
Checkout what else we are working on at https://barkersrandomprojects.com

TNF250

I was having an issue when voting, the numbers were not updating on the voting list, which it did in the past. I had to refresh the page to see any voting changes. This is in Google Chrome.

So thinking that I would uninstall the plugin and reinstall to see if that may fix the issue but unfortunately, now the plugin is not installed nor is it available in the list. Suggestions?
Zane
Springfield, TN

X-Lights - RPi3 - FPP - Falcon - DLA Lynx

Support FPP

+- Recent Topics

Libre SBC with oled by mel4853
March 24, 2023, 04:04:06 PM

K8-Pi - Random Pixels on by cybercop23
March 24, 2023, 10:44:49 AM

Limitations on Video file size? by Jayl
March 23, 2023, 11:06:14 AM

FPP 7 Kubernetes Error by Jlwright325
March 22, 2023, 11:11:59 AM

FPP Install on Raspberry Pi Zero W by k6ccc
March 21, 2023, 05:53:50 PM

FPP install script on Ubuntu, no video by AlexanderMedia
March 21, 2023, 09:37:23 AM

DMX to pneumatic solenoid by JerryPlak
March 20, 2023, 01:03:53 PM

F16v3 External Power Connector by darylc
March 16, 2023, 05:25:46 PM

FPP on PC HDMI Output by AlexanderMedia
March 15, 2023, 01:17:55 PM

Orange Pi One and external DS3231 RTC on rtc1 by Arti G
March 13, 2023, 09:29:28 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod