ops_keisha
@kstewart · Mitglied seit März 2025
Plant manager · food and beverage
- Themen
- 8
- Antworten
- 64
- Punkte
- 0
Erstellte Forenantworten
Von English mit KI übersetzt ·
Einkanal-Boards hören auf einer Frequenz und einem Spreizfaktor. Ein echtes LoRaWAN-Gateway hört gleichzeitig auf acht Kanälen und allen SFs. LoRaWAN-Knoten wechseln absichtlich die Kanäle, daher erfasst ein Einkanal-Board nur die Frames, die zufällig auf seiner Frequenz landen.Laura, hier passieren zwei getrennte Dinge.Joins: Bei EU868 verwenden Join-Requests die drei Standardkanäle 868,1, 868,3 und 868,5. Ihr Knoten wählt zufällig einen davon, daher hört ein Einkanal-Board auf 868,1 etwa ein Drittel der Joins. Das ist Ihr „eins von vier“. Die Join-Accept übergibt dem Knoten dann fünf weitere Kanäle (867,1 bis 867,9), sodass er nach dem Join über acht Kanäle springt.Für einen Bench-Test können Sie das nach dem Join festlegen. In MCCI LMIC, im EV_JOINED-Handler:
case EV_JOINED:
// nur Bench: Kanal 0 (868,1) behalten, die anderen deaktivieren
for (int ch = 1; ch < 9; ch++) {
LMIC_disableChannel(ch);
}
LMIC_setLinkCheckMode(0);
break;
Bearbeiten Sie lmic_eu868.c nicht, und liefern Sie das nicht ins Feld aus. Am Join selbst ändert es nichts.Der UDP-Teil ist allerdings das eigentliche Problem. Hermetry unterstützt den alten UDP-Packet-Forwarder gar nicht; Gateways verbinden sich über Basics Station oder als lizenzierter Router. Das Board hätte also in Ihrer Organisation nie als Gateway funktionieren können, deshalb ist es auch nicht gelistet. Was Sie im Frame-Log gesehen haben, kam von woanders. Gibt es ein anderes Gateway im Gebäude? Unseres hat Frames eines Nachbarn aufgefangen, bevor wir unser eigenes hinzugefügt haben.Bench-Option, die heute funktioniert: ein günstiges 8-Kanal-Indoor-Gateway, das Basics Station ausführt. Unseres hat weniger gekostet als die Sensoren im Kühlraum.
Single-channel boards listen on one frequency and one spreading factor. A real LoRaWAN gateway listens on eight channels and all SFs at once. LoRaWAN nodes hop channels on purpose, so a single-channel board only catches the frames that happen to land on its frequency.
Laura, two separate things are going on.
Joins: on EU868, join requests use the three default channels, 868.1, 868.3 and 868.5. Your node picks one of the three at random, so a single-channel board on 868.1 hears roughly a third of the joins. That’s your „one in four“. The join accept then hands the node five more channels (867.1 to 867.9), so after joining it hops over eight.
You can pin it after the join for a bench test. In MCCI LMIC, in the EV_JOINED handler:
case EV_JOINED:
// bench only: keep channel 0 (868.1), drop the others
for (int ch = 1; ch < 9; ch++) {
LMIC_disableChannel(ch);
}
LMIC_setLinkCheckMode(0);
break;
Don’t edit lmic_eu868.c, and don’t ship this to the field. It can’t help the join itself.
The UDP part is the real blocker though. Hermetry doesn’t support the legacy UDP packet forwarder at all, gateways connect with Basics Station or as a licensed router. So that board was never going to be a gateway in your organisation, which is why it isn’t listed. What you saw in the frames log came from somewhere else. Is there another gateway in the building? Ours picked up a neighbour’s frames before we added our own.
Bench option that works today: any cheap 8-channel indoor gateway that runs Basics Station. Ours cost less than the cold room sensors.
Von English mit KI übersetzt ·
Das ist die einfache LoRa-Bibliothek, Kevin. LMIC macht LoRaWAN und wählt die Kanäle selbst aus.
That’s the plain LoRa library, Kevin. LMIC does LoRaWAN, it picks channels itself.
The baud is right, otherwise plain AT wouldn’t answer OK either. ERROR:(0) is the HC-05’s code for a command it couldn’t parse, and with this module that almost always means the line ending. It wants every command to end with CR+LF. If the Serial Monitor is on „No line ending“ or „Newline“ only, the short „AT“ sometimes gets through and the longer commands don’t.
Set the monitor to „Both NL & CR“. Also type the commands in capitals, and on some firmware versions AT+NAME only works while the KEY/EN pin is held high the whole time, not only at power-up. If NAME still fails, tie KEY to 3.3 V with a wire while you send it.
AT+UART=9600,0,0 then sets the data mode baud. AT mode stays at 38400 regardless.
Von English mit KI übersetzt ·
Was auch immer du machst, bring an beiden Enden einen Endschalter an. Bei uns auf der Arbeit hat sich ein motorisierter Sonnenschutz selbst um die Welle gewickelt.
Whatever you do, put a limit switch at both ends. We had a motorized shade at work wrap itself around the bar.
Couldn’t you wake on the watchdog every 8 s, read the ADC, and go back to sleep? That’s what our door counters do.
Which baud rate is the meter on? The SDM120 ships at 2400 if I remember right, lots of people miss that.
Von English mit KI übersetzt ·
Wir hatten letztes Jahr in unserem Werk dieselbe Prüfungsfrage. Die Liste der zugelassenen Netze war das, was die Prüfer zufriedengestellt hat, und sie lohnt sich auch mit dem TLS-Profil.
We got the same audit question at our plant last year. The allowed networks list was the thing that got the auditors off our backs, worth doing even on the TLS profile.
Do you need dimming at all? If it’s just on and off, a relay is the cheapest thing there is.
Stealing the zone_id idea for the forklifts, thanks.
Von English mit KI übersetzt ·
Wir machen das auf unserer Produktionsfläche: Ein Pi mit einem Hornlautsprecher liest kritische Alarme über den Lärm hinweg vor. Ciaran hat recht, frag die Alarms-API ab.Bitte deinen Administrator um einen API-Schlüssel nur mit der Berechtigung zum Lesen von Alarmen (das Lesen von Alarmen ist standardmäßig eine Berechtigung auf Benutzerebene) und eine IP-Allowlist für die Adresse der Uni. Dann:
import requests, subprocess, time
H = {"Authorization": f"Bearer {API_KEY}"}
URL = f"https://{HOST}/tenant/{TENANT}/api/iot/alarms"
seen = set()
while True:
r = requests.get(URL, headers=H, params={"status": "OPEN", "severity": "CRITICAL,MAJOR",
"sort": "opened:desc", "pageSize": 20}, timeout=10)
for a in r.json()["items"]:
if a["alarmId"] not in seen:
seen.add(a["alarmId"])
subprocess.run(["sh", "-c", f'echo "{a["deviceName"]}: {a["title"]}" | piper --model en_GB-alan-medium.onnx --output-raw | aplay -r 22050 -f S16_LE'])
time.sleep(15)
Der Status OPEN bewirkt, dass bestätigte Alarme nicht mehr vorgelesen werden, was die Leute mögen: In der App bestätigen, und der Raum wird still. Gib deinen Alarmregeln lesbare Titel, denn genau das wird vorgelesen, z. B. „{{device.name}} Temperatur {{value}}“. Fünfzehn Sekunden sind ein höflicher Abfrageintervall, bleib deutlich unter den API-Limits. Falls du jemals einen öffentlichen Endpunkt bekommst, würde der Webhook alarm.created das Polling ersetzen: Webhooks.
We do this on our plant floor, a Pi with a horn speaker reads critical alarms over the noise. Ciaran’s right, poll the Alarms API.
Ask your admin for an API key with only the alarm read permission (reading alarms is a User-level permission by default) and an IP allowlist for the uni’s address. Then:
import requests, subprocess, time
H = {"Authorization": f"Bearer {API_KEY}"}
URL = f"https://{HOST}/tenant/{TENANT}/api/iot/alarms"
seen = set()
while True:
r = requests.get(URL, headers=H, params={"status": "OPEN", "severity": "CRITICAL,MAJOR",
"sort": "opened:desc", "pageSize": 20}, timeout=10)
for a in r.json()["items"]:
if a["alarmId"] not in seen:
seen.add(a["alarmId"])
subprocess.run(["sh", "-c", f'echo "{a["deviceName"]}: {a["title"]}" | piper --model en_GB-alan-medium.onnx --output-raw | aplay -r 22050 -f S16_LE'])
time.sleep(15)
Status OPEN means acknowledged alarms stop being read, which people like: ack it in the app and the room goes quiet. Give your alarm rules readable titles because that’s what gets spoken, e.g. „{{device.name}} temperature {{value}}“. Fifteen seconds is a polite poll rate, stay well under the API limits. If you ever do get a public endpoint, the alarm.created webhook would replace the polling: Webhooks.
+1 from a food plant. Same wish for our forklifts, especially the polygon part for the allergen area.
Encoders fitted Friday. With the correction it stays within about 5 cm over the 30 m, full or low battery. The swap test result turned out to be a slightly squashed right wheel, so Ciaran was right that it wasn’t only the motors. Trip counts and encoder difference now go to the dashboard.
They tried that. It’s straight for a few runs, then it drifts the other way when the battery drops.
Von English mit KI übersetzt ·
Aus reiner Neugier: Wie viele Hops schaffst du durch all den Stahl?
Out of curiosity, how many hops do you get through all that steel?
Von English mit KI übersetzt ·
Beides, wie sich herausstellte. mraa.Uart(0) hat die Pins eingerichtet, und ich hatte TX und RX vertauscht. Die Zählungen kommen jetzt jede Sekunde an und steigen mit den Fülldaten. caps_rej steht auf der Linienplatine, und der Schichtleiter hat schon gefragt, warum es um 14 Uhr gesprungen ist.
Both, as it turns out. mraa.Uart(0) set up the pins, and I had TX and RX the wrong way round. Counts now arrive every second and go up with the filler data. caps_rej is on the line board and the shift lead already asked why it jumped at 2 pm.

