News:

Server migration complete, Welcome to version 2.1.1

+-+-

+-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: 48
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 1
Guests: 34
Total: 35

Call command preset from script

Started by Aaron Maue, January 12, 2023, 11:09:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Aaron Maue

Is there a way to call a command preset from a script?  There are scripts in the repository for calling the old "events," but nothing for the new command presets.  Is it possible with the command preset implementation?  If so, what is the syntax to make the call?

darylc

yes, call the http api with a URL something like http://192.168.33.237/api/command/Trigger%20Command%20Preset%20Slot/22

Edit the ip address and slot number at the end and use the program of your choice to call the url in your script.

CaptainMurdoch

You can also use the 'fpp' command line helper to trigger the command preset slot number or name.

fpp -t 22
fpp -t "PLAYLIST_STARTED"
fpp -t "Your Preset Name"

Another way is to trigger command presets using the "Trigger Command Preset" FPP Command, which you can run via multiple ways including via the REST API.
-
Chris

Aaron Maue

Thanks, Chris!  I really appreciate the great support from all of you.

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