Compare commits
1 Commits
main
..
0a2afbaa24
| Author | SHA1 | Date | |
|---|---|---|---|
|
0a2afbaa24
|
@@ -1,77 +0,0 @@
|
|||||||
========================================================
|
|
||||||
M1730 ANALOG PANEL METER CONTROLLER — INSTRUCTION CARD
|
|
||||||
========================================================
|
|
||||||
(Meters and current-limiting resistors are already installed.)
|
|
||||||
|
|
||||||
FIRST-TIME WI-FI SETUP
|
|
||||||
- Power on the device (USB or 5V supply).
|
|
||||||
- On your phone/laptop, join the Wi-Fi network named "M1730".
|
|
||||||
- A setup page opens automatically (captive portal).
|
|
||||||
- Pick your Wi-Fi network, enter its password.
|
|
||||||
- Optionally set a Device hostname (default: m1730).
|
|
||||||
- Tap Save. The device joins your network and restarts.
|
|
||||||
|
|
||||||
OPENING THE CONFIG PAGE
|
|
||||||
- Browse to http://m1730.local (or your chosen hostname).
|
|
||||||
- If .local doesn't resolve, use the IP address shown on the
|
|
||||||
serial monitor at boot: http://<IP>
|
|
||||||
- The Info panel at the top shows the current hostname and IP.
|
|
||||||
|
|
||||||
CONFIGURING A METER
|
|
||||||
- Use the "Meters" dropdown to set how many meters (1-10).
|
|
||||||
- For each meter (shown as tabs when more than one):
|
|
||||||
* Pin - GPIO pin the meter is wired to (already set)
|
|
||||||
* Name - label shown in the UI and Home Assistant
|
|
||||||
* Unit - optional (e.g. W, A, °C)
|
|
||||||
* Min/Max - the meter's real-world range (e.g. 0-50 A)
|
|
||||||
* Max Duty - calibration for full-scale deflection (%)
|
|
||||||
* Output - live slider, moves the needle right away
|
|
||||||
- Tap Save to store all settings (survives reboots).
|
|
||||||
|
|
||||||
CALIBRATING FULL SCALE (Max Duty)
|
|
||||||
- Drag the Output slider to 100%.
|
|
||||||
- Slowly raise "Max Duty" until the needle just reaches the
|
|
||||||
end of the scale. Don't overshoot. Tap Save.
|
|
||||||
|
|
||||||
MOVING THE NEEDLE
|
|
||||||
- Web UI: drag a meter's Output slider (0-100%).
|
|
||||||
- Values sent over MQTT/Home Assistant use the real Min-Max
|
|
||||||
range (e.g. send 25 to a 0-50 meter = half scale).
|
|
||||||
|
|
||||||
HTTP CONTROL (DIRECT URL)
|
|
||||||
- Move a needle from a browser or script with a GET request:
|
|
||||||
http://m1730.local/set?i=<meter>&v=<value>
|
|
||||||
* i = meter index, starting at 0 (first meter = 0)
|
|
||||||
* v = value 0-100 (percent of full scale)
|
|
||||||
- Example: http://m1730.local/set?i=0&v=75 -> meter 0 to 75%.
|
|
||||||
- Applies instantly, saves it, and publishes to MQTT.
|
|
||||||
- Returns 200 OK on success, 400 on bad input.
|
|
||||||
|
|
||||||
HOME ASSISTANT (MQTT)
|
|
||||||
- Open the MQTT section on the config page.
|
|
||||||
- Enable, then enter Broker host, Port (1883), User, Pass,
|
|
||||||
and Prefix (default: m1730). Tap Save.
|
|
||||||
- Each meter shows up automatically in Home Assistant as a
|
|
||||||
Number entity, grouped under one device (the hostname).
|
|
||||||
|
|
||||||
SECURITY (OPTIONAL PASSWORD)
|
|
||||||
- In the Security section, turn on "Require password" and set
|
|
||||||
a password. Username is always: admin
|
|
||||||
- Leave the password field blank to keep the existing one.
|
|
||||||
|
|
||||||
RESTART
|
|
||||||
- "Reset Device" button = simple reboot (keeps all settings).
|
|
||||||
|
|
||||||
FACTORY RESET (if locked out or misconfigured)
|
|
||||||
- Power-cycle (or press EN) 5 times quickly, within a few
|
|
||||||
seconds each, before boot completes.
|
|
||||||
* 5x = clears settings BUT keeps meter pins + calibration
|
|
||||||
* 10x = clears everything, including saved Wi-Fi
|
|
||||||
- All meters sweep 0 -> full -> 0 to confirm the reset.
|
|
||||||
- After a 10x reset, redo "First-time Wi-Fi setup" above.
|
|
||||||
|
|
||||||
TIPS
|
|
||||||
- Settings are saved on the device and survive power loss.
|
|
||||||
- If the meter reads zero unexpectedly, check the Pin number
|
|
||||||
and that Max Duty is greater than 0.
|
|
||||||
========================================================
|
|
||||||
-84
@@ -1,84 +0,0 @@
|
|||||||
========================================================
|
|
||||||
M1730 ANALOG-ZEIGERINSTRUMENT-STEUERUNG — KURZANLEITUNG
|
|
||||||
========================================================
|
|
||||||
(Messwerke und Vorwiderstände sind bereits eingebaut.)
|
|
||||||
|
|
||||||
ERSTE WLAN-EINRICHTUNG
|
|
||||||
- Gerät einschalten (USB oder 5-V-Netzteil).
|
|
||||||
- Am Handy/Laptop das WLAN mit dem Namen "M1730" auswählen.
|
|
||||||
- Die Einrichtungsseite öffnet sich automatisch (Captive Portal).
|
|
||||||
- Eigenes WLAN auswählen und dessen Passwort eingeben.
|
|
||||||
- Optional einen Gerätenamen (Hostname) festlegen (Standard: m1730).
|
|
||||||
- Auf Speichern tippen. Das Gerät verbindet sich und startet neu.
|
|
||||||
|
|
||||||
KONFIGURATIONSSEITE ÖFFNEN
|
|
||||||
- Im Browser aufrufen: http://m1730.local (oder den gewählten
|
|
||||||
Hostnamen).
|
|
||||||
- Falls .local nicht auflöst, die beim Start im seriellen Monitor
|
|
||||||
angezeigte IP-Adresse verwenden: http://<IP>
|
|
||||||
- Das Info-Feld oben zeigt aktuellen Hostnamen und IP-Adresse.
|
|
||||||
|
|
||||||
MESSWERK KONFIGURIEREN
|
|
||||||
- Über das Auswahlfeld "Meters" die Anzahl der Messwerke
|
|
||||||
festlegen (1-10).
|
|
||||||
- Für jedes Messwerk (als Reiter dargestellt, wenn mehr als eins):
|
|
||||||
* Pin - GPIO-Pin, an dem das Messwerk hängt (bereits gesetzt)
|
|
||||||
* Name - Bezeichnung in der Oberfläche und in Home Assistant
|
|
||||||
* Unit - optional (z. B. W, A, °C)
|
|
||||||
* Min/Max - realer Messbereich (z. B. 0-50 A)
|
|
||||||
* Max Duty - Kalibrierung für den Vollausschlag (%)
|
|
||||||
* Output - Live-Schieberegler, bewegt den Zeiger sofort
|
|
||||||
- Auf Speichern tippen, um alle Einstellungen zu sichern
|
|
||||||
(bleiben nach Neustart erhalten).
|
|
||||||
|
|
||||||
VOLLAUSSCHLAG KALIBRIEREN (Max Duty)
|
|
||||||
- Den Output-Schieberegler auf 100 % ziehen.
|
|
||||||
- "Max Duty" langsam erhöhen, bis der Zeiger gerade das Ende
|
|
||||||
der Skala erreicht. Nicht überschreiten. Speichern.
|
|
||||||
|
|
||||||
ZEIGER BEWEGEN
|
|
||||||
- Weboberfläche: den Output-Schieberegler ziehen (0-100 %).
|
|
||||||
- Über MQTT/Home Assistant gesendete Werte verwenden den realen
|
|
||||||
Min-Max-Bereich (z. B. 25 an ein 0-50-Messwerk = halber
|
|
||||||
Ausschlag).
|
|
||||||
|
|
||||||
HTTP-STEUERUNG (DIREKTE URL)
|
|
||||||
- Einen Zeiger per GET-Anfrage aus Browser oder Skript bewegen:
|
|
||||||
http://m1730.local/set?i=<messwerk>&v=<wert>
|
|
||||||
* i = Index des Messwerks, beginnend bei 0 (erstes = 0)
|
|
||||||
* v = Wert 0-100 (Prozent des Vollausschlags)
|
|
||||||
- Beispiel: http://m1730.local/set?i=0&v=75 -> Messwerk 0 auf 75 %.
|
|
||||||
- Wirkt sofort, wird gespeichert und an MQTT veröffentlicht.
|
|
||||||
- Antwort: 200 OK bei Erfolg, 400 bei ungültiger Eingabe.
|
|
||||||
|
|
||||||
HOME ASSISTANT (MQTT)
|
|
||||||
- Auf der Konfigurationsseite den Abschnitt MQTT öffnen.
|
|
||||||
- Aktivieren, dann Broker-Host, Port (1883), Benutzer, Passwort
|
|
||||||
und Präfix (Standard: m1730) eingeben. Speichern.
|
|
||||||
- Jedes Messwerk erscheint automatisch in Home Assistant als
|
|
||||||
Number-Entität, gruppiert unter einem Gerät (dem Hostnamen).
|
|
||||||
|
|
||||||
SICHERHEIT (OPTIONALES PASSWORT)
|
|
||||||
- Im Abschnitt Security "Require password" aktivieren und ein
|
|
||||||
Passwort setzen. Der Benutzername ist immer: admin
|
|
||||||
- Das Passwortfeld leer lassen, um das bestehende beizubehalten.
|
|
||||||
|
|
||||||
NEUSTART
|
|
||||||
- Schaltfläche "Reset Device" = einfacher Neustart (alle
|
|
||||||
Einstellungen bleiben erhalten).
|
|
||||||
|
|
||||||
WERKSRESET (bei Aussperrung oder Fehlkonfiguration)
|
|
||||||
- Gerät 5-mal schnell aus- und einschalten (oder EN drücken),
|
|
||||||
jeweils innerhalb weniger Sekunden, bevor der Start abgeschlossen ist.
|
|
||||||
* 5x = löscht Einstellungen, BEHÄLT aber Pins + Kalibrierung
|
|
||||||
* 10x = löscht alles, einschließlich gespeichertem WLAN
|
|
||||||
- Alle Messwerke fahren 0 -> Voll -> 0 zur Bestätigung des Resets.
|
|
||||||
- Nach einem 10x-Reset die "ERSTE WLAN-EINRICHTUNG" oben
|
|
||||||
erneut durchführen.
|
|
||||||
|
|
||||||
HINWEISE
|
|
||||||
- Einstellungen werden im Gerät gespeichert und überstehen
|
|
||||||
einen Stromausfall.
|
|
||||||
- Zeigt ein Messwerk unerwartet null an, den Pin prüfen und
|
|
||||||
sicherstellen, dass Max Duty größer als 0 ist.
|
|
||||||
========================================================
|
|
||||||
-90
@@ -1,90 +0,0 @@
|
|||||||
========================================================
|
|
||||||
CONTRÔLEUR DE GALVANOMÈTRE ANALOGIQUE M1730 — GUIDE RAPIDE
|
|
||||||
========================================================
|
|
||||||
(Les galvanomètres et résistances série sont déjà installés.)
|
|
||||||
|
|
||||||
PREMIÈRE CONFIGURATION WI-FI
|
|
||||||
- Mettre l'appareil sous tension (USB ou alimentation 5 V).
|
|
||||||
- Sur votre téléphone/ordinateur, rejoindre le réseau Wi-Fi
|
|
||||||
nommé « M1730 ».
|
|
||||||
- La page de configuration s'ouvre automatiquement (portail captif).
|
|
||||||
- Choisir votre réseau Wi-Fi et saisir son mot de passe.
|
|
||||||
- Éventuellement définir un nom d'hôte (Hostname) (défaut : m1730).
|
|
||||||
- Appuyer sur Save. L'appareil rejoint le réseau et redémarre.
|
|
||||||
|
|
||||||
OUVRIR LA PAGE DE CONFIGURATION
|
|
||||||
- Dans le navigateur, aller à : http://m1730.local
|
|
||||||
(ou le nom d'hôte choisi).
|
|
||||||
- Si .local ne fonctionne pas, utiliser l'adresse IP affichée
|
|
||||||
au démarrage dans le moniteur série : http://<IP>
|
|
||||||
- Le panneau Info en haut indique le nom d'hôte et l'adresse IP.
|
|
||||||
|
|
||||||
CONFIGURER UN GALVANOMÈTRE
|
|
||||||
- Utiliser le menu déroulant « Meters » pour définir le nombre
|
|
||||||
de galvanomètres (1-10).
|
|
||||||
- Pour chaque galvanomètre (affiché en onglets s'il y en a
|
|
||||||
plusieurs) :
|
|
||||||
* Pin - broche GPIO câblée au galvanomètre (déjà définie)
|
|
||||||
* Name - libellé affiché dans l'interface et Home Assistant
|
|
||||||
* Unit - facultatif (p. ex. W, A, °C)
|
|
||||||
* Min/Max - plage réelle de mesure (p. ex. 0-50 A)
|
|
||||||
* Max Duty - calibrage pour la déviation pleine échelle (%)
|
|
||||||
* Output - curseur en direct, déplace l'aiguille aussitôt
|
|
||||||
- Appuyer sur Save pour enregistrer tous les réglages
|
|
||||||
(conservés après redémarrage).
|
|
||||||
|
|
||||||
CALIBRER LA PLEINE ÉCHELLE (Max Duty)
|
|
||||||
- Amener le curseur Output à 100 %.
|
|
||||||
- Augmenter lentement « Max Duty » jusqu'à ce que l'aiguille
|
|
||||||
atteigne juste le bout de l'échelle. Ne pas dépasser. Save.
|
|
||||||
|
|
||||||
DÉPLACER L'AIGUILLE
|
|
||||||
- Interface web : faire glisser le curseur Output (0-100 %).
|
|
||||||
- Les valeurs envoyées via MQTT/Home Assistant utilisent la
|
|
||||||
plage réelle Min-Max (p. ex. envoyer 25 à un galvanomètre
|
|
||||||
0-50 = mi-échelle).
|
|
||||||
|
|
||||||
CONTRÔLE HTTP (URL DIRECTE)
|
|
||||||
- Déplacer une aiguille via une requête GET depuis un
|
|
||||||
navigateur ou un script :
|
|
||||||
http://m1730.local/set?i=<galvanometre>&v=<valeur>
|
|
||||||
* i = index du galvanomètre, à partir de 0 (le premier = 0)
|
|
||||||
* v = valeur 0-100 (pourcentage de la pleine échelle)
|
|
||||||
- Exemple : http://m1730.local/set?i=0&v=75 -> galvanomètre 0 à 75 %.
|
|
||||||
- Effet immédiat, enregistré et publié sur MQTT.
|
|
||||||
- Réponse : 200 OK en cas de succès, 400 si l'entrée est invalide.
|
|
||||||
|
|
||||||
HOME ASSISTANT (MQTT)
|
|
||||||
- Ouvrir la section MQTT sur la page de configuration.
|
|
||||||
- Activer, puis saisir l'hôte du Broker, le Port (1883),
|
|
||||||
l'utilisateur, le mot de passe et le préfixe (défaut : m1730).
|
|
||||||
Save.
|
|
||||||
- Chaque galvanomètre apparaît automatiquement dans Home
|
|
||||||
Assistant comme entité Number, regroupée sous un seul
|
|
||||||
appareil (le nom d'hôte).
|
|
||||||
|
|
||||||
SÉCURITÉ (MOT DE PASSE FACULTATIF)
|
|
||||||
- Dans la section Security, activer « Require password » et
|
|
||||||
définir un mot de passe. Le nom d'utilisateur est toujours : admin
|
|
||||||
- Laisser le champ mot de passe vide pour conserver l'actuel.
|
|
||||||
|
|
||||||
REDÉMARRAGE
|
|
||||||
- Bouton « Reset Device » = simple redémarrage (tous les
|
|
||||||
réglages sont conservés).
|
|
||||||
|
|
||||||
RÉINITIALISATION D'USINE (si verrouillé ou mal configuré)
|
|
||||||
- Éteindre/rallumer (ou appuyer sur EN) 5 fois rapidement,
|
|
||||||
à quelques secondes d'intervalle, avant la fin du démarrage.
|
|
||||||
* 5x = efface les réglages MAIS conserve broches + calibrage
|
|
||||||
* 10x = efface tout, y compris le Wi-Fi enregistré
|
|
||||||
- Tous les galvanomètres balaient 0 -> plein -> 0 pour
|
|
||||||
confirmer la réinitialisation.
|
|
||||||
- Après une réinitialisation 10x, refaire la « PREMIÈRE
|
|
||||||
CONFIGURATION WI-FI » ci-dessus.
|
|
||||||
|
|
||||||
CONSEILS
|
|
||||||
- Les réglages sont enregistrés dans l'appareil et survivent
|
|
||||||
à une coupure de courant.
|
|
||||||
- Si un galvanomètre indique zéro de façon inattendue, vérifier
|
|
||||||
le numéro de Pin et que Max Duty est supérieur à 0.
|
|
||||||
========================================================
|
|
||||||
@@ -25,21 +25,33 @@ lib_deps =
|
|||||||
platform = ${common.platform_esp32}
|
platform = ${common.platform_esp32}
|
||||||
board = esp32-s3-devkitc-1
|
board = esp32-s3-devkitc-1
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
; Arduino-ESP32 3.x images overflow the default dual-OTA app slot; this
|
||||||
|
; firmware has no OTA, so use a single large app partition.
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
|
||||||
[env:esp32dev]
|
[env:esp32dev]
|
||||||
platform = ${common.platform_esp32}
|
platform = ${common.platform_esp32}
|
||||||
board = esp32dev
|
board = esp32dev
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
; Arduino-ESP32 3.x images overflow the default dual-OTA app slot; this
|
||||||
|
; firmware has no OTA, so use a single large app partition.
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
|
||||||
[env:esp32-C3-devkitm-1]
|
[env:esp32-C3-devkitm-1]
|
||||||
platform = ${common.platform_esp32}
|
platform = ${common.platform_esp32}
|
||||||
board = esp32-c3-devkitm-1
|
board = esp32-c3-devkitm-1
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
; Arduino-ESP32 3.x images overflow the default dual-OTA app slot; this
|
||||||
|
; firmware has no OTA, so use a single large app partition.
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
|
||||||
[env:esp32-c6-devkitc-1]
|
[env:esp32-c6-devkitc-1]
|
||||||
platform = ${common.platform_esp32}
|
platform = ${common.platform_esp32}
|
||||||
board = esp32-c6-devkitc-1
|
board = esp32-c6-devkitc-1
|
||||||
board_build.filesystem = littlefs
|
board_build.filesystem = littlefs
|
||||||
|
; Arduino-ESP32 3.x images overflow the default dual-OTA app slot; this
|
||||||
|
; firmware has no OTA, so use a single large app partition.
|
||||||
|
board_build.partitions = huge_app.csv
|
||||||
|
|
||||||
[env:rpipico2w]
|
[env:rpipico2w]
|
||||||
; RP2350 support requires the maxgerhardt fork of the raspberrypi platform
|
; RP2350 support requires the maxgerhardt fork of the raspberrypi platform
|
||||||
|
|||||||
@@ -381,15 +381,6 @@ static void startMDNS() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void applyWifiTxPower() {
|
|
||||||
#if defined(CONFIG_IDF_TARGET_ESP32C3)
|
|
||||||
WiFi.setTxPower(WIFI_POWER_MINUS_1dBm);
|
|
||||||
Serial.println("[WIFI] ESP32-C3 detected, lowering TX power for stability");
|
|
||||||
#else
|
|
||||||
Serial.println("[WIFI] using default TX power");
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
// Web helpers
|
// Web helpers
|
||||||
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
||||||
@@ -594,20 +585,6 @@ html += ".slid::before{content:\"\";position:absolute;height:14px;width:14px;lef
|
|||||||
Serial.printf("[HTTP] GET / -> 200 (%u bytes)\n", html.length());
|
Serial.printf("[HTTP] GET / -> 200 (%u bytes)\n", html.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void handleNotFound() {
|
|
||||||
String uri = server.uri();
|
|
||||||
if (uri == "/favicon.ico" || uri == "/favicon.png" || uri == "/robots.txt" ||
|
|
||||||
uri == "/generate_204" || uri == "/hotspot-detect.html" ||
|
|
||||||
uri == "/connecttest.txt" || uri == "/redirect") {
|
|
||||||
server.sendHeader("Location", "/");
|
|
||||||
server.send(302);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Serial.printf("[HTTP] 404 %s\n", uri.c_str());
|
|
||||||
server.send(404, "text/plain", "Not found");
|
|
||||||
}
|
|
||||||
|
|
||||||
static void handleConfig() {
|
static void handleConfig() {
|
||||||
if (!requireAuth()) { Serial.println("[HTTP] POST /config -> 401"); return; }
|
if (!requireAuth()) { Serial.println("[HTTP] POST /config -> 401"); return; }
|
||||||
Serial.println("[HTTP] POST /config");
|
Serial.println("[HTTP] POST /config");
|
||||||
@@ -720,7 +697,6 @@ static void startServer() {
|
|||||||
server.on("/config", HTTP_POST, handleConfig);
|
server.on("/config", HTTP_POST, handleConfig);
|
||||||
server.on("/reset", HTTP_POST, handleReset);
|
server.on("/reset", HTTP_POST, handleReset);
|
||||||
server.on("/set", handleSet);
|
server.on("/set", handleSet);
|
||||||
server.onNotFound(handleNotFound);
|
|
||||||
server.begin();
|
server.begin();
|
||||||
Serial.println("HTTP server started");
|
Serial.println("HTTP server started");
|
||||||
}
|
}
|
||||||
@@ -875,7 +851,6 @@ void setup() {
|
|||||||
delay(3000);
|
delay(3000);
|
||||||
applyFactoryResetIfNeeded(resetCount);
|
applyFactoryResetIfNeeded(resetCount);
|
||||||
|
|
||||||
applyWifiTxPower();
|
|
||||||
Serial.println("[WIFI] starting WiFiManager");
|
Serial.println("[WIFI] starting WiFiManager");
|
||||||
WiFiManager wm;
|
WiFiManager wm;
|
||||||
wm.setTitle("M1730");
|
wm.setTitle("M1730");
|
||||||
|
|||||||
Reference in New Issue
Block a user