Skip to content

HTTP EndPoints

Lucas Morgan edited this page Dec 29, 2018 · 3 revisions

GET, POST, HTTP EndPoints

192.168.1.xxx/

  • HTTP: This home page displays memory use and pin status.

192.168.1.xxx/survey/

  • HTTP: This command returns a visual graph that shows SSID's and their respective signal strength in the eyes of that particular PxlNode.

192.168.1.xxx/getstatus/

  • HTTP: Returns some information about the PxlNode's status.

192.168.1.xxx/getframes/

  • HTTP: This command returns a list of several seconds of received frame diagnostic data. Useful to query this right after a stutter, or visual glitch to see where the problem might lie.

192.168.1.xxx/edit/

  • HTTP: This page is where files may be uploaded, intended primarily for uploading / managing sprites.

192.168.1.xxx/mcu_json/

  • GET: When this endpoint receives a GET request it returns information about the device in a JSON formatted string. Here's an example of what it would return.
{
    "device_name": "PxlNode-8266",
    "ip": "192.168.1.2",
    "ssid": "MySSID",
    "udp_streaming_port": 2390,
    "packetsize": 213,
    "chunk_size": 64,
    "pixels_per_strip": 640,
    "ma_per_pixel": 60,
    "amps_limit": 20,
    "warmup_color": [
        200,
        75,
        10
    ],
    "totalBytes": 957314,
    "usedBytes": 17068,
    "blockSize": 8192,
    "pageSize": 256,
    "maxOpenFiles": 5,
    "maxPathLength": 32
}
  • POST: When the endpoint receives a POST request, it is assumed that the message is a JSON string and will be parsed expecting certain variables. The following is a valid example:
{
    "device_name": "PxlNode-8266",
    "udp_streaming_port": 2390,
    "chunk_size": 64,
    "pixels_per_strip": 256,
    "ma_per_pixel": 60,
    "amps_limit": 3,
    "warmup_color": [
        200,
        75,
        10
    ]
}
  • Once you have a command put together as a simple string, you'll send that to your PxlNode as a POST command where plain='argument' ( not as raw post data ) or as a JSON

  • There are a few limitations: device_name must not contain spaces and is limited to 64 characters. pixels_per_strip cannot be greater than 1500. chunk_size cannot be greater than 200. udp_streaming_port cannot be greater than 65535 warmup_color no value can be greater than 255

192.168.1.xxx/play

  • POST: When the endpoint receives a POST Command at this address it's expecting a command structured one of several ways. This can trigger a simple hue shift, or a sprite effect to play.