Initial commit: v1.9.1 production firmware

Complete reverse engineering of TJ-56-654 weather clock from AliExpress.

Security fixes:
- Eliminated WiFi password leak vulnerability
- Removed dependency on Chinese cloud services (QWeather)
- Secure WiFiManager captive portal setup
- No hardcoded credentials

Features:
- Fully async architecture (zero blocking operations)
- OTA firmware updates (web + ArduinoOTA)
- NTP time sync with timezone + DST support
- Open-Meteo weather API (free, no registration)
- 3 display modes: time, weather, sunrise/sunset
- REST API + web interface
- EEPROM config persistence

Performance:
- Loop time: <1ms (was 10ms+)
- Memory: 409KB flash (38%), 38KB RAM (46%), 62KB IRAM (94%)
- Zero blocking delays

Hardware:
- ESP-01S (ESP8266EX, 1MB flash)
- GM009605v4.3 OLED display (128x64, I2C)
- Custom I2C mapping: SDA=GPIO0, SCL=GPIO2

Documentation:
- Complete installation guide
- Hardware specifications
- API documentation
- Troubleshooting guide
- Version history v1.5 → v1.9.1

Built with Claude Code (Opus 4.5)
Author: Andrey Petrochenko
Date: 2026-01-03
This commit is contained in:
Alex Petrochenko
2026-01-03 14:01:31 +00:00
commit 8f0df02e77
21 changed files with 5165 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
---
name: Bug report
about: Report a problem with the firmware
title: '[BUG] '
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Serial Monitor Output**
If applicable, paste serial monitor output here:
```
[paste output here]
```
**Environment:**
- Firmware version: [e.g., v1.9.1]
- ESP8266 board package version: [e.g., 3.0.2]
- Arduino IDE version: [e.g., 1.8.19]
- Hardware: [e.g., TJ-56-654, custom ESP-01S]
**Additional context**
Add any other context about the problem here.
**Screenshots**
If applicable, add screenshots to help explain your problem.
+26
View File
@@ -0,0 +1,26 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEATURE] '
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
**Implementation ideas**
If you have ideas about how to implement this, please share:
- Code snippets
- Library suggestions
- Hardware requirements
+73
View File
@@ -0,0 +1,73 @@
name: Build Firmware
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
release:
types: [ created ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Arduino CLI
uses: arduino/setup-arduino-cli@v1
- name: Install ESP8266 platform
run: |
arduino-cli core update-index
arduino-cli core install esp8266:esp8266
- name: Install libraries
run: |
arduino-cli lib install "Adafruit GFX Library"
arduino-cli lib install "Adafruit SSD1306"
arduino-cli lib install "NTPClient"
arduino-cli lib install "WiFiManager"
arduino-cli lib install "AsyncHTTPRequest_Generic"
arduino-cli lib install "ESPAsyncTCP"
- name: Compile firmware
run: |
arduino-cli compile --fqbn esp8266:esp8266:generic \
--build-property "build.flash_size=1M64" \
--build-property "build.flash_mode=dio" \
--output-dir build \
src/clock_ntp_ota_v1.9.ino
- name: Check firmware size
run: |
SIZE=$(stat -c%s "build/clock_ntp_ota_v1.9.ino.bin")
echo "Firmware size: $SIZE bytes"
MAX_SIZE=470000 # 470KB max for OTA
if [ $SIZE -gt $MAX_SIZE ]; then
echo "ERROR: Firmware too large ($SIZE > $MAX_SIZE)"
exit 1
fi
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: firmware
path: |
build/clock_ntp_ota_v1.9.ino.bin
build/clock_ntp_ota_v1.9.ino.elf
build/clock_ntp_ota_v1.9.ino.map
retention-days: 30
- name: Upload release assets
if: github.event_name == 'release'
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: build/clock_ntp_ota_v1.9.ino.bin
asset_name: esp8266-weather-clock-${{ github.event.release.tag_name }}.bin
asset_content_type: application/octet-stream