Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
bana-handaga committed Jul 10, 2022
1 parent 1635dec commit cd448c9
Show file tree
Hide file tree
Showing 8 changed files with 974 additions and 0 deletions.
85 changes: 85 additions & 0 deletions modul-praktikum-iot/modul14/tree_mqtt_service/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# IoTree MQTT Service

The following is a list of MQTT topic and message formats recognise by the Tree MQTT Service.

## Clear (turn off) all LEDS on APA102 LED Strip

* MQTT Topic: `tree/lights/clear`
* MQTT Message Format: Pass an empty message

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/clear" -m ""`

---

## Push color(s) into the APA102 LED Strip

* MQTT Topic: `tree/lights/push`
* MQTT Message Format: Space separated list of colour names or hex values

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/push" -m "red blue black"`

---

## Set Repeating Color Pattern on the APA102 LED Strip

* MQTT Topic: `tree/lights/pattern`
* MQTT Message Format: Space separated list of colour names or hex values

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/pattern" -m "red blue black"`

---

## Set LED Contrast

* MQTT Topic: `tree/lights/contrast`
* MQTT Message Format: A number between `0` and `255`

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/contrast" -m "128"`

---

## Set LED Animation Mode


* MQTT Topic: `tree/lights/animation`
* MQTT Message Format: One of the following values:
* stop
* left
* right
* blink
* rainbow

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/animation" -m "blink"`

---

## Set LED Animation Speed


* MQTT Topic: `tree/lights/speed`
* MQTT Message Format: A number between `1` and `10`

*Example:*

`mosquitto_pub -h "localhost" -t "tree/lights/speed" -m "10"`

---

## Sweep the Servo

* MQTT Topic: `tree/lights/sweep`
* MQTT Message Format: Pass an empty message`

*Example:*

`mosquitto_pub -h "localhost" -t "tree/servo/sweep" -m ""`

0 comments on commit cd448c9

Please sign in to comment.