Commit graph

152 commits

Author SHA1 Message Date
cjkas
9d16d6cc6d fix: address radio TX task review findings
- Abort in-flight transmissions on flush so config save, frequency scan
  and OTA never wait on the radio lock for a whole job
- Suspend TX during frequency scan and OTA
- Refuse commands the radio queue cannot take before consuming a rolling
  code or moving simulated shade state; shift movement start when a job
  goes on air late
- Apply radio config changes under the radio lock
- Re-check receiver idle before repeater transmissions
- Return 503 from web handlers when the command queue is full
- Restore 200 ms settle delay before the set-My command
- Report RSSI 0 instead of a stale value when the radio is busy
- Encode each frame once and centralise the repeat clamp

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-10 20:39:18 +02:00
cjkas
9a9afa5e86 fix: move radio TX to a dedicated task so HA WebSocket stays connected
Web command handlers ran on the async_tcp task and blocked up to 3s
waiting for loop() to bit-bang radio frames. async_tcp also services the
WebSocket on port 8080, so pongs stalled and Home Assistant
(ping_timeout=15) disconnected when several covers were commanded.

- Add a radio_tx FreeRTOS task with a job queue; sendFrame/repeatFrame
  and repeater frames enqueue instead of transmitting inline.
- Serialize CC1101 access with a recursive mutex (TX task, apply, end,
  frequency scan, RSSI read).
