diff --git a/.github/workflows/Development.yml b/.github/workflows/Development.yml index 48aeb095..e18cd734 100644 --- a/.github/workflows/Development.yml +++ b/.github/workflows/Development.yml @@ -103,7 +103,7 @@ jobs: pip install --upgrade platformio - name: Perform static checks on ${{ matrix.environment }} - run: platformio check --environment ${{ matrix.environment }} + run: platformio check --environment ${{ matrix.environment }} --fail-on-defect=medium --fail-on-defect=high # Perform tests test: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 395ac5bb..c3580862 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,7 +121,7 @@ jobs: pip install --upgrade platformio - name: Perform static checks on ${{ matrix.environment }} - run: platformio check --environment ${{ matrix.environment }} + run: platformio check --environment ${{ matrix.environment }} --fail-on-defect=medium --fail-on-defect=high # Perform tests test: diff --git a/README.md b/README.md index 3602048a..d1f6780c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Full RGB LED matrix, based on an ESP32 and WS2812B LEDs. [![License](https://img.shields.io/badge/license-MIT-blue.svg)](http://choosealicense.com/licenses/mit/) [![Repo Status](https://www.repostatus.org/badges/latest/wip.svg)](https://www.repostatus.org/#wip) [![Release](https://img.shields.io/github/release/BlueAndi/esp-rgb-led-matrix.svg)](https://github.com/BlueAndi/esp-rgb-led-matrix/releases) -[![Build Status](https://github.com/BlueAndi/esp-rgb-led-matrix/workflows/PlatformIO%20CI/badge.svg?branch=master)](https://github.com/BlueAndi/esp-rgb-led-matrix/actions?query=workflow%3A%22PlatformIO+CI%22) +[![Build Status](https://github.com/BlueAndi/esp-rgb-led-matrix/actions/workflows/main.yml/badge.svg)](https://github.com/BlueAndi/esp-rgb-led-matrix/actions/workflows/main.yml) [![pixelix](https://img.youtube.com/vi/dik8Rm6f3o0/0.jpg)](https://www.youtube.com/watch?v=dik8Rm6f3o0 "Pixelix") [![pixelix](https://img.youtube.com/vi/UCjJCI5JShY/0.jpg)](https://www.youtube.com/watch?v=UCjJCI5JShY "Pixelix - Remote Button") @@ -37,6 +37,7 @@ Full RGB LED matrix, based on an ESP32 and WS2812B LEDs. * [Is it possible to use a font with 8px height?](#is-it-possible-to-use-a-font-with-8px-height) * [How to configure the date/time format?](#how-to-configure-the-datetime-format) * [How to configure my own list of plugins?](#how-to-configure-my-own-list-of-plugins) + * [Is there an easy way to rotate the display by 180° ? I need to turn the display when putting it into a housing.](#is-there-an-easy-way-to-rotate-the-display-by-180--i-need-to-turn-the-display-when-putting-it-into-a-housing) * [Used Libraries](#used-libraries) * [Issues, Ideas And Bugs](#issues-ideas-and-bugs) * [License](#license) @@ -55,7 +56,7 @@ The PIXELIX firmware is for ESP32 boards that controls a RGB LED matrix. It can * Supports REST API and MQTT for remote control and integration with other systems, like [Home Assistant](https://www.home-assistant.io/). * Can be extended with custom effects and animations. See list of [plugins](./doc/PLUGINS.md). -Please note, that not every feature might be available for all kind of development boards. E.g. for MQTT support you need 8 a development board with 8 MB flash or more. See the `config.ini` configuration files in [./config](./config) folder. +Please note, that not every feature might be available for all kind of development boards. E.g. for MQTT support you need a development board with 8 MB flash or more. See the `config.ini` configuration files in [./config](./config) folder. | Some impressions | | | - | - | @@ -115,7 +116,7 @@ If the device starts the very first time, the wifi station SSID and passphrase s 2. Using a terminal connecting via usb. ## Variant 1: Configure wifi station SSID and passphrase with the browser -Restart the device and keep the button pressed until it shows the SSID of the wifi access point, spawned by PIXELIX. Search for it with your mobile device and connect. +Restart the device and **keep the button pressed** until it shows the SSID of the wifi access point, spawned by PIXELIX. Search for it with your mobile device and connect. * SSID: **pixelix-<DEVICE-ID>** * Passphrase: **Luke, I am your father.** @@ -127,9 +128,11 @@ Use the following default credentials to get access to the PIXELIX web interface ## Variant 2: Configure wifi station SSID and passphrase with the terminal Connect PIXELIX with your PC via usb and start a terminal. Use the following commands to set the wifi SSID and passphrase of your home wifi network: +* Test: ```ping``` * Write wifi passphrase: ```write wifi passphrase ``` * Write wifi SSID: ```write wifi ssid ``` * Restart PIXELIX: ```reset``` +* Get IP-address: ```get ip``` ## PIXELIX Is Ready After configuration, restart again and voila, PIXELIX will be available in your wifi network. @@ -137,18 +140,18 @@ After configuration, restart again and voila, PIXELIX will be available in your For changing whats displayed, go to its web interface. Use the same credentials than for the captive portal in variant 1. In the "Display" page you can change it according to your needs. # User Interface -* Pixelix can be controlled with buttons. Most of the development are supported with just one user button. +* Pixelix can be controlled with buttons. Most of the development boards are supported with just one user button. * One button control: * 1 short pulse: Activates the next slot. * 2 short pulses: Activates the previous slot. * 3 short pulses: Activates next fade effect. * 4 short pulses: IP address is shown. - * 5 short pulses: Switch device off. + * 5 short pulses: Toggle display power on/off. * Long pressed: Increases the display brightness until maximum and then decreases until minimum. After that it will again increases it and so on. * Two button control (LILYGO® T-Display ESP32-S3): * Left button: * 1 short pulses: Activates the previous slot. - * 2 short pulses: Switch device off. + * 2 short pulses: Toggle display power on/off. * Long pressed: Decreases the display brightness until minimum. * Right button * 1 short pulse: Activates the next slot. @@ -162,7 +165,7 @@ For changing whats displayed, go to its web interface. Use the same credentials * Ok button: * 1 short pulses: Activates next fade effect. * 2 short pulses: IP address is shown. - * Long pressed: Switch device off. + * Long pressed: Toggle display power on/off. * Right button * 1 short pulse: Activates the next slot. * Long pressed: Increases the display brightness until maximum. @@ -281,6 +284,16 @@ To handle there are several .ini files in the ```./config``` folder: Update the one you use for your needs by commenting in or out. +## Is there an easy way to rotate the display by 180° ? I need to turn the display when putting it into a housing. +Change option CONFIG_DISPLAY_ROTATE180 in ```config/display.ini``` to 1 as shown below and rebuild. + +Example: +```ini +[display:common] +build_flags = + -D CONFIG_DISPLAY_ROTATE180=1 +``` + # Used Libraries | Library | Description | License | diff --git a/config/board.ini b/config/board.ini index c07f47c8..c0686a52 100644 --- a/config/board.ini +++ b/config/board.ini @@ -30,6 +30,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -77,6 +78,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -124,6 +126,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -171,6 +174,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -218,6 +222,7 @@ build_flags = -D CONFIG_SENSOR_LDR=SensorLdr::LDR_TYPE_GL5528 -D CONFIG_SENSOR_LDR_SERIES_RESISTANCE=1000.0F -D CONFIG_BUTTON_CTRL=1 + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -266,6 +271,7 @@ build_flags = -D CONFIG_SENSOR_LDR=SensorLdr::LDR_TYPE_GL5528 -D CONFIG_SENSOR_LDR_SERIES_RESISTANCE=1000.0F -D CONFIG_BUTTON_CTRL=2 + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -311,6 +317,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -357,6 +364,7 @@ build_flags = -D CONFIG_SENSOR_LDR_SERIES_RESISTANCE=10000.0f -D CONFIG_BUTTON_CTRL=3 -D CONFIG_SUPPLY_CURRENT=800U + -D CONFIG_RTC=1 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} @@ -406,6 +414,7 @@ build_flags = -D CONFIG_BUTTON_CTRL=1 -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout -D CONFIG_SUPPLY_CURRENT=3500U + -D CONFIG_RTC=0 lib_deps = ${mcu:esp32.lib_deps_builtin} ${mcu:esp32.lib_deps_external} diff --git a/config/configNormal.ini b/config/configNormal.ini index e96bf216..b6f3ecea 100644 --- a/config/configNormal.ini +++ b/config/configNormal.ini @@ -12,7 +12,7 @@ lib_deps = MqttService @ ~0.1.0 # ********** Topic handlers ********** RestApiTopicHandler @ ~0.1.0 # Mandatory, can not be removed. Used by webinterface. - MqttApiTopicHandler @ ~0.1.0 + MqttApiTopicHandler @ ~0.1.0 # Requires MqttService # ********** Plugins ********** ;BatteryPlugin @ ~0.1.0 BTCQuotePlugin @ ~0.1.0 @@ -21,7 +21,8 @@ lib_deps = DDPPlugin @ ~0.1.0 FirePlugin @ ~0.1.0 GameOfLifePlugin @ ~0.1.0 - GithubPlugin @ ~0.1.0 + GrabViaMqttPlugin @ ~0.1.0 # Requires MqttService + GrabViaRestPlugin @ ~0.1.0 GruenbeckPlugin @ ~0.1.0 IconTextLampPlugin @ ~0.1.0 IconTextPlugin @ ~0.1.0 @@ -30,7 +31,6 @@ lib_deps = OpenWeatherPlugin @ ~0.1.0 RainbowPlugin @ ~0.1.0 SensorPlugin @ ~0.1.0 - ShellyPlugSPlugin @ ~0.1.0 SignalDetectorPlugin @ ~0.1.0 # Requires AudioService SoundReactivePlugin @ ~0.1.0 # Requires AudioService SunrisePlugin @ ~0.1.0 diff --git a/config/configSmall.ini b/config/configSmall.ini index b844f118..44942e92 100644 --- a/config/configSmall.ini +++ b/config/configSmall.ini @@ -12,7 +12,7 @@ lib_deps = ;MqttService @ ~0.1.0 # ********** Topic handlers ********** RestApiTopicHandler @ ~0.1.0 # Mandatory, can not be removed. Used by webinterface. - ;MqttApiTopicHandler @ ~0.1.0 + ;MqttApiTopicHandler @ ~0.1.0 # Requires MqttService # ********** Plugins ********** ;BatteryPlugin @ ~0.1.0 BTCQuotePlugin @ ~0.1.0 @@ -21,16 +21,16 @@ lib_deps = ;DDPPlugin @ ~0.1.0 FirePlugin @ ~0.1.0 ;GameOfLifePlugin @ ~0.1.0 - GithubPlugin @ ~0.1.0 + ;GrabViaMqttPlugin @ ~0.1.0 # Requires MqttService + GrabViaRestPlugin @ ~0.1.0 ;GruenbeckPlugin @ ~0.1.0 - IconTextLampPlugin @ ~0.1.0 + ;IconTextLampPlugin @ ~0.1.0 IconTextPlugin @ ~0.1.0 JustTextPlugin @ ~0.1.0 MatrixPlugin @ ~0.1.0 OpenWeatherPlugin @ ~0.1.0 ;RainbowPlugin @ ~0.1.0 SensorPlugin @ ~0.1.0 - ShellyPlugSPlugin @ ~0.1.0 ;SignalDetectorPlugin @ ~0.1.0 # Requires AudioService ;SoundReactivePlugin @ ~0.1.0 # Requires AudioService SunrisePlugin @ ~0.1.0 diff --git a/config/configSmallNoI2s.ini b/config/configSmallNoI2s.ini index d2ad23ff..5cb124db 100644 --- a/config/configSmallNoI2s.ini +++ b/config/configSmallNoI2s.ini @@ -12,7 +12,7 @@ lib_deps = ;MqttService @ ~0.1.0 # ********** Topic handlers ********** RestApiTopicHandler @ ~0.1.0 # Mandatory, can not be removed. Used by webinterface. - ;MqttApiTopicHandler @ ~0.1.0 + ;MqttApiTopicHandler @ ~0.1.0 # Requires MqttService # ********** Plugins ********** ;BatteryPlugin @ ~0.1.0 BTCQuotePlugin @ ~0.1.0 @@ -21,7 +21,8 @@ lib_deps = ;DDPPlugin @ ~0.1.0 FirePlugin @ ~0.1.0 GameOfLifePlugin @ ~0.1.0 - GithubPlugin @ ~0.1.0 + ;GrabViaMqttPlugin @ ~0.1.0 # Requires MqttService + GrabViaRestPlugin @ ~0.1.0 ;GruenbeckPlugin @ ~0.1.0 IconTextLampPlugin @ ~0.1.0 IconTextPlugin @ ~0.1.0 @@ -30,7 +31,6 @@ lib_deps = OpenWeatherPlugin @ ~0.1.0 ;RainbowPlugin @ ~0.1.0 SensorPlugin @ ~0.1.0 - ;ShellyPlugSPlugin @ ~0.1.0 ;SignalDetectorPlugin @ ~0.1.0 # Requires AudioService ;SoundReactivePlugin @ ~0.1.0 # Requires AudioService SunrisePlugin @ ~0.1.0 diff --git a/config/configSmallUlanzi.ini b/config/configSmallUlanzi.ini index 0edc695e..7b326c9f 100644 --- a/config/configSmallUlanzi.ini +++ b/config/configSmallUlanzi.ini @@ -9,19 +9,20 @@ lib_deps = TopicHandlerService @ ~0.1.0 # Mandatory, can not be removed. SettingsService @ ~0.1.0 # Mandatory, can not be removed. ;AudioService @ ~0.1.0 # No I2S interface available - ;MqttService @ ~0.1.0 + MqttService @ ~0.1.0 # ********** Topic handlers ********** RestApiTopicHandler @ ~0.1.0 # Mandatory, can not be removed. Used by webinterface. - MqttApiTopicHandler @ ~0.1.0 + MqttApiTopicHandler @ ~0.1.0 # Requires MqttService # ********** Plugins ********** BatteryPlugin @ ~0.1.0 ;BTCQuotePlugin @ ~0.1.0 - CountdownPlugin @ ~0.1.0 + ;CountdownPlugin @ ~0.1.0 DateTimePlugin @ ~0.1.0 ;DDPPlugin @ ~0.1.0 - FirePlugin @ ~0.1.0 + ;FirePlugin @ ~0.1.0 GameOfLifePlugin @ ~0.1.0 - GithubPlugin @ ~0.1.0 + GrabViaMqttPlugin @ ~0.1.0 # Requires MqttService + GrabViaRestPlugin @ ~0.1.0 ;GruenbeckPlugin @ ~0.1.0 ;IconTextLampPlugin @ ~0.1.0 IconTextPlugin @ ~0.1.0 @@ -29,16 +30,15 @@ lib_deps = MatrixPlugin @ ~0.1.0 OpenWeatherPlugin @ ~0.1.0 ;RainbowPlugin @ ~0.1.0 - SensorPlugin @ ~0.1.0 - ;ShellyPlugSPlugin @ ~0.1.0 + ;SensorPlugin @ ~0.1.0 ;SignalDetectorPlugin @ ~0.1.0 # Requires AudioService ;SoundReactivePlugin @ ~0.1.0 # Requires AudioService SunrisePlugin @ ~0.1.0 SysMsgPlugin @ ~0.1.0 # Mandatory, can not be removed. TempHumidPlugin @ ~0.1.0 - ThreeIconPlugin @ ~0.1.0 + ;ThreeIconPlugin @ ~0.1.0 ;VolumioPlugin @ ~0.1.0 ;WifiStatusPlugin @ ~0.1.0 - WormPlugin @ ~0.1.0 + ;WormPlugin @ ~0.1.0 extra_scripts = pre:./scripts/configure_small_ulanzi.py diff --git a/config/display.ini b/config/display.ini index 386c35df..43e76018 100644 --- a/config/display.ini +++ b/config/display.ini @@ -1,8 +1,16 @@ +; ******************************************************************************** +; generic display config settings +; ******************************************************************************** +[display:common] +build_flags = + -D CONFIG_DISPLAY_ROTATE180=0 ; set to 1 to rotate display 180° + ; ******************************************************************************** ; LED matrix based on WS2812B (neopixels) ; ******************************************************************************** [display:led_matrix_column_major_alternating] build_flags = + ${display:common.build_flags} -D CONFIG_LED_MATRIX_WIDTH=32U -D CONFIG_LED_MATRIX_HEIGHT=8U -D CONFIG_LED_TOPO=ColumnMajorAlternatingLayout @@ -19,6 +27,7 @@ lib_ignore_external = ; ******************************************************************************** [display:led_matrix_row_major_alternating] build_flags = + ${display:common.build_flags} -D CONFIG_LED_MATRIX_WIDTH=32U -D CONFIG_LED_MATRIX_HEIGHT=8U -D CONFIG_LED_TOPO=RowMajorAlternatingLayout @@ -37,6 +46,7 @@ lib_ignore_external = ; ******************************************************************************** [display:lilygo_ttgo_tdisplay] build_flags = + ${display:common.build_flags} -D USER_SETUP_LOADED=1 -D ST7789_DRIVER -D TFT_WIDTH=135 @@ -62,7 +72,7 @@ build_flags = lib_deps_builtin = HalTftDisplay lib_deps_external = - bodmer/TFT_eSPI @ ~2.5.30 + bodmer/TFT_eSPI @ ~2.5.31 lib_ignore_builtin = HalLedMatrix lib_ignore_external = @@ -73,6 +83,7 @@ lib_ignore_external = ; ******************************************************************************** [display:lilygo_tdisplay-s3] build_flags = + ${display:common.build_flags} -D USER_SETUP_LOADED=1 -D ST7789_DRIVER -D TFT_PARALLEL_8_BIT @@ -88,6 +99,7 @@ build_flags = -D TFT_RD=9 -D TFT_DATA_PIN_OFFSET_EN -D TFT_BL=38 + -D TFT_BACKLIGHT_ON=HIGH -D TFT_D0=39 -D TFT_D1=40 -D TFT_D2=41 @@ -109,12 +121,11 @@ build_flags = lib_deps_builtin = HalTftDisplay lib_deps_external = - https://github.com/nhjschulz/TFT_eSPI + bodmer/TFT_eSPI @ ~2.5.31 lib_ignore_builtin = HalLedMatrix lib_ignore_external = - ; ******************************************************************************** ; M5Stack ; https://shop.m5stack.com/collections/m5-controllers/CORE @@ -122,6 +133,7 @@ lib_ignore_external = ; ******************************************************************************** [display:m5stack_core] build_flags = + ${display:common.build_flags} -D USER_SETUP_LOADED=1 -D ILI9341_DRIVER -D M5STACK @@ -149,8 +161,7 @@ build_flags = lib_deps_builtin = HalTftDisplay lib_deps_external = - bodmer/TFT_eSPI @ ~2.5.30 - + bodmer/TFT_eSPI @ ~2.5.31 lib_ignore_builtin = HalLedMatrix -lib_ignore_external = \ No newline at end of file +lib_ignore_external = diff --git a/config/mcu.ini b/config/mcu.ini index 95afebc2..bab3b3ea 100644 --- a/config/mcu.ini +++ b/config/mcu.ini @@ -2,7 +2,7 @@ ; MCU ESP32 configuration ; ******************************************************************************** [mcu:esp32] -platform = espressif32 @ ~6.3.0 +platform = espressif32 @ ~6.4.0 framework = arduino build_flags = -I./src/Common @@ -21,7 +21,7 @@ build_flags = -D PIO_ENV="$PIOENV" -Wl,-Map,firmware.map lib_deps_external = - bblanchon/ArduinoJson @ ~6.21.2 + bblanchon/ArduinoJson @ ~6.21.3 bblanchon/StreamUtils @ ~1.7.3 muwerk/mufonts @ ~0.2.0 https://github.com/BlueAndi/AsyncTCPSock diff --git a/data/about.html b/data/about.html index b40c26af..091c5198 100644 --- a/data/about.html +++ b/data/about.html @@ -73,7 +73,7 @@

About

- +