update
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
# AWTRIX LIGHT
|
# AWTRIX LIGHT
|
||||||
|
|
||||||
> Awtrix Light is a custom firmware for the Ulanzi Smart Pixel clock.
|
> Custom firmware for the Ulanzi Smart Pixel clock.
|
||||||
|
|
||||||
|
|
||||||
[GitHub](https://github.com/Blueforcer/awtrix-light)
|
[GitHub](https://github.com/Blueforcer/awtrix-light)
|
||||||
|
|||||||
@@ -9,11 +9,7 @@
|
|||||||
- [Onscreen](onscreen.md)
|
- [Onscreen](onscreen.md)
|
||||||
|
|
||||||
- Features
|
- Features
|
||||||
|
- [Custom Pages & Notifications](custom.md)
|
||||||
- [Alarm clock](alarm.md)
|
- [Alarm clock](alarm.md)
|
||||||
- [Icons](icons.md)
|
- [Timer](timer.md)
|
||||||
|
- [Icons](icons.md)
|
||||||
- MQTT
|
|
||||||
|
|
||||||
- [Custom Pages](custom.md)
|
|
||||||
- [Timer](timer.md)
|
|
||||||
42
docs/alarm.md
Normal file
42
docs/alarm.md
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Alarm Clock
|
||||||
|
|
||||||
|
AWTRIX Light now includes an alarm clock feature that allows you to set alarms using an `alarms.json` file.
|
||||||
|
The JSON object contains an array of alarms with different properties, which are explained below.
|
||||||
|
To create a new alarm, add a new object to the "alarms" array with the desired properties, following the same format as the existing alarms. You do not need to restart AWTRIX in order to update your alarms.
|
||||||
|
|
||||||
|
## JSON Properties
|
||||||
|
|
||||||
|
| Key | Type | Description |
|
||||||
|
| --- | ---- | ----------- |
|
||||||
|
| `hour` | number | The hour at which the alarm should go on, specified in 24-hour format. |
|
||||||
|
| `minute` | number | The minute at which the alarm should go on. |
|
||||||
|
| `days` | string | A string representing the days on which the alarm should go off, where "0" represents Monday, "1" represents Tuesday, and so on up to "6" for Sunday. Multiple days can be specified as a string of digits, for example "0123456" would represent an alarm set for every day of the week. |
|
||||||
|
| `sound` | string | An optional string representing the name of the soundfile (without extension) to play when the alarm starts. This sound repeats as long the alarm is on. |
|
||||||
|
| `snooze` | number | An optional integer representing the number of minutes for which the alarm should be snoozed when the snooze button is pressed. |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Using the Alarm Clock
|
||||||
|
|
||||||
|
To set an alarm, create an `alarms.json` with the integrated filebrowser and add one or more alarm objects. When the alarm starts, press the middle button to snooze for the specified amount of time, or hold the middle button to turn off the alarm.
|
||||||
|
|
||||||
|
Example `alarms.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"alarms": [
|
||||||
|
{
|
||||||
|
"hour": 07,
|
||||||
|
"minute": 30,
|
||||||
|
"days": "01234",
|
||||||
|
"sound": "bond",
|
||||||
|
"snooze": 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 0,
|
||||||
|
"days": "56"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
43
docs/custom.md
Normal file
43
docs/custom.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# Custom Pages & Notifications
|
||||||
|
|
||||||
|
With AWTRIX Light, you can create custom pages or notifications to display your own text and icons.
|
||||||
|
Simply send a JSON object to the topic "awtrixlight/custom/[page]" where [page] is a number from 1-10.
|
||||||
|
|
||||||
|
## JSON Properties
|
||||||
|
|
||||||
|
The JSON object has the following properties:
|
||||||
|
|
||||||
|
| Key | Type | Description | Default |
|
||||||
|
| --- | ---- | ----------- | ------- |
|
||||||
|
| `text` | string | The text to display on the page. | |
|
||||||
|
| `icon` | string | The icon ID or filename (without extension) to display on the page. | |
|
||||||
|
| `repeat` | number | Sets how many times the text should be scrolled through the matrix before the display ends. | 1 |
|
||||||
|
| `rainbow` | boolean | Fades each letter in the text differently through the entire RGB spectrum. | false |
|
||||||
|
| `duration` | number | Sets how long the page should be displayed. | 5 |
|
||||||
|
| `color` | string | A color hex string for the text color. | "#FFFFFF" |
|
||||||
|
| `hold` | boolean | Set it to true, to hold your notification on top until you press the middle button or dismiss it via HomeAssistant. | false |
|
||||||
|
| `sound` | string | The filename of your RTTTL ringtone file (without extension). | |
|
||||||
|
| `pushIcon` | number | 0 = Icon doesn't move. 1 = Icon moves with text and will not appear again. 2 = Icon moves with text but appears again when the text starts to scroll again. | 0 |
|
||||||
|
|
||||||
|
|
||||||
|
All keys are optional, so you can send just the properties you want to use.
|
||||||
|
|
||||||
|
To update a custom page, simply send a modified JSON object to the same topic. The display will be updated immediately.
|
||||||
|
|
||||||
|
You can also send a one-time notification with the same JSON format. Simply send your JSON object to "awtrixlight/notify".
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Here's an example JSON object to display the text "Hello, AWTRIX Light!" with the icon ID "1", in rainbow colors, for 10 seconds:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"text": "Hello, AWTRIX Light!",
|
||||||
|
"icon": "1",
|
||||||
|
"rainbow": true,
|
||||||
|
"duration": 10
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## Delete a custom page
|
||||||
|
To delelte a custom page simply send a empty payload to the same topic
|
||||||
31
docs/timer.md
Normal file
31
docs/timer.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Timer
|
||||||
|
|
||||||
|
With AWTRIX Light, you can set a timer using MQTT. Simply send a JSON object to the topic **[PREFIX]/timer** to start a timer.
|
||||||
|
|
||||||
|
When the timer goes off, the display will show a notification, and you can dismiss the timer by pressing the middle button.
|
||||||
|
|
||||||
|
## JSON Properties
|
||||||
|
|
||||||
|
The JSON object has the following properties:
|
||||||
|
|
||||||
|
| Key | Type | Description |
|
||||||
|
| --- | ---- | ----------- |
|
||||||
|
| `hours` | number | The number of hours after midnight when the timer should be triggered. |
|
||||||
|
| `minutes` | number | The number of minutes after the hour when the timer should be triggered. |
|
||||||
|
| `seconds` | number | The number of seconds after the minute when the timer should be triggered. |
|
||||||
|
| `sound` | string | The name of the sound file (without extension) to play when the timer is triggered. |
|
||||||
|
|
||||||
|
Each value is optional, so you can set a timer for just minutes, or any combination of hours, minutes, and seconds. If you only want to start a timer in some minutes, just send the minutes.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
Here's an example JSON object to start a timer for 1 hour, 30 minutes, and 10 seconds, with the sound "friends":
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"hours": 1,
|
||||||
|
"minutes": 30,
|
||||||
|
"seconds": 10,
|
||||||
|
"sound": "friends"
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user