FalconChristmas / fpp

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

MQTT command to enable or disable a port without restarting FPP #1673

Closed CaffeinatedFunctionality closed 5 months ago

CaffeinatedFunctionality commented 1 year ago

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I mainly just run through a lot of snow fluid and people aren't always watching the show. I'd like to use Ai and MQTT to fix this.

*Describe the solution you'd like I currently have my snow machine running with DMX throughout the whole song on certain songs. It would be awesome if it would disable or enable that DMX port without needing to restart FPP programmatically. This way we could use Ai to determine if people are watching the show. If so then MQTT could trigger a command to flip the switch and activate it. Considering this is just adding a command I wouldn't mind contributing this to the repo but my only concern is if it's possible to have it activate and deactivate the port without having to restart FPP. If this is plausible and you don't have time to do it let me know and I will get on this one.

Describe alternatives you've considered I could not use DMX and just have it plugged in and use an MQTT plug. I just don't like that solution.

darylc commented 1 year ago

You can acheive this a number of ways through existing functionality, like running an effect on those channels (via a model overlay if you wish), or running an effect sequence with channel values of 0 etc. That how I block my DMX machines from wasting fluid when I don't want them to run.

CaffeinatedFunctionality commented 1 year ago

True but with that I'd have to say there is more logic involved I believe. I guess running an effect sequence could work but I would feel that's more setup. The easiest method would be enabling or disabling the port in my opinion. The only issue I have is FPP always asks to be restarted for that. I am not sure of the exact reason for this or if there is a way to circumvent the need for the restart FPP.

cpinkham commented 1 year ago

fppd restarts so quickly (even quicker when using "fpp -r" to restart), that we haven't focused a lot of attention on things like the ability to dynamically turn on/off channel outputs without having to restart the daemon. A patch would be considered, but it would have to support all channel outputs, not just a one-off MQTT or API call that disables an individual output.

dkulp commented 1 year ago

It would be a TON of work to add to all the various outputs, and I'm uncertain of the benefit. It would be "rare" (in my experience) that a single thing would be on a DMX output. Turning the entire thing off would disable everything. Also, particularly for DMX devices, a lot of them go into a test pattern if a signal is not received which also would not be desirable.

My gut feeling is this could be a great addition to the brightness plugin. The ability to set a brightness on a range of channels (instead of all channels) via an FPP Command could be useful for a lot of things. In your case, setting brightness to "0" for the snow machine ranges could turn it off (and back to 100% for normal), but could also be used to adjust individual props while filming displays if they are over exposing the camera or similar.