From 4ef505fde8ffb08122e95a31421783fe6f090673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20M=C3=BChl?= <31169771+Blueforcer@users.noreply.github.com> Date: Thu, 23 Mar 2023 14:27:06 +0100 Subject: [PATCH] update docs --- docs/_sidebar.md | 5 ++++- docs/custom.md | 2 +- docs/mqtt.md | 19 +++++++++++++++++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 docs/mqtt.md diff --git a/docs/_sidebar.md b/docs/_sidebar.md index f587980..8d32213 100644 --- a/docs/_sidebar.md +++ b/docs/_sidebar.md @@ -13,4 +13,7 @@ - [Alarm clock](alarm.md) - [Timer](timer.md) - [Icons](icons.md) - - [Sounds](sounds.md) \ No newline at end of file + - [Sounds](sounds.md) + +- MQTT + - [Commands](mqtt.md) \ No newline at end of file diff --git a/docs/custom.md b/docs/custom.md index 62bc2a5..d18372d 100644 --- a/docs/custom.md +++ b/docs/custom.md @@ -1,7 +1,7 @@ # 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. +Simply send a JSON object to the topic "awtrixlight/custom/[page]" where [page] is a the name of your page (without spaces). ## JSON Properties diff --git a/docs/mqtt.md b/docs/mqtt.md new file mode 100644 index 0000000..6492527 --- /dev/null +++ b/docs/mqtt.md @@ -0,0 +1,19 @@ +# MQTT Commands + +### Switch to app +**Topic** +`[PREFIX]/switch` +**Payload** +`{"name":"time"}` + +Build-in app names are +- `time` +- `date` +- `temp` +- `hum` +- `bat` + +For custompages you need to call the name you set in the topic: +if +`[PREFIX]/custom/test` is your topic, +then `test` is the name \ No newline at end of file