Commit graph

52 commits

Author SHA1 Message Date
R. Sid Shaytay
a5afcfacea build: match Plus profile to standard upstream S3 layout 2026-11-14 18:33:33 -08:00
R. Sid Shaytay
fdf840a236 feat: support headless LILYGO T-Embed CC1101 Plus
Configure the integrated radio power, shared SPI selects, RF path and fixed wiring without changing generic boards. Preload output latches for Arduino 3 and publish radio availability only after register and RX checks succeed. Reuse the existing partition table and protect integrated, USB and PSRAM pins across configuration and GPIO output paths.

Exercise production setup, RX and queue admission methods in a hardware-boundary host harness, run it in CI and document the opt-in build. Keep restore policy, security corrections and release tooling outside this board-only change.
2026-11-14 18:33:33 -08:00
cjkas
89299d83a5 docs(readme): present the repo as the maintained ESPSomfy-RTS
The README opened with a note about watchdog restarts and linked
rstrouse's wiki and HA integration, so visitors were sent back to the
unmaintained project. It now says what the project is, what changed
since rstrouse's version, how to install and upgrade, and links this
repo's wiki and the cjkas HA integration. rstrouse is credited.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 13:03:25 +01:00
cjkas
787cebdb18 ci: review fixes for the release job and set_version.sh
- set_version.sh: three of its four patterns only matched digits and
  dots, so FW_VERSION and index.js stayed at v4.0.0.beta and index.html
  at ?v=3.0.14d. They now match any version, and the script fails when a
  file doesn't end up with the new one. test/scripts/test_set_version.sh
  covers it and runs with the native tests.
- Release job: each build's files are collected from its own folder,
  with 4 files each and no name in two builds, before they're signed.
  The version bump is made on the release's branch as it is now, not the
  tag, so a merge during the builds doesn't reject the push.
- Scorecard reports to code scanning only: publishing from a fork isn't
  supported, so no badge.
- New workflows renamed to .yaml like build.yaml. SECURITY.md: the routes
  open in Secured mode, and which jobs can write what.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 19:34:14 +01:00
cjkas
5c57d1a2cd ci: signed release provenance, pinned dependencies, security scanning
- Release files get a SHA256SUMS file and a Sigstore-signed build
  provenance attestation (gh attestation verify).
- The workflows read the repo only. A new release job, which runs no
  build tools, is the only one that can write: it uploads the files with
  gh and pushes the version bump. The third-party release actions are gone.
- Every action is pinned to a commit SHA, esptool and the libraries to
  exact versions. The release tag reaches the shell through env, and
  set_version.sh rejects tags that aren't versions.
- New workflows: CodeQL (C++ via the native build, JS, Python, Actions),
  OpenSSF Scorecard, zizmor. Dependabot moves the action pins.
- SECURITY.md: private reporting, checking a download. README badges.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 13:27:48 +01:00
cjkas
0ee52d6d9f fix: close the token bypass below a route, review fixes for 4b
The routes matched any path below them, and a web asset name there
passed the token check: GET /backup/a.js returned the backup under
Secured. Every route is now an exact match, and a web asset sits in
the root only.

- e2e: those paths answer 401 or 404; the restore test now fails when
  the chunks skip the token check (checked with the check removed).
- WEB_CORS lets the socket take Origin: null instead of skipping the
  Origin check.
- ADR 0006, GLOSSARY and README: the Origin check in either mode, /ws
  as a public route, the Host header behind a reverse proxy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-28 19:39:51 +01:00
cjkas
ecb0260f61 feat!: the token on every route, Secure Config Only goes (step 4b)
Under Secured every HTTP route but the public ones needs the token
(docs/adr/0006-two-security-modes-eleven-http-routes.md):
- isPublicRoute, isWebAsset and originMatchesHost in src/HttpAccess.h,
  with native tests.
- One middleware checks the token. It runs once the body is in, so
  /restore, /updateFirmware and /updateApplication check it on their
  first chunk and drop a refused upload.
- Static serving answers the web UI's files only: shades.cfg and
  shades.tmp are no longer served.
- The wildcard CORS headers go; WEB_CORS turns them back on for UI work
  from file://.
- The socket refuses a handshake whose Origin doesn't name its Host.
- "Secure Config Only" goes: a device set to it is Secured, and
  /loginContext drops permissions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 23:03:59 +01:00
cjkas
2a954aa158 feat!: remove the old API, ports 8081 and 8080 (step 4a)
Step 4a of docs/SECURITY_PLAN.md. Port 80 keeps the eleven HTTP routes of
ADR 0006 and the socket at /ws; everything else moved to protocol 2.

- Port 8081 (ApiRoutes) and the socket on 8080 (SocketEmitter) are gone.
  Protocol 2 owns its frame buffer and loop-task check.
- Port 80 drops every route the old web UI called: reads, edits,
  settings, scans, reboot, /shades.cfg, /discovery. HttpRoutes.cpp holds
  what stays.
- ModelSnapshot, SnapshotSlots and the read documents are gone. The item
  snapshot types stay, as ItemSnapshot, for events, MQTT and the command
  replies.
- Model edits reply only to their protocol 2 op: requestResult goes.
- The settings' toJSON writers, used only by the settings routes, go.
- The _espsomfy_rts._tcp mDNS record moves to port 80, with path=/ws.
- The memory event reports the loop-rate window it closes.
- A deleted room no longer re-publishes its retained MQTT topics.
- e2e: the heap check reads the sync's status; the sync is checked on
  its own instead of against /controller.
- README gets an API and ports section.

BREAKING CHANGE: ports 8081 and 8080 and the old HTTP routes are gone.
Home Assistant needs integration 3.0.0 or newer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-27 21:49:38 +01:00
cjkas
a1622e652d build: move to pioarduino 55.03.312 (Arduino 3.3.12, ESP-IDF 5.5)
IDF 4.4 gets no more security fixes, and the planned RMT radio needs
IDF 5's RMT driver.  See docs/adr/0003-pioarduino-idf55.md.

- Every env on one pinned pioarduino release.  C6 drops its own
  library list and flags but stays a debug build on huge_app.
- Release envs build at CORE_DEBUG_LEVEL=2 so the ESP32 image fits its
  1.5 MB OTA slot (17 KB free); debug envs stay at 3.
- Drop the C3: its image is 76.5 KB over the OTA slot on IDF 5.5.
- CI installs pioarduino's Core and checks firmware.bin against the app
  partition, failing under 8 KB free.  PlatformIO's "Flash:" figure
  reads ~45 KB low and passed a C3 image that doesn't fit.
- esp_task_wdt_reconfigure(): on 3.x the core already starts the watchdog
  and esp_task_wdt_init() fails, so the C6 build kept the 5 s default.
- An updated firmware is kept only once it has run 60 s with the
  network up; a reset before then rolls back to the previous one.
- ETH.begin() takes the 3.x argument order; Arduino 2.x branches gone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 22:05:22 +02:00
cjkas
f0d69072f9
Update README.md 2026-04-04 12:58:37 +02:00
cjkas
72e275128b
Update README.md 2026-04-04 10:44:06 +02:00
cjkas
ab91e7a6ff
Update README.md 2026-03-29 12:17:51 +02:00
cjkas
8c51e1a518 up 2026-03-24 19:23:35 +01:00
cjkas
c94819e928 fix crash 2026-03-24 19:22:56 +01:00
cjkas
2509030c49 backup with RAM 2026-03-13 18:40:34 +01:00
rstrouse
42a4dcb3ff
Update README.md 2023-11-04 11:49:06 -07:00
rstrouse
93fb1a2762
Update README.md 2023-11-04 11:46:22 -07:00
rstrouse
844a163e5d
Update README.md 2023-10-21 08:04:43 -07:00
rstrouse
b171e78ed2
Update README.md 2023-07-02 09:16:20 -07:00
rstrouse
497eb5f8cb
Update README.md 2023-06-10 10:53:01 -07:00
rstrouse
23ff39092f
Update README.md 2023-06-10 10:06:23 -07:00
rstrouse
a5868618c7
Update README.md 2023-05-17 12:20:19 -07:00
rstrouse
9adf52f5f7
Update README.md 2023-05-17 12:18:20 -07:00
rstrouse
7bd23e6bbe
Update README.md 2023-03-12 13:13:03 -07:00
rstrouse
0246c87ac3
Update README.md 2023-03-12 09:56:42 -07:00
rstrouse
21d56993d0
Update README.md 2023-03-04 12:40:47 -08:00
rstrouse
259e437233
Update README.md 2023-03-03 19:27:25 -08:00
rstrouse
16ef81381d
Update README.md 2023-02-18 19:31:32 -08:00
rstrouse
d8038aebce
Update README.md 2023-02-14 17:15:31 -08:00
rstrouse
9181fd924a
Update README.md 2023-01-22 15:08:12 -08:00
rstrouse
b40451a643
Update README.md 2023-01-22 15:07:47 -08:00
rstrouse
8aa7968e0e
Update README.md 2023-01-22 11:16:00 -08:00
rstrouse
3d1f9cdac8
Update README.md 2023-01-22 11:15:36 -08:00
rstrouse
f8dacdf094
Update README.md 2023-01-22 11:02:12 -08:00
rstrouse
a63e881a63
Update README.md 2023-01-14 09:31:33 -08:00
rstrouse
b1c47e5687
Update README.md 2023-01-14 09:29:44 -08:00
rstrouse
07a6fd93f5
Update README.md 2023-01-13 13:26:14 -08:00
rstrouse
35d3ab4a85
Update README.md 2023-01-13 12:14:59 -08:00
rstrouse
7384fb2a4a
Update README.md 2023-01-13 12:06:24 -08:00
rstrouse
797b652ce6
Update README.md 2023-01-13 11:52:21 -08:00
rstrouse
a561b7b199
Update README.md 2023-01-13 11:46:58 -08:00
rstrouse
cf8a10f969
Update README.md 2023-01-13 11:07:29 -08:00
rstrouse
f10641e4fc
Update README.md 2023-01-13 08:52:23 -08:00
rstrouse
9bae2bcf55
Update README.md 2023-01-11 15:06:20 -08:00
rstrouse
46106ddcee
Update README.md 2023-01-11 14:45:03 -08:00
rstrouse
b1a3c8a959
Update README.md 2023-01-10 12:23:38 -08:00
rstrouse
9fa4714eb5
Update README.md 2023-01-10 12:16:28 -08:00
rstrouse
9899defd4c
Update README.md 2023-01-10 12:04:27 -08:00
rstrouse
4e147856d9
Update README.md 2023-01-10 12:02:40 -08:00
rstrouse
26cb51be8f
Update README.md 2023-01-10 12:01:52 -08:00