- Created modular Python files (main, utils, discovery, configuration, console_settings, unknown_devices, reporting, unifi_client) - Moved documentation files to docs/ - Moved data files to data/ - Removed old monolithic TasmotaManager.py and TasmotaManager_fixed.py - Updated .gitignore and pyproject.toml - All functionality preserved, command-line interface unchanged Version: 2.0.0
3.2 KiB
3.2 KiB
GitLab Migration Instructions
This document provides instructions for completing the migration of the TasmotaManager project to GitLab at 192.168.5.10.
Completed Steps
The following steps have already been completed:
- Git repository initialized in the TasmotaManager directory
.gitignorefile created to exclude sensitive files:network_configuration.json(contains credentials)- Data files with network information (
current.json,deprecated.json,TasmotaDevices.json) - Backup files
README.mdfile created with project documentation- Non-sensitive files added and committed to the local Git repository:
TasmotaManager.py.gitignoreREADME.md
Remaining Steps
To complete the migration to GitLab, follow these steps:
Option 1: Create a new repository in GitLab
- Log in to GitLab at http://192.168.5.10
- Navigate to the Manager project/group
- Create a new project named "TasmotaManager"
- Follow the instructions provided by GitLab to push an existing repository:
# If using HTTP
git remote add gitlab http://192.168.5.10/Manager/TasmotaManager.git
git push -u gitlab inital
# If using SSH
git remote add gitlab git@192.168.5.10:Manager/TasmotaManager.git
git push -u gitlab inital
Option 2: Add as a subproject to the existing Manager project
If TasmotaManager should be a subproject or subdirectory within the Manager project:
- Clone the Manager project:
git clone http://192.168.5.10/Manager.git
- Create a TasmotaManager directory within the Manager project:
cd Manager
mkdir TasmotaManager
- Copy the files from the local TasmotaManager repository:
cp /home/mgeppert/git_work/scripts/TasmotaManager/TasmotaManager.py TasmotaManager/
cp /home/mgeppert/git_work/scripts/TasmotaManager/.gitignore TasmotaManager/
cp /home/mgeppert/git_work/scripts/TasmotaManager/README.md TasmotaManager/
- Add, commit, and push the changes:
git add TasmotaManager
git commit -m "Add TasmotaManager as a subproject"
git push
Option 3: Add as a Git submodule
If TasmotaManager should be maintained as a separate repository but included in the Manager project:
- First, create the TasmotaManager repository in GitLab (see Option 1)
- Clone the Manager project:
git clone http://192.168.5.10/Manager.git
- Add the TasmotaManager as a submodule:
cd Manager
git submodule add http://192.168.5.10/TasmotaManager.git TasmotaManager
git commit -m "Add TasmotaManager as a submodule"
git push
Configuration Files
Remember that sensitive configuration files are excluded from version control. After cloning or setting up the repository, you'll need to:
- Create a
network_configuration.jsonfile with your UniFi Controller and MQTT settings - Run the script to generate the data files:
python TasmotaManager.py
Troubleshooting
If you encounter authentication issues when pushing to GitLab:
- Ensure you have the correct access rights to the repository
- Try using a personal access token instead of password authentication:
git remote set-url gitlab http://username:token@192.168.5.10/Manager/TasmotaManager.git
- If using SSH, ensure your SSH key is added to your GitLab account