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: 16967
Latest: Jrbrown
New This Month: 5
New This Week: 0
New Today: 0
Stats
Total Posts: 135728
Total Topics: 17041
Most Online Today: 135
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 116
Total: 116

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

E1.31 Bridge Mode - Crash by Poporacer
July 13, 2025, 10:54:02 PM

Falcon 16v4 configuring to smart receivers by Jack S
July 13, 2025, 01:17:17 PM

E fuse api by Jrbrown
July 12, 2025, 08:06:48 PM

FPP VS eero home network Static IP challenges by JonD
July 11, 2025, 06:11:50 PM

Setting up a wired on demand show on Pi/ FPP to push a show to Falcon Controller by lunchour
July 03, 2025, 03:57:56 PM

ELM (Enttec LED Mapper) and FPP with bare RPi questions by ericjforman
July 02, 2025, 03:10:16 PM

xCapture Playback Issues by ericjforman
July 02, 2025, 11:38:48 AM

fpp-Capture by ericjforman
July 02, 2025, 11:37:53 AM

FM Transmitter – Si4713 by jnealand
June 25, 2025, 08:46:47 AM

Limit for GPIO pixels by Poporacer
June 18, 2025, 07:13:49 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod