Skip to content

Commit

Permalink
Merge pull request #13 from pixelit-project/main
Browse files Browse the repository at this point in the history
update main branch from original
  • Loading branch information
rliegmann authored Nov 7, 2023
2 parents ac4b5a2 + 4203b98 commit 34a496c
Show file tree
Hide file tree
Showing 8 changed files with 4,486 additions and 4,091 deletions.
Binary file added .github/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions .github/merge.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
import os
import shutil
import subprocess

root_dir = '.pio/build'
boot_app0_path = os.path.join(os.path.expanduser("~"),".platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin")

print("+++ Starting merging... +++")

# Check if the boot_app0.bin file exists
if not os.path.isfile(boot_app0_path):
print(f"boot_app0.bin not found at {boot_app0_path}")
exit(1)

# Check if the root directory exists
if not os.path.isdir(root_dir):
print(f"Root directory {root_dir} not found")
exit(1)

# Iterate over all items in the root directory
for item in os.listdir(root_dir):
item_path = os.path.join(root_dir, item)

# Check if the item is a directory and its name starts with "esp32"
if os.path.isdir(item_path) and item.lower().startswith("esp32"):
print(f"Found an 'esp32' directory: {item_path}")

# Check if the directory contains a file which begins with "firmware"
firmware_path = ""
for file in os.listdir(item_path):
if file.lower().startswith("firmware") and file.lower().endswith(".bin") and "full-upgrade" not in file.lower():
firmware_path = os.path.join(item_path, file)
directory_path, filename_with_extension = os.path.split(firmware_path)
filename, file_extension = os.path.splitext(filename_with_extension)
print(f"> Found a 'firmware' file: {firmware_path}")

# build new filename
firmware_combined_path = os.path.join(directory_path, filename + ".full-upgrade" + file_extension)

# copy boot_app0.bin
print(f"> Copying boot_app0.bin to {item_path}...")
shutil.copy(boot_app0_path, item_path)

# merge firmware
print(f"> Merging firmware to {firmware_combined_path}...")
command = f"python -m esptool --chip esp32 merge_bin -o {firmware_combined_path} --flash_mode dio --flash_freq 40m --flash_size 4MB 0x1000 {item_path}/bootloader.bin 0x8000 {item_path}/partitions.bin 0xe000 {item_path}/boot_app0.bin 0x10000 {firmware_path}"
return_code = subprocess.call(command, shell=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
if return_code != 0:
print(f"> Merging failed with return code {return_code}.")
break
else:
print("> Merging successful")

print("> Done")
break

if firmware_path == "":
print("> No firmware file for merging found")

print("+++ Merging done... +++")
Binary file added .github/pixelit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 54 additions & 11 deletions .github/workflows/build-and-release.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: Build, Release & Deploy

on:
[push]
on: [push]

env:
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'testing') }}

jobs:
build-webui:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: 'pixelit-project/WebUI'
repository: "pixelit-project/WebUI"

- name: Use Node.js 💾
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 19.x

Expand Down Expand Up @@ -75,10 +74,14 @@ jobs:
- name: Install pio and its dependencies 🔧
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
pip install --upgrade platformio esptool
- name: Run PlatformIO build on selected platforms 🏗️
run: platformio run -e d1_mini -e ESP8266 -e wemos_d1_mini32 -e nodemcuv2
run: platformio run -e ESP8266_generic -e ESP8266_nodemcuv2 -e ESP32_generic -e ESP32_d1_mini32 -e ESP8266_d1_mini -e ESP32_ulanzi

- name: Merge ESP32 firmware to single binaries 🔧
run: |
python .github/merge.py
- name: Upload build artifacts 💾
uses: actions/upload-artifact@v3
Expand Down Expand Up @@ -110,6 +113,46 @@ jobs:
file_glob: true
prerelease: ${{ env.prerelease }}

upload-fw-to-docs:
needs: build-fw
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: "pixelit-project/PixelIt.Docs"
path: docs

- name: Download artifacts 💾
uses: actions/download-artifact@v3
with:
name: pixelit-firmware
path: artifacts

