Commit graph

348 commits

Author SHA1 Message Date
Evan Broder
141397eeca
Merge 3d7fe0a65f into eb75868adb 2026-09-23 00:48:15 +00:00
Evan Broder
3d7fe0a65f Keep network tasks from preempting Somfy frame transmission
`Transceiver::sendFrame` bit-bangs each symbol with `delayMicroseconds`
from the loop task, which runs at FreeRTOS priority 1. On single-core
parts like the ESP32-C3, the WiFi and lwIP tasks run at higher priority
on the same core, so they preempt the loop task when a packet arrives.
That can delay an edge by several hundred microseconds. This firmware's
own decoder only accepts a 640us half-symbol within 30%, so the motor
probably can't decode the frame either. Because RTS is one-way, the
firmware still updates the shade position, and the UI shows the shade
moving even though the motor never got a valid frame.

I measured this with an instrumented build on a C3, sending commands to
a shade that isn't paired to any motor. When commands went out one at a
time, 38% of frames had an edge more than 200us late. With other
traffic (three commands at once, background HTTP requests, or position
updates streaming during a move), 56-71% did, and the worst edge was
2ms late. The shade was set to 2 repeats (three frames per command),
and 8 of the 33 commands sent under load had a late edge in every
frame.

Raise the loop task's priority above the network tasks from the first
hardware sync pulse through the last data bit, then restore it so lwIP
and WiFi can catch up between frames. With the change, out of 738 test
frames, no edge was more than 9us late, and HTTP latency under load was
unchanged. My shades seem more responsive now, but the failures were
intermittent enough that I'm not confident about it. I've only tested
this with 56-bit shades.
2026-09-22 17:39:01 -07:00
Robert Strouse
eb75868adb Update build params for C3 #458 #454 2024-08-19 10:46:00 -07:00
Robert Strouse
3d9e6c11c2 Clear the connecting flag for ETH Wifi fallback #445 2024-08-04 09:32:18 -07:00
Robert Strouse
e478d17c7f Bypass AP Scanning with Use Hidden SSID option #438 #434 2024-07-27 12:12:38 -07:00
Robert Strouse
93ebddd29d Prepare v2.4.6 Release 2024-07-25 17:14:29 -07:00
Robert Strouse
fb1f18e260 Ensure the network connection has completed before trying MQTT. 2024-07-14 09:59:14 -07:00
Robert Strouse
c3ada3b40e removed pin restrictions for S3 #426 2024-07-13 07:18:26 -07:00
Robert Strouse
75928b4ac8 Remove autoReconnect function from core #410 #407 2024-07-10 21:40:55 -07:00
Robert Strouse
0b985c0880 More aggressive WIFI scanning #410 #407 2024-06-28 14:37:41 -07:00
Robert Strouse
e04d7e3fc7 Include scan with SoftAP operation #407 #410 2024-06-25 18:04:46 -07:00
Robert Strouse
9205723125 Reduce heap emits for interface sockets 2024-06-19 11:21:51 -07:00
Robert Strouse
2b59f330a9 Add support for 1 button gates #388 2024-06-18 14:05:43 -07:00
Robert Strouse
c528fda55a Fix issue with deleting repeaters #402 2024-06-17 08:47:44 -07:00
Robert Strouse
f29cd9c089 Add additional command structure for 80-bit up/down 2024-06-15 09:22:27 -07:00
Robert Strouse
cf7a9b1fc2 Fixes for TaHoma hub #393 2024-06-07 19:06:27 -07:00
Robert Strouse
473307b320 Added additional checks for wifi dropoffs and disconnect from STA for AP scan. 2024-06-02 10:58:51 -07:00
Robert Strouse
2dc49a64e9 Bump application to v2.4.4 2024-05-26 16:36:29 -07:00
Robert Strouse
5f15a7cc93 Bump workflow actions 2024-05-26 16:05:04 -07:00
Robert Strouse
e87f42fa50 Update reconnect procedure #385 2024-05-26 15:59:18 -07:00
Robert Strouse
4f3a93b336 Prepare final release for v2.4.3 2024-05-12 11:23:23 -07:00
Robert Strouse
6077052e9b Added 80bit step functions to groups #280 2024-05-08 16:44:19 -07:00
Robert Strouse
e3e843387f Added 80bit commands for Step, Stop, and Favorite #280 2024-05-07 15:59:50 -07:00
Robert Strouse
c4e1dbe44b Bump Arduino core to 2.0.16 2024-05-04 13:36:55 -07:00
Robert Strouse
23731f793f Added group/remote processing to SimMy #360 2024-05-04 13:25:58 -07:00
Robert Strouse
d64103f259 Added 5 second wdt #349 2024-05-04 12:21:58 -07:00
Robert Strouse
2feb420551 Groups #350, #354, Ethernet #348 2024-05-03 16:39:46 -07:00
Robert Strouse
82c867d2eb Fix memory leak #273 2024-04-21 13:43:15 -07:00
Robert Strouse
f8b3bc4133 Fix byte alignments #273 2024-04-18 18:56:33 -07:00
Robert Strouse
25c8a66869 Add apple icons #326 2024-04-14 13:58:16 -07:00
Robert Strouse
652346a7c7 Fix issue where connType was not being sent. 2024-04-10 13:44:57 -07:00
Robert Strouse
ce3946c9e6 Publish TCP 80 for mDNS 2024-04-10 12:15:40 -07:00
Robert Strouse
c4d6a1008f Fix C3 casts 2024-04-09 19:08:38 -07:00
Robert Strouse
5a8c09ee9f Handle C3 ints 2024-04-09 14:26:51 -07:00
Robert Strouse
026f9315b1 Stream all responses. Fix missing ETH IP address #310 2024-04-09 13:46:51 -07:00
Robert Strouse
6ba354c7ff Chunk single group response #316 2024-04-03 07:49:26 -07:00
rstrouse
610773c6b7
Merge pull request #317 from nbarrientos/ibarrien
Fix typo in the UI
2024-04-03 07:48:16 -07:00
Nacho Barrientos
dd0d7fa2a3 Fix typo 2024-04-03 15:27:15 +02:00
Robert Strouse
d8292fdc2b Added the current ip address to the DHCP tab #310 2024-03-23 09:16:41 -07:00
Robert Strouse
49d134e6f2 Wait until reboot after firmware update. 2024-03-22 12:56:19 -07:00
Robert Strouse
b8967901de Update workflows 2024-03-22 08:34:26 -07:00
Robert Strouse
5141676724 Change workflows 2024-03-22 07:55:11 -07:00
Robert Strouse
775e82b766 Change build parameters for workflow 2024-03-21 20:23:36 -07:00
Robert Strouse
b324f59c03 Add wifi roaming #294 #270 2024-03-09 12:45:06 -08:00
Robert Strouse
cb14cd42dc Fix group output for discovery #291 2024-03-03 13:00:01 -08:00
Robert Strouse
2dd40396c2 Change the channel surfing functions for wifi #294 2024-03-03 09:25:44 -08:00
Robert Strouse
60af2bf399 Improve wifi fallback 2024-03-03 08:33:19 -08:00
Robert Strouse
ea5614c700 Add MQTT settings to backup/restore #284 2024-02-24 21:44:47 -08:00
Robert Strouse
632dd3900b Change the soft AP behavior so it does not start as fast on ethernet #271 2024-02-19 17:21:41 -08:00
Robert Strouse
2a3d7aa7e7 Check the link status on Ethernet #273 2024-02-17 11:52:23 -08:00