Author Topic: Controlling FPP via web requests / CURL  (Read 368 times)

Offline Sonny_Jim

  • Newbie
  • *
  • Join Date: May 2019
  • Location:
  • Posts: 4
  • Kudos: 0
Controlling FPP via web requests / CURL
« on: May 28, 2019, 05:35:40 AM »
Is there any way I can trigger fpp to start playing a sequence by using (for example) CURL?  I see there is some talk of JSON endpoints but no documentation that I could find.


Thanks

Offline k6ccc

  • Hero Member
  • *****
  • Join Date: Mar 2015
  • Location: Glendora, Calif, U.S.A. (near Los Angeles)
  • Posts: 507
  • Kudos: 6
    • Newburgh Lights
Re: Controlling FPP via web requests / CURL
« Reply #1 on: May 28, 2019, 09:11:40 AM »
See this thread.  It's essentially in Alpha Test at this time...
https://falconchristmas.com/forum/index.php/topic,10365.0.html
Using LOR (mostly SuperStar) for all sequencing - using FPP only to drive P5 and P10 panels.
Jim

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Controlling FPP via web requests / CURL
« Reply #2 on: May 28, 2019, 12:53:51 PM »
If you want basic control via CURL, check out the example scripts in the FPP Script Repository under the Content Setup menu section.  There are lots of examples of starting/stopping playlists and effects and triggering events.
-
Chris

Offline Sonny_Jim

  • Newbie
  • *
  • Join Date: May 2019
  • Location:
  • Posts: 4
  • Kudos: 0
Re: Controlling FPP via web requests / CURL
« Reply #3 on: May 28, 2019, 06:41:57 PM »

Offline CaptainMurdoch

  • Administrator
  • *****
  • Join Date: Sep 2013
  • Location: Washington
  • Posts: 9,856
  • Kudos: 214
Re: Controlling FPP via web requests / CURL
« Reply #4 on: May 28, 2019, 09:53:00 PM »
I guess you mean here:

https://github.com/FalconChristmas/fpp-scripts/blob/master/RemoteControl/Remote-StartPlaylist.sh

Yes, that's one example.  You can preview all those scripts from the FPP UI in the "Script Repository Browser" page.  If desired, you can then install the scripts and edit them using the FPP File Manager UI.

Offline Sonny_Jim

  • Newbie
  • *
  • Join Date: May 2019
  • Location:
  • Posts: 4
  • Kudos: 0
Re: Controlling FPP via web requests / CURL
« Reply #5 on: May 29, 2019, 04:13:49 AM »

Quote
[size=0px]If desired, you can then install the scripts[/size]
I think you misunderstood my question, I'd like to be able to control playlist start/stop via an 3rd party application (in this case, ifttt.com), rather than using an existing fppd to trigger another one.  So there's no need to install the script, I'm just interested on how the triggering works


In any case, I got it working without having to install the scripts and can use my Google Home to turn my lights on and off.  The web request seems to work without any authentication, which could be a security issue if anyone should decide to expose their fpp to the internet.

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,583
  • Kudos: 92
    • KulpLights.com
Re: Controlling FPP via web requests / CURL
« Reply #6 on: May 29, 2019, 05:54:18 AM »
If using some sort of home automation, you might be better off using the MQTT commands.   


The UI does have a password thing, but I'm pretty sure it's completely broken and a bunch of things will stop working if you try and set one.   I've debated just removing it. 

Offline Sonny_Jim

  • Newbie
  • *
  • Join Date: May 2019
  • Location:
  • Posts: 4
  • Kudos: 0
Re: Controlling FPP via web requests / CURL
« Reply #7 on: May 29, 2019, 06:54:35 AM »
The UI does have a password thing, but I'm pretty sure it's completely broken and a bunch of things will stop working if you try and set one.   I've debated just removing it.


Yeah I've just tried it with a UI password set and it correctly asks for authentification before running any of the fppxml.php stuff, which is good.


Quote
[size=0px]If using some sort of home automation, you might be better off using the MQTT commands. [/size]
[size=0px]Is there any documentation for that?  Or is a case of just reading the source?[/size]

[size=0px]p.s How come I still need to type in CAPTCHAs each time I post a message?[/size]

Offline dkulp

  • Developer
  • ******
  • Join Date: Sep 2013
  • Location: Framingham, MA
  • Posts: 1,583
  • Kudos: 92
    • KulpLights.com
Re: Controlling FPP via web requests / CURL
« Reply #8 on: May 29, 2019, 06:59:24 AM »
The UI does have a password thing, but I'm pretty sure it's completely broken and a bunch of things will stop working if you try and set one.   I've debated just removing it.
Yeah I've just tried it with a UI password set and it correctly asks for authentification before running any of the fppxml.php stuff, which is good.

Yea.. but there are bunch of places that need to call it that won't specify the password.   The OLED's won't display correctly, FPP connect won't work, I'm pretty sure it wipes out the settings that allow configuring the large tables (output tables), etc... 

[/size]
Quote

Quote
If using some sort of home automation, you might be better off using the MQTT commands.
Is there any documentation for that?  Or is a case of just reading the source?
p.s How come I still need to type in CAPTCHAs each time I post a message?
If you to the Settings ->Advanced Settings, it lists the events it responds to.   Not a lot of details, but very basic info.   Source is good, and patches to add even more is even better.  :)

Offline jnealand

  • Developer
  • ******
  • Join Date: Aug 2013
  • Location: Kennesaw, GA
  • Posts: 2,936
  • Kudos: 68
Re: Controlling FPP via web requests / CURL
« Reply #9 on: May 29, 2019, 01:55:03 PM »
capchas go away after the 4th or 5th post.
Jim Nealand
Kennesaw, GA all Falcon controllers, all 12v Master Remote Multisync with Pi and BBB P10 and P5

 

Back to top