diff --git a/docs/api.md b/docs/api.md index 0ee63331..e7b4f867 100644 --- a/docs/api.md +++ b/docs/api.md @@ -1,5 +1,33 @@ # MQTT / HTTP API +## Table of Contents + * [Overview](#overview) + * [Status Retrieval](#status-retrieval) + * [LiveView](#liveview) + * [Power Control](#power-control) + * [Sound Playback](#sound-playback) + * [Mood Lighting](#mood-lighting) + * [Colored Indicators](#colored-indicators) + * [Custom Apps and Notifications](#custom-apps-and-notifications) + + [Interaction](#interaction) + + [JSON Properties](#json-properties) + - [Example](#example) + + [Drawing Instructions](#drawing-instructions) + + [Example](#example-1) + + [Display Text in Colored Fragments](#display-text-in-colored-fragments) + + [Sending Multiple Custom Pages Simultaneously](#sending-multiple-custom-pages-simultaneously) + + [Delete a Custom App](#delete-a-custom-app) + + [Dismiss Notification](#dismiss-notification) + + [Switch Apps](#switch-apps) + + [Switch to Specific App](#switch-to-specific-app) + * [Change Settings](#change-settings) + + [JSON Properties](#json-properties-1) + * [Update](#update) + - [Reboot Awtrix](#reboot-awtrix) + - [Erase Awtrix](#erase-awtrix) + - [Clear Settings](#clear-settings) + + ## Overview This API documentation covers various functionalities such as retrieving device statistics, screen mirroring, notifications, customapps, sound playing, and mood lighting. You can interact with these features via both MQTT and HTTP protocols. @@ -141,7 +169,7 @@ Below are the properties you can utilize in the JSON object. **All keys are opti | Key | Type | Description | Default | Custom App | Notification | | --- | ---- | ----------- | ------- | ------- | ------- | -| `text` | string | The text to display. | N/A | X | X | +| `text` | string | The text to display. Keep in mind the font does not have a fixed size and `I` uses less space than `W`. This facts affects when text will start scrolling | N/A | X | X | | `textCase` | integer | Changes the Uppercase setting. 0=global setting, 1=forces uppercase; 2=shows as it sent. | 0 | X | X | | `topText` | boolean | Draw the text on top. | false | X | X | | `textOffset` | integer | Sets an offset for the x position of a starting text. | 0 | X | X | @@ -175,7 +203,7 @@ Below are the properties you can utilize in the JSON object. **All keys are opti | `noScroll` | boolean | Disables the text scrolling. | false | X | X | | `clients` | array of strings | Allows forwarding a notification to other awtrix devices. Use the MQTT prefix for MQTT and IP addresses for HTTP. | | | X | | `scrollSpeed` | integer | Modifies the scroll speed. Enter a percentage value of the original scroll speed. | 100 | X | X | -| `effect` | string | Shows an [effect](https://blueforcer.github.io/awtrix-light/#/effects) as background. | | X | X | +| `effect` | string | Shows an [effect](https://blueforcer.github.io/awtrix-light/#/effects) as background.The effect can be removed by sending an empty string for effect| | X | X | | `effectSettings` | json map | Changes color and speed of the [effect](https://blueforcer.github.io/awtrix-light/#/effects). | | X | X | | `save` | boolean | Saves your custom app into flash and reloads it after boot. Avoid this for custom apps with high update frequencies because the ESP's flash memory has limited write cycles. | | X | |