saving files

This commit is contained in:
Mike Geppert 2025-08-03 22:22:24 -05:00
parent 73f7acfd8c
commit b57a0ffa88
2 changed files with 109 additions and 1 deletions

108
GITLAB_MIGRATION.md Normal file
View File

@ -0,0 +1,108 @@
# 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:
```bash
# 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:
```bash
git clone http://192.168.5.10/Manager.git
```
2. Create a TasmotaManager directory within the Manager project:
```bash
cd Manager
mkdir TasmotaManager
```
3. Copy the files from the local TasmotaManager repository:
```bash
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/
```
4. Add, commit, and push the changes:
```bash
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:
```bash
git clone http://192.168.5.10/Manager.git
```
3. Add the TasmotaManager as a submodule:
```bash
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:
```bash
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:
```bash
git remote set-url gitlab http://username:token@192.168.5.10/Manager/TasmotaManager.git
```
3. If using SSH, ensure your SSH key is added to your GitLab account

View File

@ -20,7 +20,7 @@
}
},
"mqtt": {
"Host": "homeassistant.Not.mgeppert.com",
"Host": "homeassistant.NoT.mgeppert.com",
"Port": 1883,
"User": "mgeppert",
"Password": "mgeppert",