wilsonmaker
@wilson-m · Membre depuis juillet 2025
Maker · home automation · Nottingham · new to IoT
- Sujets
- 14
- Réponses
- 71
- Points
- 0
Toutes mes réponses sur les forums
Traduit de English par IA ·
+1, je le voudrais aussi pour le chauffage de ma serre avec une prévision météo.
+1, would like this for my greenhouse heater with a weather forecast too.
Traduit de English par IA ·
Je suis moi aussi débutant, mais j’ai eu exactement ce problème avec le PC de ma station météo l’hiver dernier, et la solution a été de ne plus me soucier du numéro. Trouve plutôt le port d’après ce qui y est branché. pyserial peut lister les ports avec leurs identifiants USB et leur numéro de série :
from serial.tools import list_ports
def find_arduino():
for p in list_ports.comports():
print(p.device, p.vid, p.pid, p.serial_number, p.description)
if p.vid == 0x2341 and p.serial_number == "85736323838351F0B0E1":
return p.device
return None
port = find_arduino()
ser = serial.Serial(port, 9600, timeout=2)
Lance-le une fois pour afficher les tiennes et copie le numéro de série dedans. 0x2341 est l’identifiant de fabricant des cartes Arduino d’origine. Si la tienne est un clone avec une puce CH340 (vid 0x1A86), attention : ceux-ci n’ont généralement pas de numéro de série, donc avec deux clones tu ne peux pas les distinguer et tu devras plutôt te baser sur p.location (la prise USB).Enveloppe aussi la boucle de lecture pour qu’elle recherche à nouveau le port après une erreur au lieu de s’arrêter, comme ça les gens peuvent rebrancher quand ils veulent.
I’m a beginner too but I had exactly this with my weather station PC last winter, and the fix was to stop caring about the number. Find the port by what’s plugged into it instead. pyserial can list ports with their USB ids and serial number:
from serial.tools import list_ports
def find_arduino():
for p in list_ports.comports():
print(p.device, p.vid, p.pid, p.serial_number, p.description)
if p.vid == 0x2341 and p.serial_number == "85736323838351F0B0E1":
return p.device
return None
port = find_arduino()
ser = serial.Serial(port, 9600, timeout=2)
Run it once to print yours and copy the serial number in. 0x2341 is the vendor id of genuine Arduino boards. If yours is a clone with a CH340 chip (vid 0x1A86), careful: those usually have no serial number, so with two clones you can’t tell them apart and you’d match on p.location (the USB socket) instead.
Also wrap the read loop so it looks for the port again after an error instead of dying, then people can replug whenever they like.
Traduit de English par IA ·
Oui, j’ai fait la même erreur sur le papier l’hiver dernier chez moi. Il te faut un contact sec, donc soit un module relais sans tension (le type Sonoff RE5V1C, ou n’importe quel ESP8266 avec un module relais 5 V câblé en COM/NO) aux bornes du thermostat, en parallèle avec l’ancien thermostat pour qu’il fonctionne encore si ta carte tombe en panne.La partie carte a été plus simple que je ne le pensais une fois que j’ai trouvé le catalogue. Ouvre le profil de l’appareil, l’onglet Commands, puis Add command :
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Seules les commandes de niveau Basic de cette liste apparaissent dans les paramètres du Switch. Ensuite, dans Switch : Run a command, choisis l’appareil et heat.set, avec la valeur « The control’s value ». Lie Current state à une clé de télémétrie que la carte envoie : j’envoie heat_on en 0/1 avec chaque mesure, pour que le switch affiche ce que le relais fait réellement et non ce que tu as cliqué. Pour une lumière ou un chauffage, tu peux désactiver « Ask before running ». Réponds avec le même id, sinon la carte reste bloquée sur « Sent; waiting for the device » :
// in callback, topic "v1/rpc/req/17"
String id = String(topic).substring(11);
digitalWrite(RELAY, on ? HIGH : LOW);
mqtt.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
Page que j’ai utilisée : Control cards.
Yep did the same mistake on paper last winter at home. You want a dry contact, so either a relay module that’s volt-free (the Sonoff RE5V1C style board, or any ESP8266 plus a 5 V relay module wired COM/NO) across the thermostat terminals, in parallel with the old thermostat so it still works if your board dies.
The board side was easier than I thought once I found the catalogue. Open the device’s profile, Commands tab, Add command:
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Only Basic tier commands from that list show up in the Switch settings. Then in the Switch: Run a command, pick the device and heat.set, value from « The control’s value ». Bind Current state to a telemetry key the board reports, I send heat_on as 0/1 with every reading so the switch shows what the relay is really doing, not what you clicked. For a light or heating you can turn « Ask before running » off. Reply on the same id or the card sits on « Sent; waiting for the device »:
// in callback, topic "v1/rpc/req/17"
String id = String(topic).substring(11);
digitalWrite(RELAY, on ? HIGH : LOW);
mqtt.publish(("v1/rpc/res/" + id).c_str(), "{"ok":true}");
Page I used: Control cards.
Traduit de English par IA ·
J’ai étudié la question pour la petite boulangerie d’un ami. Je n’ai pas non plus trouvé de page de documentation pour Forge, donc je ne peux pas vous dire ce qu’il fait pour la qualité ni comment il s’intègre dans un plan.Ce qui fonctionne avec la partie IoT classique : faites envoyer par le contrôleur du capteur (ou un petit automate) l’épaisseur de chaque pièce, ou le min/max/moyenne toutes les 10 s, sous forme de télémétrie, par exemple {"thick_mm": 7.12, "rejects": 3}. Ensuite, une règle d’alarme sur le profil pour les écarts hors tolérance. Il n’existe pas d’opérateur « entre », mais vous pouvez regrouper les conditions avec any :
{ "any": [
{ "key": "thick_mm", "op": "<", "value": 6.0 },
{ "key": "thick_mm", "op": ">", "value": 8.0 }
] }
Pour les comptages par poste, envoyez un compteur croissant rejects_total et représentez-le avec l’agrégat increase par heure. La commande d’éjection elle-même doit être pilotée localement par le contrôleur du capteur ou l’automate, et non depuis le cloud ; un tapis à 0,4 m/s ne peut pas attendre un aller-retour.La référence des conditions se trouve ici : Alarm conditions reference.
I looked into this for a friend’s small bakery. I couldn’t find a doc page for Forge either, so I can’t tell you what it does for quality or how it gets on a plan.
What works with the normal IoT part: have the sensor’s controller (or a small PLC) send the thickness of each piece, or the min/max/average per 10 s, as telemetry, e.g. {"thick_mm": 7.12, "rejects": 3}. Then an alarm rule on the profile for out of tolerance. There’s no « between » operator, but you can group conditions with any:
{ "any": [
{ "key": "thick_mm", "op": "<", "value": 6.0 },
{ "key": "thick_mm", "op": ">", "value": 8.0 }
] }
For counts per shift, send a growing rejects_total counter and chart it with the increase aggregate per hour. The reject gate itself must be driven locally by the sensor controller or PLC, not from the cloud; a belt at 0.4 m/s can’t wait on a round trip.
The conditions reference is Alarm conditions reference.
Traduit de English par IA ·
DNSServer + WiFiManager, et le portail s’affiche maintenant sur les deux téléphones. Le provisionnement a fonctionné du premier coup avec des noms créés à l’avance ; j’ai d’abord relevé les 30 ID de puce via le port série dans un fichier CSV. J’avais oublié d’enregistrer le token dans la NVS lors de mon premier build, donc au redémarrage il a tenté de provisionner à nouveau et a obtenu device_exists. Corrigé, et les autocollants sont imprimés.
DNSServer + WiFiManager and the portal pops up on both phones now. Provisioning worked first time with pre-created names; I read the 30 chip IDs over serial into a CSV first. Forgot to save the token to NVS on my first build, so on reboot it tried to provision again and got device_exists. Fixed, and stickers are printed.
Traduit de English par IA ·
Les cartes rev 2 sont arrivées avec deux MMBT3904 et le 1 uF sur EN. Les téléversements sont désormais automatiques et l’ouverture du moniteur ne réinitialise plus la carte. J’avais bricolé la rev 1 avec des transistors sur des fils, moche mais ça marche. Merci à Eric, et à Aoife qui l’a repéré tout de suite.
rev 2 boards arrived with two MMBT3904 and the 1 uF on EN. Uploads are automatic now and opening the monitor no longer resets it. I bodged rev 1 with transistors on wires, ugly but works. Thanks Eric, and Aoife for spotting it straight away.
Traduit de English par IA ·
C’était bien ça. Le réseau invité distribue correctement le routeur comme DNS, mais mon sketch utilisait une adresse IP NTP codée en dur, bloquée par un pare-feu. L’horloge n’a donc jamais été réglée et TLS a échoué. Je l’ai remplacée par pool.ntp.org et le capteur est revenu. Les cinq sont maintenant sur le réseau invité, l’isolation désactivée, et le portable du travail ne peut pas les voir.Je n’ai pas touché à la redirection de ports, Kevin, merci quand même.
That was it. Guest network hands out the router as DNS fine, but my sketch was using a hardcoded NTP IP that a firewall blocked, so the clock never set and TLS failed. Switched it to pool.ntp.org and the sensor came back. All five are on the guest network now, isolation off, and the work laptop can’t see them.
Didn’t touch the port forwarding, Kevin, thanks anyway.
Traduit de English par IA ·
Cela pourrait-il venir de la pile bouton ? Chez moi, les mesures étaient bizarres quand la batterie était froide.
Could it be the coin cell? Mine read weird when the battery was cold.
Traduit de English par IA ·
Dommage pour MJPEG, mais ça se comprend, merci Aoife.
Shame about MJPEG but makes sense, thanks Aoife.
Traduit de English par IA ·
J’ai acheté une carte RTC HAT bon marché pour cette raison précise, une DS3231, pour quelques livres. Ainsi l’heure reste juste même hors ligne.
I bought a cheap RTC HAT for this exact reason, DS3231, a couple of quid. Then the clock is right even offline.
Traduit de English par IA ·
Peux-tu le voir dans la vue en direct caméra de Hermetry une fois flashé ? Je me demandais justement ce qu’il en est de ces modules.
Can you watch it in Hermetry’s camera live view once it’s flashed? Been wondering about these.
Traduit de English par IA ·
+1 pour la demande, j’aimerais beaucoup un simple comptage de personnes pour la caméra de mon abri de jardin.
+1 for the request, would love a simple person count for my garden shed camera.
Traduit de English par IA ·
Pourriez-vous simplement agrandir les contacts ? Par exemple, de larges bandes de cuivre sur la station d’accueil.
Could you just make the contacts bigger? Like wide copper strips on the dock.
Traduit de English par IA ·
D’après ce que je vois, seulement le commutateur d’isolation, plus une limitation de bande passante. Pas de règles véritables.
Only the isolation switch as far as I can see, plus a bandwidth limit. No proper rules.
Traduit de English par IA ·
peut-être que le WiFi consomme trop de courant et que le 3.3 V s’effondre ? J’ai eu des brownouts sur le mien
maybe the WiFi pulls too much current and the 3.3 V sags? I had brownouts on mine

