News:

LATEST RELEASE:  FPP 8.5.1 - Download from here - https://github.com/FalconChristmas/fpp/releases/tag/8.5

+-+-

+-User

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+-Site Stats

Members
Total Members: 16897
Latest: 1492
New This Month: 13
New This Week: 1
New Today: 0
Stats
Total Posts: 135488
Total Topics: 16988
Most Online Today: 143
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 127
Total: 127

use api to turn on all lights to a specific color

Started by calioptrix, December 09, 2020, 08:00:40 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

calioptrix

the xschedule webpage has a test plugin that can turn all the lights on a certain color. How do I replicate this functionality with http get/post requests?

CaptainMurdoch

Create a Pixel Overlay Model which includes channels for your whole display and then use the REST API to call the FPP Commands to turn the model on/off, set the color, etc..

See http://yourfppip/apihelp.php and http://yourfppip/api/commands for more info on usage.
-
Chris

calioptrix

I've tried the fill command but I'm not getting any lights. I have one strand of 50 lights. Start channel is 1.

Here's the output of /api/models


[{"ChannelCount":150,"ChannelCountPerNode":3,"Name":"Test1","Orientation":"horizontal","StartChannel":1,"StartCorner":"TL","StrandsPerString":1,"StringCount":1}]



using apihelp.php, I tried to send a fill put command but nothing happens.

PUT /api/api/overlays/model/Test1/fill
{  "RGB": [    255,    0,    0  ] }
{
  "Status": "OK",
  "Message": ""
}


I've tried with fppd in player (standalone) mode and bridge mode.

If I try the pixel command /api/overlays/model/Test1/pixel

{  "X": 1,  "Y": 1,  "RGB": [    255,    0,    0  ] }

I get a proxy error?

<h1>Proxy Error</h1>
<p>The proxy server received an invalid
response from an upstream server.

CaptainMurdoch

Here are some example usages:

# enable the P10Matrix overlay model
curl -X PUT -d '{ "State": 1 }' http://192.168.3.122/api/overlays/model/P10Matrix/state
# fill the P10Matrix model with red
curl -X PUT -d '{ "RGB": [ 255, 0, 0 ] }' http://192.168.3.122/api/overlays/model/P10Matrix/fill
# clear the P10Matrix model by filling it with black
curl -X PUT -d '{ "RGB": [ 0, 0, 0 ] }' http://192.168.3.122/api/overlays/model/P10Matrix/fill
# disable the P10Matrix model
curl -X PUT -d '{ "State": 0 }' http://192.168.3.122/api/overlays/model/P10Matrix/state
-
Chris

Support FPP

+- Recent Topics

PixelOverlay-Clock - Revisited Again by jnealand
March 18, 2025, 06:00:53 PM

PixelOverlay-Clock.php works but I have questions... by datajack
March 18, 2025, 04:38:32 AM

Backup Feature not functional by efamlights
March 16, 2025, 11:58:28 AM

WS2811, Raspberry Pi 5, GPIO, could not initialize. by Ulysse-srfc24
March 16, 2025, 05:07:48 AM

K16A-B Issue by nolatron
March 15, 2025, 01:52:26 PM

F16V5 and SRx1 v5 by jkp
March 15, 2025, 07:19:44 AM

Differential Board: PSU & Enclosure by hakko808
March 14, 2025, 09:17:01 AM

FPP 8.4 Back up by Jradical
March 13, 2025, 05:38:18 AM

FPP on Pi5 won't start with "FPPD boot delay" set to 2 min or higher by dnapier65
March 12, 2025, 05:39:00 PM

OBJ File in Sketchup by dspenman
March 11, 2025, 09:19:08 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod