mirror of
https://gitlab.com/zwirbel/illucat.git
synced 2025-12-15 01:42:22 +01:00
separate documentation
This commit is contained in:
51
README.md
51
README.md
@@ -1,48 +1,9 @@
|
|||||||
# Illumination-Cat
|
# Illumination-Cat
|
||||||
This is the brain of the the almighty [Illumination Cat](https://www.thingiverse.com/thing:2974862).
|
This is the brain of the the almighty Illumination-Cat.
|
||||||
|
|
||||||
## API
|
## Resources & Documentation
|
||||||
Two API architectures are supported: WebSocket and REST.
|
[3D Model](https://www.thingiverse.com/thing:2974862)
|
||||||
Both can be used with the same set of fields.
|
[Installation](https://gitlab.com/0x1d/illucat/blob/master/installation.md)
|
||||||
Everything is propagated to the mesh network automatically.
|
[API](https://gitlab.com/0x1d/illucat/blob/master/api.md)
|
||||||
|
[OctoPrint Stuff](https://github.com/FrYakaTKoP/simple-octo-ws2812)
|
||||||
|
|
||||||
Fields:
|
|
||||||
| Field | Type | Description |
|
|
||||||
| ------- | ------- | -----------------------------------------------|
|
|
||||||
| topic | String | Name of the topic where the data is dispatched |
|
|
||||||
| payload | Integer/String | Data |
|
|
||||||
|
|
||||||
### WebSocket
|
|
||||||
Endpoint: /pixel
|
|
||||||
Send a JSON String containing the mandatory fields.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
``` json
|
|
||||||
{
|
|
||||||
"topic": "pixels/color",
|
|
||||||
"payload": 13505813
|
|
||||||
}
|
|
||||||
```
|
|
||||||
#### Topics
|
|
||||||
All functionality can be used by sending messages to these topics.
|
|
||||||
|
|
||||||
| topic | type | payload |
|
|
||||||
| ----- | ---- | ---- |
|
|
||||||
| pixels/colorWheel | Integer | Value from 0 to 255 to cycle through all colors |
|
|
||||||
| pixels/color | Integer | RGB color as integer. By calling this topic, all LEDs of the strip are set synchronously, stopping current running animation. |
|
|
||||||
| pixels/color2 | Integer |RGB color as integer. Sets the second color used in animations. Does not stop current running animation. |
|
|
||||||
| pixels/pattern | Integer | Value from 0 to 5 to set the current animation. Available animations: { NONE = 0, RAINBOW_CYCLE = 1, THEATER_CHASE = 2, COLOR_WIPE = 3, SCANNER = 4, FADE = 5 } |
|
|
||||||
| pixels/totalSteps | Integer | Number of steps of an animation. |
|
|
||||||
| pixels/brightness | Integer | Integer from 0 to 255 to set the overall brightness of the strip by bitshifting the current colors in memory. Use with caution as running the LEDs on full brightness requires a lot of power. |
|
|
||||||
|
|
||||||
### REST
|
|
||||||
#### Endpoints
|
|
||||||
Content-Type: application/x-www-form-urlencoded
|
|
||||||
POST /pixel/api
|
|
||||||
|
|
||||||
## Features
|
|
||||||
- Enduser setup: initial setup where the cat opens an access point for configuration
|
|
||||||
- WiFi: connect to existing AP as client or build a mesh network where all cats act as a collective
|
|
||||||
- Web controls: colors and patterns can be changed through the web interface
|
|
||||||
- OTA plugin: cats connected to an AP can be updated over-the-air via TCP flash method
|
|
||||||
- [0%] audio output
|
|
||||||
40
api.md
Normal file
40
api.md
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
# API
|
||||||
|
Two API architectures are supported: WebSocket and REST.
|
||||||
|
Both can be used with the same set of fields.
|
||||||
|
Everything is propagated to the mesh network automatically.
|
||||||
|
|
||||||
|
Fields:
|
||||||
|
| Field | Type | Description |
|
||||||
|
| ------- | ------- | -----------------------------------------------|
|
||||||
|
| topic | String | Name of the topic where the data is dispatched |
|
||||||
|
| payload | Integer/String | Data |
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
All functionality can be used by sending messages to these topics.
|
||||||
|
|
||||||
|
| topic | type | payload |
|
||||||
|
| ----- | ---- | ---- |
|
||||||
|
| pixels/colorWheel | Integer | Value from 0 to 255 to cycle through all colors |
|
||||||
|
| pixels/color | Integer | RGB color as integer. By calling this topic, all LEDs of the strip are set synchronously, stopping current running animation. |
|
||||||
|
| pixels/color2 | Integer |RGB color as integer. Sets the second color used in animations. Does not stop current running animation. |
|
||||||
|
| pixels/pattern | Integer | Value from 0 to 5 to set the current animation. Available animations: { NONE = 0, RAINBOW_CYCLE = 1, THEATER_CHASE = 2, COLOR_WIPE = 3, SCANNER = 4, FADE = 5 } |
|
||||||
|
| pixels/totalSteps | Integer | Number of steps of an animation. |
|
||||||
|
| pixels/brightness | Integer | Integer from 0 to 255 to set the overall brightness of the strip by bitshifting the current colors in memory. Use with caution as running the LEDs on full brightness requires a lot of power. |
|
||||||
|
|
||||||
|
## WebSocket
|
||||||
|
Endpoint: /pixel
|
||||||
|
Send a JSON String containing the mandatory fields.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
``` json
|
||||||
|
{
|
||||||
|
"topic": "pixels/color",
|
||||||
|
"payload": 13505813
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## REST
|
||||||
|
#### Endpoints
|
||||||
|
Content-Type: application/x-www-form-urlencoded
|
||||||
|
POST /pixel/api
|
||||||
|
|
||||||
Reference in New Issue
Block a user