Commit graph

46 commits

Author SHA1 Message Date
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
rstrouse
40711ee1b8
Update README.md 2023-01-09 20:18:15 -08:00
rstrouse
11d955e147
Create README.md 2023-01-09 19:41:45 -08:00