HTTP Json API

/api/screen

POST http://<IP>/api/screen
{
    // [Optional]
    "sleepMode": false, // [ true | false ] 

    // [Optional]
    "brightness": 125, // [0 - 255], [Optional]

    // [Optional]
    "switchAnimation": {
        "aktiv": true, // [ true | false ]
        "animation": "fade" // [ "fade" | "coloredBarWipe" ]
    },

    // [Optional]
    "clock": {
        "show": true, // [ true | false ]
        "switchAktiv": true, //[ true | false ]
        "withSeconds": true, //[ true | false ]
        "switchSec": 5, // [ 1 - 9999 ]

        // [Optional]
        "color": {
            "r": 255, // [0 - 255]
            "g": 255, // [0 - 255]
            "b": 255 // [0 - 255]        
        }
    },

    // [Optional]
    "bitmap": {
        "data": [0, 0, 0, 0, 0, 0], //[ 0,0,0......]
        "position": {
            "x": 0,
            "y": 0
        },
        "size": {
            "width": 8,
            "height": 8
        }
    },

    // [Optional] [Es werden hier nur 8x8 BMPs unterstützt!]
    "bitmapAnimation": {
        "data": [
            [0, 0, 0, 0, 0, 0],
            [0, 0, 0, 0, 0, 0],
            [0, 0, 0, 0, 0, 0]
        ], // [[ 0,0,0......],[ 0,0,0......],[ 0,0,0......],[ 0,0,0......]]
        "animationDelay": 20, // Millisekunden
        // [Optional]
        "rubberbanding": false, // [true | false]
        // [Optional]
        "limitLoops": 0 // < 0 = No Limit >
    },

    // [Optional]
    "bar": {
        "position": {
            "x": 0,
            "y": 0,
            "x2": 0,
            "y2": 0
        },
        "color": {
            "r": 255, // [0 - 255]
            "g": 255, // [0 - 255]
            "b": 255 // [0 - 255]   
        }
    },

    // [Optional]
    "bars": [{
        "position": {
            "x": 0,
            "y": 0,
            "x2": 0,
            "y2": 0
        },
        "color": {
            "r": 255, // [0 - 255]
            "g": 255, // [0 - 255]
            "b": 255 // [0 - 255]   
        }
    }],

    // [Optional]
    "text": {
        "textString": "Test It :D",
        "bigFont": false, // [true | false]
        "scrollText": "auto", // [ true | false | "auto"]
        "scrollTextDelay": 20, // [1 - 9999],
        // [Optional] nur verwendbar wenn scrollText = false !
        "centerText": true, // [true | false],
        "position": {
            "x": 8,
            "y": 1
        },
        "color": {
            "r": 255, // [0 - 255]
            "g": 255, // [0 - 255]
            "b": 255 // [0 - 255]   
        }
    },

    // [Optional] Option 1 siehe Info!   
    "sound": {
        "volume": 20, // 0 - 30
        "control": "play", // play, pause
        "folder": 1, // 1 - 99
        "file": 1 // 1 - 255
    },

    // [Optional] Option 2 siehe Info! 
    "sound": {
        "volume": 20, // 0 - 30
        "control": "play", // play, pause, next, previous
        "file": 1 // 1 - 3000
    }
}

Link zu den Sound Option 1 und Option 2  !

/api/luxsensor

 

GET http://<IP>/api/luxsensor
{
    "lux": 107.0217
}

/api/config

GET http://<IP>/api/config
{
  "matrixtBrightness": 85,
  "matrixType": 2,
  "matrixTempCorrection": "typicalsmd5050",
  "ntpServer": "de.pool.ntp.org",
  "clockTimeZone": 1,
  "scrollTextDefaultDelay": 110,
  "bootScreenAktiv": false,
  "mqttAktiv": true,
  "mqttUser": "",
  "mqttPassword": "",
  "mqttServer": "192.168.0.251",
  "mqttMasterTopic": "Haus/PixelIt/",
  "mqttPort": 1883
}

 

POST http://<IP>/api/config
{
    "matrixtBrightness": [0 - 255],
  	"matrixType": [1,2], <Type 1 = NEO_MATRIX_COLUMNS , Type 2 =  NEO_MATRIX_ROWS>
  	"matrixTempCorrection": "default", <tungsten40w (2600 Kelvin) | tungsten100w (2850 Kelvin) | halogen (3200 Kelvin) | carbonarc (5200 Kelvin) | highnoonsun (5400 Kelvin) | directsunlight (6000 Kelvin) | overcastsky (7000 Kelvin) | clearbluesky (20000 Kelvin)......>
  	"ntpServer" : "de.pool.ntp.org" <or IP-Address>
    "clockTimeZone" : 1, <Berlin (Germany - Berlin) UTC + 1>
    "scrollTextDefaultDelay": 100 <millis>
	"bootScreenAktiv": [ true , false ],
    "mqttAktiv": [ true , false ],
    "mqttServer": "<IP>",
    "mqttMasterTopic": "Haus/PixelIt/",
    "mqttPort": <PORT>
}

/api/matrixinfo

GET http://<IP>/api/matrixinfo
{
	"pixelitVersion": "1910272052",
	"sketchSize": 451360,
	"freeSketchSpace": 593920,
	"wifiRSSI": "-73",
	"wifiQuality": 54,
	"wifiSSID": "Home-Wlan",
	"ipAddress": "192.168.0.137",
	"freeHeap": 30680,
	"chipID": 13668362,
	"cpuFreqMHz": 80,
	"sleepMode": false
}

/api/dhtsensor

 

GET http://<IP>/api/dhtsensor
{
	"humidity": 40,
	"temperature": 21.5
}