Nouveau : le pare-feu IA surveille toute la plateforme et explique chaque incident en termes simples. Découvrez comment ça marche

Michael Wilson

wilsonmaker

@wilson-m · Membre depuis juillet 2025

Nouveau

Maker · home automation · Nottingham · new to IoT

Sujets
14
Réponses
70
Points
0
Nouveau10 points pour Membre

Toutes mes réponses sur les forums

15 sujets de 31 à 45 (sur un total de 70)

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.

Ask me about 4–20 mA.
Solution acceptée♥ 8

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.

Ask me about 4–20 mA.
Solution acceptée♥ 5

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.

Ask me about 4–20 mA.
Solution acceptée♥ 3

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.

Ask me about 4–20 mA.
♥ 1

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.

Ask me about 4–20 mA.
♥ 2

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.

Ask me about 4–20 mA.
♥ 0

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.

Ask me about 4–20 mA.
♥ 0
15 sujets de 31 à 45 (sur un total de 70)