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

Megan Brooks

brooksdata

@megan_b40 · Membre depuis septembre 2025

Nouveau

Data analyst · water and wastewater

Sujets
2
Réponses
45
Points
0
Nouveau10 points pour Membre

Toutes mes réponses sur les forums

15 sujets de 16 à 30 (sur un total de 45)

Same physics as David’s speaker, yes. The RF burst gets rectified by the input stage of the ADC (or any semiconductor junction on the line), and that shows up as a DC offset for the length of the burst. 2G-style bursts at 217 Hz are the worst, but LTE uplink bursts do it too. A cabinet I look after at work had exactly your picture, spikes during uploads only.

What fixed ours, cheapest first:

  • Get the antenna out of the cabinet. A short-cable antenna on the cabinet roof. Inside a steel box the router is shouting at your wiring from 30 cm.
  • Shielded twisted pair for the 4-20 mA run, shield grounded at the controller end only.
  • An RC filter right at the ADC pin, 1 k and 100 nF, plus a 100 pF cap close to the pin for the RF itself. Your level doesn’t change in milliseconds, you can afford it.
  • A clip-on ferrite on the signal pair where it enters the controller.
  • If the router has a setting to lock it to LTE and not fall back to 2G, use it.

After the first two the spikes were gone for us. Old spikes stay in your history, so if anyone set an alarm on that level, check whether they were tripping it. A readings-in-a-row debounce of 2 or 3 on the high-level rule hides any single leftover.

QoS 1 and a lot of patience.
Solution acceptée♥ 9

Traduit de English par IA ·

N’est-ce pas à cela que servent les Custom topics du profil ? Je me souviens d’un paramètre qui accepte n’importe quel topic en dehors de v1/.

QoS 1 and a lot of patience.
♥ 0

Traduit de English par IA ·

Donc la vraie première étape, c’est un jeu de données. Tu as déjà des semaines de relevés dans Hermetry, il te manque juste des étiquettes : les heures d’arrivée et de départ notées par le service d’entretien suffiraient.

QoS 1 and a lot of patience.
♥ 0

Traduit de English par IA ·

C’est exactement le problème, j’ai fait la même chose sur mon premier montage. Les broches I2C sont la broche physique 3 (c’est le BCM GPIO2, SDA) et la broche physique 5 (BCM GPIO3, SCL). Tu as branché SDA sur GPIO3, qui est en réalité SCL, et SCL sur GPIO5, qui correspond à la broche physique 29 et n’a rien à voir avec l’I2C. Le bus n’a donc aucun périphérique qui répond, d’où la grille vide. Les capteurs sont presque certainement en bon état.Place SDA sur la broche physique 3 et SCL sur la broche physique 5 ; tu devrais alors voir 0x77 (ou 0x76, selon le cavalier SDO) pour le BME280 et 0x10 pour le VEML7700. Le Pi dispose déjà de résistances de rappel (pull-up) de 1,8 kΩ sur ces deux broches, et les breakouts en ajoutent les leurs, donc n’en rajoute pas.La lecture et l’envoi sont ensuite courts. J’utilise les pilotes CircuitPython d’Adafruit avec paho :

import json, time, board, adafruit_bme280.basic as bme, adafruit_veml7700
import paho.mqtt.client as mqtt

i2c = board.I2C()
env = bme.Adafruit_BME280_I2C(i2c, address=0x77)
lux = adafruit_veml7700.VEML7700(i2c)

c = mqtt.Client(client_id="lab-env-01")
c.username_pw_set(TOKEN)              # token as username, no password
c.tls_set()
c.connect(BROKER_HOST, 8883, 60)
c.loop_start()
while True:
    msg = {"temp_c": round(env.temperature, 2), "rh": round(env.humidity, 1),
           "pressure_hpa": round(env.pressure, 1), "lux": round(lux.lux, 1)}
    c.publish("v1/telemetry", json.dumps(msg), qos=1)
    time.sleep(30)

Objet à plat, donc Hermetry l’horodate à la réception, ce qui convient pour des mesures toutes les 30 s. Les règles de payload sont ici si tu veux ajouter des horodatages plus tard : MQTT topics and payload reference.

QoS 1 and a lot of patience.
Solution acceptée♥ 4

