Repository navigation
v4.0.0
4.0.0 is a breaking release. The web UI and Home Assistant now talk to the device over one socket, protocol 2, at ws://<device>/ws, and the old API is gone.
Before you update
- Take a backup (Settings > System > Firmware > Backup).
- Home Assistant: update the ESPSomfy RTS integration to v3.0.1 or later first. Older versions stop working with 4.0.0.
- Scripts: ports 8081 (HTTP API) and 8080 (events socket) are gone.
/shadeCommand,/groupCommandand/tiltCommandare on port 80, e.g.http://<device>/shadeCommand?shadeId=1&command=down. On a Secured device they need the token in anapikeyheader (see the README). - "Secure Config Only" is gone. A device set to it becomes Secured: the main page asks you to log in, and scripts need the token.
- The online update from GitHub is gone. Download the files for your chip from this release instead.
Updating
Coming from 3.x, flash over USB. An update from the 3.x web UI fails, because the 3.x web UI and the 4.0.0 firmware don't work with each other.
- Take a backup (Settings > System > Firmware > Backup).
- Flash
SomfyController.onboard.<chip>.binfrom the release's.zipover USB (Installing the Firmware). The image holds the firmware, the web UI and an empty configuration. - Connect to the device's access point, set up WiFi, then restore the backup (Settings > System > Firmware > Restore).
Once on 4.0.0, later updates on ESP32, ESP32-S3 and ESP32-C3 go through Settings > System > Firmware: Update Firmware with SomfyController.ino.<chip>.bin, then Update Application with SomfyController.littlefs.<chip>.bin. ESP32-C5 and ESP32-C6 have no OTA slot, so they are always flashed over USB.
What's new
- Security: on a Secured device every route and the socket need the token, and tokens are signed with a key only the device knows. Failed logins lock the client out, longer each time. Responses no longer allow any website to call the device (CORS), and the socket refuses pages from other sites.
- New builds: ESP32-C3 (chip revision v0.3 or later) and ESP32-C5. Neither has been tested on hardware yet; please report how they work.
- Restore:
- Long host names, NTP servers, MQTT hosts and topics, and time zones are restored whole.
- Shade, group and room names with a comma no longer corrupt the configuration.
- Restoring only the radio settings on a board without Ethernet no longer sets the wrong pins.
- Rolling codes on restore: a restore now puts back the backup's rolling codes, even when they are lower than the device's. If the backup is older, the motors ignore those remotes until the codes catch up with the last ones they heard: press the button a few times or pair again.
- MQTT: deleting a group now clears its retained
sunSensortopic. - The web UI says when a device's firmware has to be flashed over USB.
Known issues
- A saved WiFi passphrase or MQTT password can't be cleared from the web UI (#82).
What's Changed
- Move radio TX to a dedicated task so the HA WebSocket stays connected by @cjkas in #35
- Fix NVS, radio and shade bugs; split Somfy.cpp into tested modules by @cjkas in #36
- Set rolling codes only on the main loop; default a set-favorite tilt to the favorite tilt by @cjkas in #37
- refactor: move the transports into entryPoints and outputs, and plan the LoopQueue by @cjkas in #38
- build: give the debug build one 3 MB app slot without OTA by @cjkas in #39
- refactor: carry out shade requests from one module behind a LoopQueue by @cjkas in #40
- refactor: serve the read routes from a ModelSnapshot that loop() fills by @cjkas in #41
- refactor: apply shade model edits on loop() through ModelEditor by @cjkas in #42
- refactor: send shade and group changes once per loop() pass by @cjkas in #43
- refactor: split the transports into the modules GLOSSARY.md names by @cjkas in #44
- refactor: hold shade settings in ShadeSettings and RemoteSettings by @cjkas in #46
- Land the shade behaviour work (#47-#52) on main by @cjkas in #53
- fix: skip the room records too when a restore leaves the shades out by @cjkas in #54
- build: give the debug build the release file system size by @cjkas in #55
- fix: give out ids up to the maximum by @cjkas in #57
- cleanup: drop the group members SomfyGroup::fromJSON threw away by @cjkas in #58
- cleanup: drop the step cases onWaitingFrame never reaches by @cjkas in #59
- test: prove no read item can outgrow the snapshot unit by @cjkas in #60
- fix: make the socket buffer big enough for the largest event by @cjkas in #61
- docs: mark the review items fixed by #54, #57, #58 and HA#4 by @cjkas in #62
- feat: report main-loop health in memStatus by @cjkas in #63
- fix: stop sending stored passwords and PIN back to clients by @cjkas in #64
- docs: plan auth on every entry point and one HTTP server by @cjkas in #67
- fix: join the AP our scan picked without rescanning every channel by @cjkas in #66
- docs: record the issues found in the 2026-10-18/19 serial logs by @cjkas in #68
- fix: stop the 5 s boot wait, tell the client about a bad restore by @cjkas in #69
- fix: don't boot-loop on a corrupted coredump by @cjkas in #74
- fix: download the per-chip LittleFS image in online updates by @cjkas in #72
- fix: stop the CC1101 driver's "IO is not set as GPIO" log spam by @cjkas in #75
- build: move to pioarduino 55.03.312 (Arduino 3.3.12, ESP-IDF 5.5) by @cjkas in #71
- feat: keep Ethernet settings independent of the framework by @cjkas in #70
- docs: move open known issues to GitHub, drop the finished plans by @cjkas in #87
- fix: only touch the task watchdog from tasks that are subscribed to it by @cjkas in #88
- fix: send socket events only from loop() by @cjkas in #90
- fix: close WebSocket clients whose queue is full by @cjkas in #91
- chore: make SomfyController a .cpp instead of an .ino by @cjkas in #93
- chore: run the debug build's serial port at 921600 by @cjkas in #92
- feat: log failed heap allocations before the abort by @cjkas in #96
- docs: ADRs 0005-0007 for socket protocol 2 by @cjkas in #97
- feat: remove the GitHub update by @cjkas in #98
- feat: socket protocol 2 core on ws://host/ws by @cjkas in #99
- feat: command ops for socket protocol 2 by @cjkas in #100
- fix: CC1101 init hangs the ESP32-S3 when the radio is enabled by @cjkas in #103
- added s3 dbg board by @cjkas in #104
- feat: edit ops and the reads their forms need, for socket protocol 2 by @cjkas in #102
- feat: web UI on socket protocol 2 (step 2b) by @cjkas in #107
- feat: web UI protocol 2 client layer and asset bundles (step 2a) by @cjkas in #106
- feat: settings ops, WiFi and frequency scans, reboot (protocol 2 step 1d) by @cjkas in #105
- ci: pin pioarduino 6.2.0 by @cjkas in #109
- feat: throttle failed logins per client IP by @cjkas in #108
- PR B: secret token key, constant-time token compare, HMAC leak fix by @cjkas in #110
- feat!: remove the old API, ports 8081 and 8080 (step 4a) by @cjkas in #111
- feat!: the token on every route, Secure Config Only goes (step 4b) by @cjkas in #112
- fix: restore reads the options the web UI ticks by @cjkas in #113
- build: bring back the ESP32-C3 build by @cjkas in #114
- feat: say when the firmware is flashed over USB by @cjkas in #116
- build: add the ESP32-C5 by @cjkas in #118
- test: shades.cfg, backups, rolling codes, firmware update and MQTT discovery by @cjkas in #119
Full Changelog: v3.0.14...v4.0.0