Initial commit: Documentation Effi v1.0
- Structure complète du projet - Docker compose de production - Documentation organisée par thèmes - Guides d'installation et configuration - Section dépannage détaillée - Journal historique
This commit is contained in:
@@ -0,0 +1,169 @@
|
||||
# 🔗 Intégration MCP et n8n
|
||||
|
||||
## Vue d'ensemble
|
||||
|
||||
Effi s'intègre avec plusieurs outils externes via :
|
||||
- **MCP** (Model Context Protocol) : Protocole d'outils pour l'IA
|
||||
- **n8n** : Plateforme d'automatisation de workflows
|
||||
- **CouchDB** : Synchronisation Obsidian LiveSync
|
||||
|
||||
---
|
||||
|
||||
## MCPO - Proxy MCP
|
||||
|
||||
### Rôle
|
||||
|
||||
MCPO fait le pont entre OpenWebUI et les outils MCP (Obsidian, système de fichiers, etc.).
|
||||
|
||||
### Configuration
|
||||
|
||||
**Fichier : `~/effi/mcpo-config/config.json`**
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {}
|
||||
}
|
||||
```
|
||||
|
||||
Au démarrage, créer ce fichier s'il n'existe pas :
|
||||
|
||||
```bash
|
||||
cat > ~/effi/mcpo-config/config.json << 'EOF'
|
||||
{"mcpServers": {}}
|
||||
EOF
|
||||
```
|
||||
|
||||
### Accès
|
||||
|
||||
- URL : `http://192.168.1.27:8000`
|
||||
- Port : 8000
|
||||
|
||||
### Dépannage
|
||||
|
||||
**Problème : mcpo redémarre en boucle**
|
||||
|
||||
**Cause** : Config `mcpo-config/config.json` vide ou inexistant
|
||||
|
||||
**Solution** :
|
||||
```bash
|
||||
cat > ~/effi/mcpo-config/config.json << 'EOF'
|
||||
{"mcpServers": {}}
|
||||
EOF
|
||||
docker compose restart mcpo
|
||||
```
|
||||
|
||||
**Problème : Processus zombies**
|
||||
|
||||
**Symptômes** : `[mcpo] <defunct>` dans `ps aux`
|
||||
|
||||
**Solution** :
|
||||
```bash
|
||||
docker restart mcpo
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## n8n - Automatisation
|
||||
|
||||
### Rôle
|
||||
|
||||
n8n permet de créer des workflows d'automatisation déclenchés par Effi ou des événements externes.
|
||||
|
||||
### Configuration
|
||||
|
||||
**Variables d'environnement (dans `.env`) :**
|
||||
|
||||
```bash
|
||||
N8N_USER=master
|
||||
N8N_PASSWORD=mot_de_passe_securise
|
||||
```
|
||||
|
||||
### Accès
|
||||
|
||||
- URL : `http://192.168.1.27:5678`
|
||||
- Authentification : Basic Auth
|
||||
|
||||
### Cas d'usage
|
||||
|
||||
#### Exemple 1 : Webhook depuis Effi
|
||||
|
||||
1. Créer un workflow dans n8n avec un nœud **Webhook**
|
||||
2. Configurer l'URL du webhook dans OpenWebUI
|
||||
3. Effi peut déclencher des actions via ce webhook
|
||||
|
||||
#### Exemple 2 : Intégration Home Assistant (futur)
|
||||
|
||||
```
|
||||
[Commande vocale Effi]
|
||||
→ OpenWebUI
|
||||
→ n8n (webhook)
|
||||
→ API Home Assistant
|
||||
→ Action domotique
|
||||
```
|
||||
|
||||
### Sauvegarde des workflows
|
||||
|
||||
Les workflows sont stockés dans `~/effi/n8n-data/`
|
||||
|
||||
---
|
||||
|
||||
## CouchDB - Obsidian LiveSync
|
||||
|
||||
### Rôle
|
||||
|
||||
CouchDB sert de backend de synchronisation pour Obsidian LiveSync, permettant d'accéder aux notes depuis plusieurs appareils.
|
||||
|
||||
### Initialisation (premier démarrage)
|
||||
|
||||
```bash
|
||||
# Créer les bases système
|
||||
curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/_users
|
||||
curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/_replicator
|
||||
|
||||
# Créer la base pour Obsidian
|
||||
curl -X PUT http://master:MOT_DE_PASSE@192.168.1.27:5984/obsidian-livesync
|
||||
```
|
||||
|
||||
### Configuration Obsidian
|
||||
|
||||
Dans Obsidian (desktop ou mobile) :
|
||||
|
||||
1. Installer le plugin **Self-hosted LiveSync**
|
||||
2. Configuration :
|
||||
- **URL** : `http://192.168.1.27:5984`
|
||||
- **Database** : `obsidian-livesync`
|
||||
- **Username** : `master`
|
||||
- **Password** : [mot de passe CouchDB]
|
||||
3. Activer la synchronisation
|
||||
|
||||
### Accès
|
||||
|
||||
- URL : `http://192.168.1.27:5984`
|
||||
- Interface Fauxton : `http://192.168.1.27:5984/_utils`
|
||||
|
||||
---
|
||||
|
||||
## Pipelines - Middleware mem0
|
||||
|
||||
### Rôle
|
||||
|
||||
Le service pipelines est un middleware pour OpenWebUI permettant d'utiliser des pipelines personnalisés, notamment mem0 pour la mémoire avancée.
|
||||
|
||||
### Accès
|
||||
|
||||
- URL : `http://192.168.1.27:9099`
|
||||
|
||||
---
|
||||
|
||||
## Intégrations futures
|
||||
|
||||
### Home Assistant
|
||||
|
||||
Voir le document dans les notes d'archive pour les idées d'intégration complète avec Home Assistant.
|
||||
|
||||
### Nextcloud
|
||||
|
||||
Intégration possible pour :
|
||||
- Sauvegarde automatique des conversations
|
||||
- Accès aux fichiers pour le RAG
|
||||
- Synchronisation des tâches
|
||||
Reference in New Issue
Block a user