5 changed files with 269 additions and 39 deletions
@ -0,0 +1,53 @@ |
|||||||
|
# Reflow Oven ESP8266 |
||||||
|
|
||||||
|
Ce projet est un contrôleur de four de refusion basé sur ESP8266, avec interface web et contrôle PID. |
||||||
|
|
||||||
|
## Fonctionnalités |
||||||
|
- Contrôle manuel et automatique du four |
||||||
|
- Interface web dynamique (température, consigne, puissance SSR) |
||||||
|
- Configuration des profils de chauffe (Preheat, Soak, Reflow) |
||||||
|
- Visualisation en temps réel via WebSocket |
||||||
|
- Stockage des paramètres dans `conf.json` |
||||||
|
- Configuration WiFi client |
||||||
|
- Mise à jour des paramètres PID (Kp, Ki, Kd) et WiFi via la page de configuration |
||||||
|
|
||||||
|
## Structure du projet |
||||||
|
``` |
||||||
|
├── data/ |
||||||
|
│ ├── index.html # Interface principale |
||||||
|
│ ├── app.js # Logique client web |
||||||
|
│ ├── style.css # Styles |
||||||
|
│ ├── conf.html # Page de configuration |
||||||
|
│ ├── conf.json # Paramètres persistants |
||||||
|
├── src/ |
||||||
|
│ └── main.cpp # Firmware ESP8266 |
||||||
|
├── lib/ # Librairies PID et MAX6675 |
||||||
|
├── platformio.ini # Configuration PlatformIO |
||||||
|
``` |
||||||
|
|
||||||
|
## Démarrage |
||||||
|
1. Flasher le firmware avec PlatformIO |
||||||
|
2. Uploader le système de fichiers (dossier `data/`) |
||||||
|
3. Connecter l'ESP8266 au WiFi : |
||||||
|
- Par défaut, le module tente de se connecter au réseau défini dans `conf.json` (modifiable via la page de configuration). |
||||||
|
- Si la connexion échoue ou si SSID/mot de passe sont vides, le module bascule automatiquement en mode Point d'Accès (AP) avec SSID `ReflowOven` et mot de passe `12345678`. |
||||||
|
- L'IP par défaut en mode AP est `192.168.4.1`. |
||||||
|
4. Accéder à l'interface web via l'adresse IP affichée dans le terminal (WiFi ou AP). |
||||||
|
|
||||||
|
## Utilisation |
||||||
|
- **Chauffe manuelle** : Choisir la consigne avec le slider, valider, puis ajuster en temps réel |
||||||
|
- **Chauffe automatique** : Définir les paramètres du profil, valider |
||||||
|
- **Configuration** : Modifier SSID, mot de passe, PID, profils via `conf.html` |
||||||
|
|
||||||
|
## Dépendances |
||||||
|
- [ArduinoJson](https://arduinojson.org/) |
||||||
|
- [ESPAsyncWebServer](https://github.com/me-no-dev/ESPAsyncWebServer) |
||||||
|
- [PID_v1](https://playground.arduino.cc/Code/PIDLibrary/) |
||||||
|
- [MAX6675](https://github.com/adafruit/MAX6675-library) |
||||||
|
|
||||||
|
## Auteurs |
||||||
|
- Christophe (utilisateur) |
||||||
|
- GitHub Copilot (assistance IA) |
||||||
|
|
||||||
|
## Licence |
||||||
|
Ce projet est open source, licence MIT. |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
document.addEventListener('DOMContentLoaded', () => { |
||||||
|
// Charger les valeurs actuelles
|
||||||
|
fetch('conf.json') |
||||||
|
.then(r => r.json()) |
||||||
|
.then(conf => { |
||||||
|
for (const key in conf) { |
||||||
|
const el = document.getElementById(key.toLowerCase()); |
||||||
|
if (el) el.value = conf[key]; |
||||||
|
} |
||||||
|
}); |
||||||
|
|
||||||
|
// Sauvegarder à l'appui sur VALIDER
|
||||||
|
document.getElementById('validate').onclick = function() { |
||||||
|
const data = {}; |
||||||
|
['ssid','password','kp','ki','kd'].forEach(key => { |
||||||
|
const el = document.getElementById(key); |
||||||
|
if (el) data[key] = el.value; |
||||||
|
}); |
||||||
|
fetch('/save_config', { |
||||||
|
method: 'POST', |
||||||
|
headers: {'Content-Type': 'application/json'}, |
||||||
|
body: JSON.stringify(data) |
||||||
|
}).then(r => { |
||||||
|
if (r.ok) alert('Configuration enregistrée !'); |
||||||
|
else alert('Erreur lors de l\'enregistrement'); |
||||||
|
}); |
||||||
|
}; |
||||||
|
}); |
||||||
|
fetch('conf.json') |
||||||
|
.then(r => r.json()) |
||||||
|
.then(conf => { |
||||||
|
for (const key in conf) { |
||||||
|
const el = document.getElementById(key); |
||||||
|
if (el) el.value = conf[key]; |
||||||
|
} |
||||||
|
}); |
||||||
Loading…
Reference in new issue