- Make Web::queueCommand fire-and-forget; drop the done semaphore.
- Route /setMyPosition and /unpairShade through the command queue.
- Clamp repeats to MAX_TX_REPEATS (40).
- Pin AsyncTCP to core 0 on dual-core targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 20:13:31 +02:00
github-actions[bot]
b117c34cb8 chore: bump version to v3.0.14 2026-10-10 17:01:25 +00:00
Ropheb
9f1f8f2efe Fix: remove via_device self-reference (breaks HA 2026.9.x MQTT discovery)
HA 2026.9.2 added strict device registry validation rejecting discovery
messages where via_device equals identifiers[0] ('A device can not be
its own via device'). ESPSomfy sets via_device = identifiers[0], causing
all cover entities to go unavailable on every ESP32 reboot.

via_device is for proxy/gateway relationships. ESPSomfy shades ARE the
ESP32 device — there is no proxy. Removing the field is semantically
correct and has no functional impact.

Fixes #32
2026-09-19 15:29:11 +01:00
Dennis
77f97498b0 Fix OTA update URLs to point to cjkas fork 2026-06-18 11:46:44 +02:00
github-actions[bot]
3ba27ad967 chore: bump version to v3.0.13 2026-04-22 12:21:50 +00:00
cjkas
6365f16850 Memory-bounded streaming builder for /controller. Produces the JSON payload one small unit at a time into a fixed 3KB buffer, so a chunked HTTP response can drain it as the TCP send window allows — no growing cbuf in the async response stream. 2026-04-21 14:56:20 +02:00
github-actions[bot]
f51e90bb7c chore: bump version to v3.0.12 2026-04-20 16:32:44 +00:00
cjkas
26400c534f Fix off-by-one bug in RTW protocol decoder.
The RTW decoder formula encKey - 133 was off by one versus the
RTW encoder (which maps command N to encKey N + 132). This caused
every non-My RTW command to decode as the wrong button (e.g. Up
decoded as My, Down as MyUp). Also adds rawCmd diagnostic field to
received frames for protocol debugging.
2026-04-19 11:07:53 +02:00
github-actions[bot]
3b6e1d1e67 chore: bump version to v3.0.11 2026-04-11 21:53:01 +00:00
Shailen Sobhee
b2e402e20e Fixed task_wdt: esp_task_wdt_reset(707): task not found 2026-04-11 23:48:19 +02:00
Shailen Sobhee
41270fffb8 tidier .gitignore 2026-04-11 12:26:22 +02:00
Shailen Sobhee
174f9a2287 cleaned code, as per inputs from cjkas 2026-04-11 12:08:55 +02:00
cjkas
7e6b65bc8d
Update ConfigSettings.h 2026-04-06 20:30:26 +02:00
cjkas
bb3ec52e89
Merge branch 'main' into main 2026-04-06 20:27:20 +02:00
github-actions[bot]
2ca1b8bd61 chore: bump version to v3.0.11 2026-04-06 09:02:01 +00:00
Shailen Sobhee
25f6195bbc build pass for esp32c6, added dependencies.lock 2026-04-05 21:06:48 +02:00
Shailen Sobhee
7524ce1d60 updated platformio.ini + add -D CHIP_ESP32C6 2026-04-05 20:19:23 +02:00
Shailen Sobhee
51109a16c5 updated gitignore file 2026-04-05 19:55:09 +02:00
Shailen Sobhee
3271327208 merge conflicts from 05.04 2026-04-05 19:08:01 +02:00
cjkas
3152002354 Merge branch 'main' into cjkas/wifi-crash-fix 2026-04-04 20:23:31 +02:00
cjkas
675971340e Fix wifi crash on freq scan 2026-04-04 20:21:40 +02:00
cjkas
bf0c3d37f5
Merge pull request #20 from cjkas/cjkas/fix-bkp
Update platform to espressif32 @ 6.13.0. SSID scan interval increased to 10 minutes to offload ESP.
2026-04-04 20:04:49 +02:00
cjkas
3a3ce2ae6a Update platform to espressif32 @ 6.13.0. SSID scan interval increased to 10 minutes to offload ESP. 2026-04-04 19:58:38 +02:00
github-actions[bot]
e513f94a37 chore: bump version to v3.0.10 2026-04-04 10:57:03 +00:00
cjkas
5a167e3b11 Fix bkp bug 2026-04-03 20:07:40 +02:00
Shailen Sobhee
fe4aa83ed2 updated code logic to pic FW/App version from appversion instead of hard-coding in js/html/cpp files 2026-03-30 22:41:08 +02:00
Shailen Sobhee
bb61a1703d fixed esp32-c6 platform detection issue 2026-03-30 21:04:59 +02:00
Shailen Sobhee
ff031eec92
Merge branch 'cjkas:main' into main 2026-03-30 14:48:11 +02:00
cjkas
1034a5b683 Bring back the core dump partition 2026-03-30 09:26:21 +02:00
cjkas
0dbb1da2bf Tsury noise detection 2026-03-30 09:22:22 +02:00
Shailen Sobhee
1dafb7a3fa minor edits to see the GPIO pins on ESP32-C6-WROOM-1 2026-03-30 03:03:08 +02:00
cjkas
72bfd26443 Added c6 support 2026-03-29 21:53:57 +02:00
cjkas
233d6abe62 Fix esp32c3 build 2026-03-27 20:21:56 +01:00
cjkas
bc4972c2ac Remove stale old binaries. Github release artifacts are now the place to store these binaries. 2026-03-27 08:50:33 +01:00
cjkas
c3c4e9b9f9 Restore original values. 2026-03-27 08:49:56 +01:00
cjkas
d5b8acecda fix race condition with multiple simultaneus requests 2026-03-25 16:09:08 +01:00
cjkas
2e379e6c1e Cleanup build warnings 2026-03-24 22:15:17 +01:00
cjkas
a220b9ecc2 replace Serial.print with logger 2026-03-24 20:28:06 +01:00
cjkas
8262f392f5 remove sync server 2026-03-24 19:23:35 +01:00
cjkas
9584f01a70 Fix bug with my position 2026-03-24 19:23:35 +01:00
cjkas
a55dc7f66b update to async web server 2026-03-24 19:23:35 +01:00
cjkas
73f39d67c3 refactor 2026-03-24 19:23:35 +01:00
cjkas
ed8137e686 replace sync sockets 2026-03-24 19:23:35 +01:00
cjkas
8c51e1a518 up 2026-03-24 19:23:35 +01:00
cjkas
9ccc2d4ff5 async server introduction 2026-03-24 19:22:57 +01:00
cjkas
c94819e928 fix crash 2026-03-24 19:22:56 +01:00
cjkas
88fdfa577a improve logging 2026-03-17 14:27:57 +01:00
cjkas
2509030c49 backup with RAM 2026-03-13 18:40:34 +01:00
cjkas
a54651a961 update version 2026-03-12 14:17:34 +01:00