News:

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

+-+-

+-User

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

+-Site Stats

Members
Total Members: 16427
Latest: digilabpg
New This Month: 21
New This Week: 2
New Today: 0
Stats
Total Posts: 132342
Total Topics: 16406
Most Online Today: 126
Most Online Ever: 7634
(January 21, 2020, 02:14:03 AM)
Users Online
Members: 1
Guests: 66
Total: 67

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

configuration by morrydavis
April 23, 2024, 04:34:20 PM

FP 7.5 Crash after approximately 440 loads of the same Playlist, memory full by CaptainMurdoch
April 23, 2024, 03:48:12 PM

F32v5 Release Date by JonD
April 23, 2024, 09:14:57 AM

MQTT with Home Assistant, model control only lights up some pixels. by CaptainMurdoch
April 22, 2024, 01:30:45 PM

Looking for a way to "fast forward" a video playlist by Jayl
April 18, 2024, 03:20:31 PM

P9-28 and P9-29 not work by windaube
April 15, 2024, 03:40:34 PM

Resetting or Removing FPP Password (with Windows) by greenreader9
April 14, 2024, 06:21:46 PM

Enclosure for Video Projectors by Scott
April 14, 2024, 12:00:50 PM

Born in the USA by Xmas!
April 13, 2024, 03:25:16 PM

1200w HP Power Supplies by MikeKrebs
April 12, 2024, 08:53:19 PM

Powered by EzPortal
Powered by SMFPacks Menu Editor Mod