FalconChristmas / fpp

Falcon Player
http://FalconChristmas.com
Other
569 stars 202 forks source link

Add a way to trigger stuff on remote based on which sequence is playing on master #909

Closed Jchuchla closed 3 years ago

Jchuchla commented 3 years ago

I've got an application where I'd like to use a remote FPP system to do actions based on which sequence is playing on the master. The remote isn't playing any media or sequences in my case. It's would be doing scripted actions.

I'm currently accomplishing the end result by running the remote in bridge mode and embedding values in each sequence and using control channels on the bridge mode FPP to trigger scripts. It's a bit inconvenient because I need to maintain a set of unique value IDs for each sequence (to use on the control channels) and make sure they match in the sequence, and in the events on the remote pi. It would be much easier if the remote pi could trigger events based on the receipt of the multisync packet saying a sequence has started.

An even simpler way to add it might be to tie it in to the remote multisync code that starts media or sequences with matching names to what the master is playing. In this case, you could just execute SequenceName.sh if it exists when a sequence starts.

bigwavedave42 commented 3 years ago

You can already run remote commands from the playlist on the master. Instead of choosing a sequence in the playlist, you can use FPP Command and trigger something remotely. It would have to be something happening at the beginning of a sequence. I think this would be much less complicated than what you are suggesting.

I currently trigger remote effects, turning on a Tune To sign during the lead-in of my playlist, and similar for turning off in the lead out. That is all on a remote. It can just as easily be something happening between sequences. FPP Command -> Remote Run Script seems like what you might need.

...or I'm totally misunderstanding what you're trying to do.

Jchuchla commented 3 years ago

You've got the idea, and I can certainly do it with commands. This is just another (Better or easier?) way to skin a cat using info already being generated. In fact I do use a few commands in the master playlist to do remote script stuff to control my projector power and shutter. It's only marginally better though that what I've got with the control channels and events. My control channel mechanism was in use long before commands came around in FPP. Sure commands in the playlist saves the need to set up events on the remote, and the need for it to be in bridge mode. But it's just moving the management of calling the scripts from the sequences to the playlist. It makes for a more cluttered playlist (and mine is already quite crowded) The idea behind this request is that the multisync data is already being sent on the network by the master and it does so with no need to do anything at all in the playlist on the master. The remotes automatically see this information and act on it already to play sequences and media. So this would keep the playlists clean and I'd just need to manage the scripting in one place. I'm just asking for some sort of hook to use the multicast info so I can hook it into scripts on the remote side.

cpinkham commented 3 years ago

I'm thinking this might be a good use of an events or monitoring plugin that would just have a defined set of events the user could enable/disable while specifying a FPP command to run for each.

Possible events:

It could even have events for other things such as disk space and fppd warnings (sACN/E1.31 controller offline, etc.)

Users have been asking for some of this already, to send an email or other notification when certain conditions occur.

cpinkham commented 3 years ago

I am going to look at implementing this by extending FPP's event system to have 'named' events. The underlying code supports it already, we just need the UI updated to support it and to add the hooks in the code to trigger the named events. I already did a little testing and think this would be the easiest way and would make use of a good base of functionality we already have.

patdelaney commented 3 years ago

@Jchuchla Have you had a chance to test this out?

Jchuchla commented 3 years ago

I’m trying to remember where I left off on this one. I know I got something working last season but not sure what I did. That pi is buried deep in storage so I won’t get to it for a few months.

—Jon Chuchla—

Sent from my iPhone

On Aug 1, 2021, at 2:28 PM, patdelaney @.***> wrote:



@Jchuchlahttps://github.com/Jchuchla Have you had a chance to test this out?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/FalconChristmas/fpp/issues/909#issuecomment-890573524, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABMSGQEUD4XAFCLLR7DLT5DT2WN4NANCNFSM4UPM3GJQ.