TasmotaManager/docs/GITLAB_MIGRATION.md
Mike Geppert 9c22168f79 Refactor: Split TasmotaManager into modular structure
- 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
2025-10-29 16:38:03 +00:00

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:

  1. Git repository initialized in the TasmotaManager directory
  2. .gitignore file created to exclude sensitive files:
    • network_configuration.json (contains credentials)
    • Data files with network information (current.json, deprecated.json, TasmotaDevices.json)
    • Backup files
  3. README.md file created with project documentation
  4. Non-sensitive files added and committed to the local Git repository:
    • TasmotaManager.py
    • .gitignore
    • README.md

Remaining Steps

To complete the migration to GitLab, follow these steps:

Option 1: Create a new repository in GitLab

  1. Log in to GitLab at http://192.168.5.10
  2. Navigate to the Manager project/group
  3. Create a new project named "TasmotaManager"
  4. 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:

  1. Clone the Manager project:
git clone http://192.168.5.10/Manager.git
  1. Create a TasmotaManager directory within the Manager project:
cd Manager
mkdir TasmotaManager
  1. 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/
  1. 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:

  1. First, create the TasmotaManager repository in GitLab (see Option 1)
  2. Clone the Manager project:
git clone http://192.168.5.10/Manager.git
  1. 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:

  1. Create a network_configuration.json file with your UniFi Controller and MQTT settings
  2. Run the script to generate the data files:
python TasmotaManager.py

Troubleshooting

If you encounter authentication issues when pushing to GitLab:

  1. Ensure you have the correct access rights to the repository
  2. 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
  1. If using SSH, ensure your SSH key is added to your GitLab account