Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
DrA1ex authored Sep 7, 2024
1 parent c2def1e commit bd47633
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,57 @@ For iOS:

## Configuration

Configure credentials by editing [src/credentials.h](src/credentials.h).

| Parameter | Description | Default |
|--------------------|-------------------------------------------------|-----------------|
| `WIFI_SSID` | The SSID of the Wi-Fi network to connect to | "ESP_LED" |
| `WIFI_PASSWORD` | The password for the Wi-Fi network | "12345678" |
| `WEBAUTH_USER` | Username for web authentication | "esp_led" |
| `WEBAUTH_PASSWORD` | Password for web authentication | "password" |
| `MQTT_HOST` | Hostname or IP address for the MQTT broker | "example.com" |
| `MQTT_PORT` | Port number for the MQTT broker | 1234 |
| `MQTT_USER` | Username for MQTT authentication | "esp_user" |
| `MQTT_PASSWORD` | Password for MQTT authentication | "esp_pass" |


Customize the application for your specific settings by editing [src/constants.h](src/constants.h).

- `WIFI_MODE` (0 - AP mode, 1 - STA mode)
- `WIFI_SSID` and `WIFI_PASSWORD`
- `TIME_ZONE` (hour offset for correct work of Night Mode)
- `MDNS_NAME` (mDNS for local network, default address [http://esp_lamp.local](http://esp_lamp.local))
- `LED_PIN` and `LED_TYPE` for your LED strip/matrix configuration
- `WIDTH` and `HEIGHT` for your configuration (count of LEDs for vertical and horizontal)
- `MATRIX_VOLTAGE` and `CURRENT_LIMIT` for your specific power supply
| Parameter | Description | Default |
|---------------------------------------|-------------------------------------------------------------------|-------------------|
| WIFI_MODE | Mode of Wi-Fi operation (e.g., AP mode or Station mode) | `WIFI_AP_MODE` |
| WIFI_MAX_CONNECTION_ATTEMPT_INTERVAL | Maximum time (ms) to wait for Wi-Fi connection before switching to AP mode. A value of 0 means it never switches. | `0` |
| WEB_AUTH | Enables web-based authentication features | Enabled |
| TIME_ZONE | Time zone offset from GMT (e.g., GMT +5:00) | `5.f` |
| MDNS_NAME | Multicast DNS name for the device. (e.g. `esp_lamp`.local) | `"esp_lamp"` |
| BUTTON | Indicates whether the button feature is enabled or disabled. | `DISABLED` |
| BUTTON_PIN | GPIO pin number for the button. | `4u` |
| LED_PIN | GPIO pin number for the LED output. | `5u` |
| LED_TYPE | Type of LED used (e.g., WS2812B). | `WS2812B` |
| LED_COLOR_ORDER | Order of colors for LED (e.g., RGB, GRB format). | `GRB` |
| CURRENT_LIMIT | Maximum current limit for the device in milliamps. | `500u` |
| WIDTH | Width dimension for the matrix or display in pixels. | `16u` |
| HEIGHT | Height dimension for the matrix or display in pixels. | `16u` |
| AUDIO | Enables audio features. | `DISABLED` |
| AUDIO_PIN | GPIO pin number assigned for audio output. | `0u` |
| MQTT | Enables MQTT protocol for communication. | `0u` |

## MQTT Topics


| Topic In* | Topic Out* | Type | Values | Comments |
|----------------------|---------------------------|----------------|-----------------------|---------------------------------------|
| MQTT_TOPIC_POWER | MQTT_OUT_TOPIC_POWER | uint8_t | 0..1 | Power state: ON (1) / OFF (0) |
| MQTT_TOPIC_BRIGHTNESS| MQTT_OUT_TOPIC_BRIGHTNESS | uint8_t | 0..255 | Brightness level |
| MQTT_TOPIC_SPEED | MQTT_OUT_TOPIC_SPEED | uint8_t | 0..255 | Color effect's speed parameter |
| MQTT_TOPIC_SCALE | MQTT_OUT_TOPIC_SCALE | uint8_t | 0..255 | Color effect's scale parameter |
| MQTT_TOPIC_LIGHT | MQTT_OUT_TOPIC_LIGHT | uint8_t | 0..255 | Brightness effect's light parameter |
| MQTT_TOPIC_PRESET | MQTT_OUT_TOPIC_PRESET | uint8_t | 0..23 | Preset select |
| MQTT_TOPIC_PALETTE | MQTT_OUT_TOPIC_PALETTE | uint8_t | 0..78 | Palette select |
| MQTT_TOPIC_COLOR | MQTT_OUT_TOPIC_COLOR | uint32_t | RGB (e.g. 0xff00ff ) | Color mode's rgb color |
| MQTT_TOPIC_NIGHT_MODE| MQTT_OUT_TOPIC_NIGHT_MODE | uint8_t | 0..1 | Night mode state: ON (1) / OFF (0) |

* Actual topic values decalred in constants.h

## Firmware Installation

Expand Down

0 comments on commit bd47633

Please sign in to comment.