Commit graph

133 commits

Author SHA1 Message Date
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
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
e87f42fa50 Update reconnect procedure #385 2024-05-26 15:59:18 -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
23731f793f Added group/remote processing to SimMy #360 2024-05-04 13:25: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
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
026f9315b1 Stream all responses. Fix missing ETH IP address #310 2024-04-09 13:46:51 -07:00
Robert Strouse
775e82b766 Change build parameters for workflow 2024-03-21 20:23:36 -07:00
Robert Strouse
48ff18030e Stop targets on step movement #275 2024-02-13 19:03:00 -08:00
Robert Strouse
bbefe7fe6d Fix static IP for ETH connections #268 2024-02-12 17:36:57 -08:00
Robert Strouse
4e0d89e7db Add repeater function #261 2024-02-06 17:50:33 -08:00
Robert Strouse
54f98805b4 Final v2.3.1 2024-01-21 18:19:46 -08:00
Robert Strouse
0e91539457 Persist the disco configuration in MQTT 2024-01-15 17:35:46 -08:00
Robert Strouse
01895d0ec5 Fix issue where stop command is issued when seeking the current tilt position #239 2024-01-14 13:13:51 -08:00
Robert Strouse
574b2ece04 Added rooms to the configuration #221 2024-01-07 12:26:20 -08:00
Robert Strouse
a3cb1d63fe Add FS recovery for failed FS updates. 2024-01-06 11:28:03 -08:00
Robert Strouse
9d3d7ae21f Adding Invert commands to groups 2024-01-05 17:03:45 -08:00
Robert Strouse
58226cc931 Fix warnings - Add pre-release warning - Abort update on dl fail 2023-12-31 12:30:44 -08:00
Robert Strouse
a944772f96 Improve workflows for GitOTA. 2023-12-30 10:55:15 -08:00
Robert Strouse
23b24741fa Working on release files for various boards 2023-12-26 12:52:37 -08:00
Robert Strouse
cc816ace58 Persist shade state information in MQTT #210 2023-12-24 13:14:07 -08:00
Robert Strouse
19bdbdb898 More updates to integrated tilt position #192 2023-12-22 16:57:12 -08:00
Robert Strouse
f738be6782 Fix JSON size #209 Fix blind movement #192 2023-12-22 12:33:19 -08:00
Robert Strouse
c0621d82ec Added functionality to support low level triggers for GPIO types #206 2023-12-20 09:18:45 -08:00
Robert Strouse
0c36c8e746 Gate Control #199 Prog Hold for Groups #195 2023-12-10 11:19:51 -08:00
Robert Strouse
d97f150439 Fix issue #192. Movement continues to my position when finished. 2023-11-15 09:43:48 -08:00
Robert Strouse
7592a2fc89 Prepare for v2.2.1 release
* Fixed issue with my position setting out of order when the flip position bit is set.
* Fixed issue with changes to the my labels when a tilt type changes.
* Fixed issue with isAtPosition method to accommodate both tilt and lift capabilities.
* Ensure target position is always the end position during movement checks.  Previously, this was only an approximation.
2023-11-02 10:35:44 -07:00
Robert Strouse
946778080c Emit Step Up on the MQTT command topic #186 2023-11-01 11:17:19 -07:00
Robert Strouse
e2ec2ad436 Add command emits to MQTT #186 2023-10-31 16:15:43 -07:00
Robert Strouse
7c983c9b2e Reduce MQTT publish load. 2023-10-31 11:09:58 -07:00
Robert Strouse
4e3d8597f5 Deal with tilt judder using integrated tilts. 2023-10-29 17:24:47 -07:00
Robert Strouse
2fb2f65da6 Fix buffer overrun for groups with long names. 2023-10-29 15:12:08 -07:00
Robert Strouse
46f6e6912d Add MQTT disco attributes #182 2023-10-29 14:27:25 -07:00
Robert Strouse
79c7ecccac Added MQTT auto discovery #180 2023-10-28 11:39:42 -07:00
Robert Strouse
13aff49479 Work on Github update #171 2023-10-27 11:34:49 -07:00
Robert Strouse
a9325eeca5 Github firmware updates #171 2023-10-19 14:20:33 -07:00
Robert Strouse
47eeeaecac Force tilt only blinds to closed. 2023-10-10 17:30:39 -07:00
Robert Strouse
bb36ed0f82 Add dry contact support for IO Remote and Relays #165 2023-10-10 11:41:21 -07:00
Robert Strouse
87995bf707 Added Remote protocol #165, added mac to MQTT #167 2023-10-07 11:12:45 -07:00
Robert Strouse
4d49a048f4 GPIO motor support #165 Publish only changes #167 2023-10-05 14:52:54 -07:00
Robert Strouse
1cb9746cc8 Added functionality for euro lift tilt mechanisms. 2023-09-28 18:25:09 -07:00
Robert Strouse
93656f9478 Ignore Flag/SunFlag frames from sensors #147 2023-09-26 12:07:48 -07:00