Serial bus No. 3: Configure peers over Serial Bus#189
Merged
JensOgorek merged 16 commits intomainfrom Mar 14, 2026
Merged
Conversation
Contributor
Author
|
Tested with Working bus peer id1 scriptunreachable bus peer id1 scriptAfter the first script was configured first, the backup was created. On the second script, lizard removed both serial modules and created a fresh serial with bus from the backup, so the esp32 on the bus was still reachable. |
falkoschindler
requested changes
Mar 5, 2026
Collaborator
falkoschindler
left a comment
There was a problem hiding this comment.
I (manually) reviewed the PR and added some comments. Let's address them first before checking the final result one last time.
Collaborator
|
Apart from improving |
falkoschindler
approved these changes
Mar 12, 2026
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
When configuring ESP32 nodes over the serial bus, there was no easy way to send a complete .liz script to a remote node. Additionally, if a broken script was deployed to a bus node (or a script without SerialBus configuration), the node would become unreachable and require physical USB access to fix.
Implementation
Remote configuration via serial bus (configure.py)
--serial-bus NODE_IDargumentbus.send(NODE_ID, '...')to forward to remote nodeString quoting in expression output (expression.cpp)
"are now output with single quotes instead of double quotescore.output("core.millis module1.property1")to be sent viabus.send(node, '...')without breaking the quotingAutomatic bus backup (main/utils/bus_backup.cpp)
core.forget_serial_bus()to clear the saved config from NVSDesign Decisions
expression.cpp— no handling for strings with both"and': not needed since the quoting is only used byconfigure.pyin a controlled context.serial_bus.h—serialandnode_idmoved to public: fine since both areconst, simple and safe.restore_if_needed()removes all Serial modules (not just the bus one): acceptable trade-off since keeping the node reachable is the priority.Progress