WiFiManager falls back to the portal again if it can’t join, that part’s handled.

For the credential, one shared token is worse than wrong. Hermetry allows one session per device, so 30 boards on one token keep throwing each other off. Use the profile’s provisioning instead. You flash the same firmware with the profile’s provisioning key and secret, and each board asks for its own credential on first start:

// first boot only, after Wi-Fi is up
// MQTT connect: username "provision", empty password, TLS
subscribe("v1/provision/res");
publish("v1/provision/req",
  "{"deviceName":"logger-" + chipId + "","
  ""provisionDeviceKey":"pk_...","provisionDeviceSecret":"ps_..."}");
// answer: {"status":"SUCCESS","credentialsType":"ACCESS_TOKEN","credentialsValue":"..."}
// store credentialsValue in NVS, reconnect with it, never provision again

On the profile’s Provisioning tab you pick a strategy. With Allow creating new devices, each new board lands in quarantine and its data is dropped until an admin activates it. With Only pre-provisioned devices you create logger-<chipId> names beforehand from your 30 boards, and a leaked key can’t add strangers. For 30 units I’d pre-create them. Hermetry never re-issues a credential for an existing name, so keep the token safe in NVS. Details on Adding and claiming devices.

QoS 1 and a lot of patience.
Solution acceptée♥ 8

Traduit de English par IA ·

Daniel a raison. J’ai rencontré exactement ce problème sur une Pi d’une station de pompage l’an dernier. Deux éléments configurent eth0 : dhcpcd démarre au boot, ne trouve aucun serveur DHCP, attribue au port une adresse link-local 169.254 ainsi que des routes, puis ifup tente d’ajouter sa propre adresse et sa route par défaut. La route existe déjà, donc le noyau répond « File exists » et ifup abandonne. Selon celui qui gagne la course au démarrage, votre passerelle sort ou ne sort pas.Choisissez-en un. Sous Bullseye, cela signifie dhcpcd. Supprimez le bloc eth0 de /etc/network/interfaces (le fichier ne doit plus contenir que la ligne source) et placez la configuration statique dans /etc/dhcpcd.conf :

interface eth0
static ip_address=10.40.2.20/24
static routers=10.40.2.1
static domain_name_servers=10.40.2.1
noipv4ll

Nettoyez ensuite sans redémarrer :

sudo ip addr flush dev eth0
sudo systemctl restart dhcpcd
ip addr show eth0

noipv4ll empêche l’apparition de l’adresse 169.254. Si vous passez plus tard à Bookworm, dhcpcd n’est plus présent et vous faites la même chose avec nmcli, notez-le donc.

QoS 1 and a lot of patience.
Solution acceptée♥ 6

Both of those are your problems, I had the same pair on battery water meter tags last year.

Current: the UART peripheral being enabled keeps the HF clock up, that alone is hundreds of uA when active and tens when idle. Set CONFIG_SERIAL=n and CONFIG_LOG=n in the release build (or CONFIG_PM_DEVICE and suspend the UART). Also enable the DC/DC (CONFIG_BOARD_ENABLE_DCDC=y, needs the inductor fitted on your board), and make sure unused GPIOs aren’t floating. That got us from about 35 uA to 3.

Online status: for child devices Hermetry takes the online state from the gateway’s v1/gw/connect and v1/gw/disconnect messages, so your gateway is telling it the tags are gone. With 60 s advertising and a 60 s timeout, one missed advert means a disconnect. Make the gateway wait for 5 missed adverts before sending disconnect.

For the alarm, set the Device offline rule’s Open after to something like 900 seconds so a short gap doesn’t page anyone. More on how child status works: Gateways and devices behind a gateway.

QoS 1 and a lot of patience.
Solution acceptée♥ 1

Traduit de English par IA ·

Et gardez des lots raisonnables : la valeur par défaut est de 10 messages par seconde et par appareil. Un gros arriéré envoyé d’un coup est abandonné.

QoS 1 and a lot of patience.
♥ 0

Traduit de English par IA ·

MOSI et MISO sont les deux lignes de données de SPI. Je pense que sur la tienne, DO correspond à MOSI ? Data out, donc sortie de données.

QoS 1 and a lot of patience.
♥ 0
15 sujets de 16 à 30 (sur un total de 45)