News:

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

+-+-

+-User

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

+-Site Stats

Members
Total Members: 16522
Latest: MrLV83
New This Month: 10
New This Week: 2
New Today: 1
Stats
Total Posts: 133121
Total Topics: 16545
Most Online Today: 66
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 2
Guests: 32
Total: 34

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

New K16s by tetleytealeaf
September 10, 2024, 08:36:29 PM

Setting up FPP and Xlights to talk to PCA9685 (Servos) by Poporacer
September 10, 2024, 05:21:56 PM

Can I control 12 volt WS2811 Pixels with the PI Hat. by tbone321
September 10, 2024, 04:06:04 PM

P5 Matrix on FPP 8.0 help by cmora111
September 10, 2024, 02:27:47 PM

Falcon srx1 psu problem by Vet4Christ
September 10, 2024, 04:34:56 AM

HELP - Panels Blown or PocketScroller messed up by DaSarge
September 09, 2024, 05:03:25 PM

Lights don't work on K16 by jnealand
September 09, 2024, 07:23:53 AM

LED Panel issue after upgrade to v8 by k6ccc
September 06, 2024, 05:54:33 PM

Leave eth0 Gateway blank by colonelcline
September 06, 2024, 09:19:53 AM

FPP After Hours Music Plugin has been updated by ckuhner
September 06, 2024, 07:58:54 AM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod