-
Notifications
You must be signed in to change notification settings - Fork 5
Make WiFi configurable in the settings server #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
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
- Store WiFi configurations in Redis instead of directly editing wpa_supplicant.conf - Add WiFi configuration UI in settings server to manage multiple networks - Add WiFi migration command to import existing networks - Manage a dedicated section in wpa_supplicant.conf marked with comments - Update existing WiFi commands to use the new Redis-based storage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove country code input from settings UI - Remove country code from secure settings template 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change 'wifi list' to 'wifi-list'
- Change 'wifi migrate' to 'wifi-migrate'
- Change 'wifi remove' to 'wifi-remove'
- Change 'wifi refresh' and 'wifi reconfigure' to 'wifi-refresh' and 'wifi-reconfigure'
This resolves potential command parameter collisions with the 'wifi {}' command.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
- Move WiFi functionality into dedicated module (gonotego.settings.wifi) - Update system_commands.py to use the new WiFi module - Update server.py to properly import and use the WiFi module - Fix WiFi settings handling in server.py to use the proper modules 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change from gonotego/settings/wifi/__init__.py to gonotego/settings/wifi.py - Ensure file ends with newline character 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove directory structure in favor of single file approach - Clean up git tracking of removed file 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
dbieber
commented
Apr 14, 2025
gonotego/settings/server.py
Outdated
| try: | ||
| # Special handling for CUSTOM_COMMAND_PATHS which is a list | ||
| # Special handling for CUSTOM_COMMAND_PATHS and WIFI_NETWORKS which are lists | ||
| if isinstance(value, list): |
Owner
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they're not actually treated differently; remove the if
- Remove the comment about WiFi functions being moved 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add migrate_networks_from_wpa_supplicant function to wifi.py - Update system_commands.py to use the new function - Simplify code in system_commands.py 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create wifi_commands.py for all WiFi-related commands - Remove WiFi commands from system_commands.py - Update commands.py to import wifi_commands - Update wifi.py to import system_commands directly - Use shell = system_commands.shell for cleaner code 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove unused imports in system_commands.py - Fix module imports in wifi_commands.py - Clean up secure_settings_template.py formatting - Simplify settings saving in server.py - Improve empty value handling in server.py 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
bb48dbb to
2be32f9
Compare
- Add special handling for WIFI_NETWORKS in the API response - Get networks directly from the wifi module to ensure proper format - Add debug logging to help diagnose issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update serverurl in supervisord.conf to use /tmp/supervisor.sock - Simplify path for better compatibility across environments 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Sort imports alphabetically in wifi_commands.py - Sort imports alphabetically in server.py - Remove debug print statements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
dbieber
commented
Apr 14, 2025
| # Handle other values | ||
| else: | ||
| settings.set(key, value) | ||
| settings.set(key, value) |
Owner
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure if settings.set with this value is correct - test in follow up PR
- Remove unused import of gonotego.common.interprocess - Fix linting error F401 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
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.
Make it so the wifi is configurable in the settings server. right now wifi can only be configured either through the :wifi command (in system_commands.py) or by manually editing the wpa_supplicant, but that's tedius and technical and we want non-technical users to be able to use go note go, so we want wifi to be configurable in the settings server. Currently the :wifi command simply appends to the wpa_supplicant. Instead, let's take a different approach: Let's store the registered wifi configs in redis We'll make the :wifi command add a new config to the list (if it doesn't already exist). The settings UI will load the wifi configs from redis (using the settings module — settings.get and settings.set are the way to update redis from the settings server) Whenever the wifi configs in redis get updated, let's update a special section of the wpa supplicant: This section will be demarcated by a begin and end comment. And when it's updated, (1) if that section doesn't exist, it will be added, (2) if it does exist, it will be replaced wholesale. Each time its updated that special Go Note Go managed section will be updated to list all the wifi networks present in the redis config. In this way the user can add/remove wifi configs via the settings UI or add using the :wifi command.
Conversation Prompts
Initial request
Remove country code
Rename commands to avoid collisions
Debugging UI issue
Remove wifi/init.py
Remove comment
Move migrate logic
Fix circular imports
Shell function advice
Formatting
Final UI issue debugging
🤖 Generated with Claude Code