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: 16520
Latest: tanyadai
New This Month: 8
New This Week: 0
New Today: 0
Stats
Total Posts: 133087
Total Topics: 16541
Most Online Today: 33
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 0
Guests: 24
Total: 24

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

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

HELP - Panels Blown or PocketScroller messed up by DaSarge
September 06, 2024, 07:38:55 AM

PiCap-V2 String port webpage display issue by JonD
September 06, 2024, 06:00:13 AM

Recent update broke ArtNet Advanced Plugin on RasPi only by k6ccc
September 05, 2024, 04:28:51 PM

REST API: Start playlist and set repeat flag to true by Pweazle
September 05, 2024, 02:46:33 AM

Overlaying 2 or 3 videos in falcon player by darylc
September 05, 2024, 01:05:52 AM

Control lights directly from the GPIO of a PI by tbone321
September 04, 2024, 12:40:13 AM

FPP 8.0 Released! by dkulp
September 03, 2024, 07:05:20 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod