Author Topic: After hours internet radio plugin  (Read 562 times)

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,257
  • Kudos: 69
Re: After hours internet radio plugin
« Reply #30 on: December 05, 2018, 11:39:21 AM »



It did not install on my BBB.   I think the "install additional things" script needs to add an "apt-get update" to get the latest package lists.   Once I manually ran that, the install worked.
Dan Kulp

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,257
  • Kudos: 69
Re: After hours internet radio plugin
« Reply #31 on: December 05, 2018, 11:40:41 AM »
Immediately after install, I went to the Advanced page and just got:
Code: [Select]
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours-class.php:277 Stack trace: #0 /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours.php(133): fppAfterHours->getFPPActiveSoundCardName() #1 /opt/fpp/www/plugin.php(92): include_once('/home/fpp/media...') #2 {main} thrown in /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours-class.php on line 277

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 121
  • Kudos: 0
    • Crosslights Christmas
Re: After hours internet radio plugin
« Reply #32 on: December 05, 2018, 12:42:20 PM »
Immediately after install, I went to the Advanced page and just got:
Code: [Select]
Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours-class.php:277 Stack trace: #0 /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours.php(133): fppAfterHours->getFPPActiveSoundCardName() #1 /opt/fpp/www/plugin.php(92): include_once('/home/fpp/media...') #2 {main} thrown in /home/fpp/media/plugins/fpp-after-hours/fpp-after-hours-class.php on line 277



would you be able to provide me with the output of the following command from your instance (I haven't tested a bbb):
sudo aplay -l | grep '^card' | sed -e 's/^card //' -e 's/:[^\[]*\[/:/' -e 's/\].*\[.*\].*//' | uniq


I'm guessing the response format is slightly different.
I'll have to fire up my bbb and get it current (I didn't get my new p10 display into the show this year and it is just sitting there).


I have added the apt-get update and will push that and this fix together.

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,257
  • Kudos: 69
Re: After hours internet radio plugin
« Reply #33 on: December 05, 2018, 12:53:57 PM »



Code: [Select]

fpp@FPPMaster:~$ sudo aplay -l | grep '^card' | sed -e 's/^card //' -e 's/:[^\[]*\[/:/' -e 's/\].*\[.*\].*//' | uniq
1:HiFi-FMT / VAST ELECTRONICS

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 121
  • Kudos: 0
    • Crosslights Christmas
Re: After hours internet radio plugin
« Reply #34 on: December 05, 2018, 02:45:05 PM »



Code: [Select]

fpp@FPPMaster:~$ sudo aplay -l | grep '^card' | sed -e 's/^card //' -e 's/:[^\[]*\[/:/' -e 's/\].*\[.*\].*//' | uniq
1:HiFi-FMT / VAST ELECTRONICS


[size=78%]I believe I have fixed this issue. I was able to replicate it by using the output you provided.[/size]


Thank you!

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,257
  • Kudos: 69
Re: After hours internet radio plugin
« Reply #35 on: December 05, 2018, 03:04:48 PM »
I'll have to try tomorrow.  Show is running now and don't want to disrupt it.  :)


Offline KBCoggin

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 48
  • Kudos: 0
Re: After hours internet radio plugin
« Reply #36 on: December 05, 2018, 05:53:25 PM »
So i am currently running my pre-season lights, I have my show scheduled to launch on the 7th.  I have 3 schedules set right now.  First one starts the AHIR stream at 17:25 - 17:29 (should be 17:26, I just changed it), no repeat.  Screen shot of the playlist is attached. The second plays my pre-season sequence (5 mins long) on repeat until 22:56.  The past two nights, the music starts on time but the pre-season lights do not start until I reboot FPPD.  Any ideas why?  I know my pre-season sequence was working because I have been using it for a couple weeks and had no issues until I installed the AHIR plug-in. The third stops AHIR right on time with no known issues or repercussions that I am aware of - it does NOT have the "pause-1" because there is no more programming until the next day.

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 121
  • Kudos: 0
    • Crosslights Christmas
Re: After hours internet radio plugin
« Reply #37 on: December 05, 2018, 08:55:31 PM »
So i am currently running my pre-season lights, I have my show scheduled to launch on the 7th.  I have 3 schedules set right now.  First one starts the AHIR stream at 17:25 - 17:29 (should be 17:26, I just changed it), no repeat.  Screen shot of the playlist is attached. The second plays my pre-season sequence (5 mins long) on repeat until 22:56.  The past two nights, the music starts on time but the pre-season lights do not start until I reboot FPPD.  Any ideas why?  I know my pre-season sequence was working because I have been using it for a couple weeks and had no issues until I installed the AHIR plug-in. The third stops AHIR right on time with no known issues or repercussions that I am aware of - it does NOT have the "pause-1" because there is no more programming until the next day.

I am assuming that you have audio with your pre-season sequence.
To try to get you up and running again faster then waiting for our back and forth communications I believe the following configuration (see screenshot) will do what you are looking for:


« Last Edit: December 05, 2018, 09:42:17 PM by jcross »

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,257
  • Kudos: 69
Re: After hours internet radio plugin
« Reply #38 on: December 06, 2018, 06:43:35 AM »
Code: [Select]
fpp@FPPMaster:~$ sudo aplay -l | grep '^card' | sed -e 's/^card //' -e 's/:[^\[]*\[/:/' -e 's/\].*\[.*\].*//' | uniq
1:HiFi-FMT / VAST ELECTRONICS
I believe I have fixed this issue. I was able to replicate it by using the output you provided.

Thank you!


Just to follow up:  it's working great now.   :)




Offline KBCoggin

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 48
  • Kudos: 0
Re: After hours internet radio plugin
« Reply #39 on: December 06, 2018, 03:17:23 PM »
I am assuming that you have audio with your pre-season sequence.
To try to get you up and running again faster then waiting for our back and forth communications I believe the following configuration (see screenshot) will do what you are looking for:
No sir I do not.  I am using your very cool plugin to stream music over a somewhat "static" display.

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 121
  • Kudos: 0
    • Crosslights Christmas
Re: After hours internet radio plugin
« Reply #40 on: December 06, 2018, 03:33:57 PM »
I am assuming that you have audio with your pre-season sequence.
To try to get you up and running again faster then waiting for our back and forth communications I believe the following configuration (see screenshot) will do what you are looking for:
No sir I do not.  I am using your very cool plugin to stream music over a somewhat "static" display.


Okay,


I know I tested the plugin working with "Sequence only" playlist entries on the latest version of the plugin but not the old one.


Can you run the following command from the command line:
sudo /opt/fpp/scripts/update_plugin fpp-after-hours


This should get you onto the current version of the plugin.  You can test whether your playlist will work from the fpp Status/Control / Status Page.
Choose Playlist 1, hit play (the after hours plugin should start the music)
Choose Playlist 2, hit play (the pre-season sequence should start and lights should activate, ensure elapsed and remaining counters are changing), if so, hit stop now
Choose Playlist 3, hit play (the after hours plugin should stop the music)


Attached is another option for configuring this scenario using a single schedule

Offline KBCoggin

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 48
  • Kudos: 0
Re: After hours internet radio plugin
« Reply #41 on: December 07, 2018, 10:07:13 AM »
Can you run the following command from the command line:
sudo /opt/fpp/scripts/update_plugin fpp-after-hours


This should get you onto the current version of the plugin.  You can test whether your playlist will work from the fpp Status/Control / Status Page.
Choose Playlist 1, hit play (the after hours plugin should start the music)
Choose Playlist 2, hit play (the pre-season sequence should start and lights should activate, ensure elapsed and remaining counters are changing), if so, hit stop now
Choose Playlist 3, hit play (the after hours plugin should stop the music)


Attached is another option for configuring this scenario using a single schedule


Ok I have done this and it updated 5 files I believe.  I played the playlists and they seem to have worked just fine.  Tonight is the last night for my pre-season, I start my show tomorrow.  The only reason i didn't put it all in one playlist is because the sequence is only 5 minutes long, so the music would start and stop every 5 minutes, would it not?

Offline jcross

  • Developer
  • ******
  • Join Date: Dec 2014
  • Location: Brandon, Manitoba, Canada
  • Posts: 121
  • Kudos: 0
    • Crosslights Christmas
Re: After hours internet radio plugin
« Reply #42 on: December 07, 2018, 10:12:36 AM »
Can you run the following command from the command line:
sudo /opt/fpp/scripts/update_plugin fpp-after-hours


This should get you onto the current version of the plugin.  You can test whether your playlist will work from the fpp Status/Control / Status Page.
Choose Playlist 1, hit play (the after hours plugin should start the music)
Choose Playlist 2, hit play (the pre-season sequence should start and lights should activate, ensure elapsed and remaining counters are changing), if so, hit stop now
Choose Playlist 3, hit play (the after hours plugin should stop the music)


Attached is another option for configuring this scenario using a single schedule


Ok I have done this and it updated 5 files I believe.  I played the playlists and they seem to have worked just fine.  Tonight is the last night for my pre-season, I start my show tomorrow.  The only reason i didn't put it all in one playlist is because the sequence is only 5 minutes long, so the music would start and stop every 5 minutes, would it not?


When a playlist is run through a schedule on repeat the "Lead-In" and "Lead-Out" are only processed once.  The Main Loop is the only part of the playlist that is looped.

Offline KBCoggin

  • Newbie
  • *
  • Join Date: Nov 2018
  • Location:
  • Posts: 48
  • Kudos: 0
Re: After hours internet radio plugin
« Reply #43 on: December 07, 2018, 10:24:55 AM »

When a playlist is run through a schedule on repeat the "Lead-In" and "Lead-Out" are only processed once.  The Main Loop is the only part of the playlist that is looped.
Changing now!  Thank you so much for all your help!
« Last Edit: December 07, 2018, 10:33:05 AM by KBCoggin »

 

Back to top