- name: Prepare binaries for web flasher 🚀
run: |
mkdir -p upload
cp ./docs/src/.vuepress/public/pixelit_flasher/firmware/firmware_*.bin ./upload/
cp -rf ./artifacts/*/firmware_*.bin ./upload/
- name: Display structure of downloaded files 🔍
run: ls -R ./upload/

- name: Upload binaries to PixelIt.Docs for web flasher 🚀
uses: cpina/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
with:
source-directory: "upload"
destination-github-username: "pixelit-project"
destination-repository-name: "PixelIt.Docs"
user-email: bot@pixelit
user-name: PixelIt Pipeline Bot
target-branch: master
target-directory: "src/.vuepress/public/pixelit_flasher/firmware/"
commit-message: Pushed binaries from main repo via GitHub Actions

deploy-webui-gh-pages:
runs-on: ubuntu-latest
needs: build-webui
Expand All @@ -118,7 +161,7 @@ jobs:
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
repository: 'pixelit-project/WebUI'
repository: "pixelit-project/WebUI"

- name: Download artifacts 💾
uses: actions/download-artifact@v3
Expand All @@ -129,6 +172,6 @@ jobs:
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: . # The folder the action should deploy.
CLEAN: false # Automatically remove deleted files from the deploy branch
branch: gh-pages # The branch the action should deploy to.
folder: . # The folder the action should deploy.
clean: false # Automatically remove deleted files from the deploy branch
6 changes: 5 additions & 1 deletion .github/workflows/contribute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ jobs:
steps:
- name: Contribute List
uses: akhilmhdh/[email protected]
with:
auto_detect_branch_protection: false
commit_message: "Updated readme with new contributors"
use_username: true
env:
GITHUB_TOKEN: ${{ secrets.ACTION_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 42 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
![](https://raw.githubusercontent.com/o0shojo0o/ioBroker.pixelit/master/admin/pixelit.png)
![](.github/logo.png)

# PixelIt - The Matrix Display

![](.github/pixelit.png)

![](https://github.com/pixelit-project/PixelIt/actions/workflows/build-and-release.yml/badge.svg)

The PixelIt is an ESP8266/ESP32 and WS2812B-LED based PixelArt display, controlled and fed via a JSON API.
Settings and small tests are possible via the web interface,
also a node-red node ([node-red-contrib-pixelit](https://flows.nodered.org/node/node-red-contrib-pixelit)) for the JSON API is available.

If you want to get an impression of the WebUI, you can do that here in [Demo WebUi](https://pixelit-project.github.io/PixelIt/webui/) :rocket:
If you want to get an impression of the WebUI, you can do that here in [Demo WebUI](https://pixelit-project.github.io/PixelIt/webui/) :rocket:

- :memo: [Documentation](https://pixelit-project.github.io/)
- :page_facing_up: [Blog](https://www.bastelbunker.de/pixel-it/)
- :green_heart: [PixelIt Icon Gallery](https://pixelit.bastelbunker.de/PixelGallery)
- :green_heart: [PixelIt Icon Gallery (in Demo WebUI)](https://pixelit-project.github.io/PixelIt/webui/#/gallery)
- :bulb: [GitHub Discussions (Forum) ![](https://img.shields.io/github/discussions/pixelit-project/PixelIt)](https://github.com/pixelit-project/PixelIt/discussions)
- :fire: [Telegram Channel ![](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Frunkit.io%2Fdamiankrawczyk%2Ftelegram-badge%2Fbranches%2Fmaster%3Furl%3Dhttps%3A%2F%2Ft.me%2Fpixelitdisplay)](https://t.me/pixelitdisplay)
- :fire:[Discord Channel ![](https://img.shields.io/discord/1145731525996970025?logo=discord)](https://discord.gg/ERBSHWxB2S)
Expand All @@ -28,78 +30,85 @@ Thanks to these great people for supporting this project.
<a href="https://github.com/o0shojo0o">
<img src="https://avatars.githubusercontent.com/u/19333515?v=4" width="100;" alt="o0shojo0o"/>
<br />
<sub><b>Dennis Rathjen</b></sub>
<sub><b>o0shojo0o</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/foorschtbar">
<img src="https://avatars.githubusercontent.com/u/10727275?v=4" width="100;" alt="foorschtbar"/>
<br />
<sub><b>Fab!an</b></sub>
<sub><b>foorschtbar</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/miccgn">
<img src="https://avatars.githubusercontent.com/u/71180164?v=4" width="100;" alt="miccgn"/>
<br />
<sub><b>Miccgn</b></sub>
<sub><b>miccgn</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/Metaln00b">
<img src="https://avatars.githubusercontent.com/u/25951169?v=4" width="100;" alt="Metaln00b"/>
<br />
<sub><b>Metaln00b</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/pplucky">
<img src="https://avatars.githubusercontent.com/u/16407309?v=4" width="100;" alt="pplucky"/>
<br />
<sub><b>Pplucky</b></sub>
<sub><b>pplucky</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/jekader">
<img src="https://avatars.githubusercontent.com/u/2088123?v=4" width="100;" alt="jekader"/>
<br />
<sub><b>jekader</b></sub>
</a>
</td></tr>
<tr>
<td align="center">
<a href="https://github.com/fmunozs">
<img src="https://avatars.githubusercontent.com/u/1041604?v=4" width="100;" alt="fmunozs"/>
<br />
<sub><b>Fernando Muñoz</b></sub>
<sub><b>fmunozs</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/rozza-m">
<img src="https://avatars.githubusercontent.com/u/1784953?v=4" width="100;" alt="rozza-m"/>
<br />
<sub><b>Rozza-m</b></sub>
<sub><b>rozza-m</b></sub>
</a>
</td></tr>
<tr>
</td>
<td align="center">
<a href="https://github.com/hermannbach">
<img src="https://avatars.githubusercontent.com/u/6616722?v=4" width="100;" alt="hermannbach"/>
<br />
<sub><b>HBach</b></sub>
<sub><b>hermannbach</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/d4rkd3v1l">
<img src="https://avatars.githubusercontent.com/u/13336238?v=4" width="100;" alt="d4rkd3v1l"/>
<br />
<sub><b>Martin Straub</b></sub>
<sub><b>d4rkd3v1l</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/hamster65">
<img src="https://avatars.githubusercontent.com/u/36369379?v=4" width="100;" alt="hamster65"/>
<br />
<sub><b>Hamster65</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/jekader">
<img src="https://avatars.githubusercontent.com/u/2088123?v=4" width="100;" alt="jekader"/>
<br />
<sub><b>Null</b></sub>
<sub><b>hamster65</b></sub>
</a>
</td>
<td align="center">
<a href="https://github.com/rliegmann">
<img src="https://avatars.githubusercontent.com/u/16445478?v=4" width="100;" alt="rliegmann"/>
<br />
<sub><b>Rliegmann</b></sub>
<sub><b>rliegmann</b></sub>
</a>
</td></tr>
</table>
Expand All @@ -109,18 +118,26 @@ Thanks to these great people for supporting this project.

<!-- ** WORK IN PROGRESS ** -->

### 2.4.0 ** WORK IN PROGRESS ** (Develop Branch)
### 2.4.3 (2023-10-17)

- (foorschtbar) Native support for [Ulanzi TC001 Pixel Clock](https://www.ulanzi.com/products/ulanzi-pixel-smart-clock-2882?aff=1181)\* (**Beta**, see [Releases](https://github.com/pixelit-project/PixelIt/releases)) :tada:
- (foorschtbar) Native support for [Ulanzi TC001 Pixel Clock](https://www.ulanzi.com/products/ulanzi-pixel-smart-clock-2882?aff=1181)\* :tada:
- (foorschtbar) Display `zZz` on the matrix when the device going to sleep
- (foorschtbar) Fixed issue with flickering icons, wenn device wake from sleep mode
- (Metaln00b) Improved new firmware check by doing real version compare (major, minor, patch and prerelease)
- (o0shojo0o) As of this version, it is possible to install via the new [webflasher](https://pixelit-project.github.io/firmware.html#flashing-web)
- (jekader) Remove duplication from platformio.ini [[#315](https://github.com/pixelit-project/PixelIt/issues/315)]
- (foorschtbar) MQTT/Websocket message interval for sensors and matrix info are now minimum 10 seconds to reduce "noise" on the network
- (foorschtbar) Added support for SHT31 sensor
- (foorschtbar) Log error if MQTT or Websocket message is to long
- (jekader) Improve logging during pin assignment
- (foorschtbar) Added build section from PIO config to matrix info and telemetry data

### 2.3.2 (2023-09-16)

- (foorschtbar) Added live preview (liveview) of the Matrix to WebUI
- (foorschtbar) Added uptime, size and last reset reason to WebUI
- (foorschtbar) Screens from test area are now displayed prioritized for 5 seconds
- (foorschtbar) Combine centerText with scrollText=auto [#96](https://github.com/pixelit-project/PixelIt/issues/96)
- (foorschtbar) Combine centerText with scrollText=auto [[#96](https://github.com/pixelit-project/PixelIt/issues/96)]
- (foorschtbar) Cleanup text drawing/scrolling code **[Breaking change: Text position is now mandatory and will not be shiffed if there is an icon!]**
- (foorschtbar) Prepearing support for different matrix sizes
- (o0shojo0o) Added native `Pixel Creator` to WebUI
Expand Down
Loading

0 comments on commit 34a496c

Please sign in to comment.