thompsonplc
@lthompson · Mitglied seit Mai 2025
Automation engineer · pharma · 14 years in the field
- Themen
- 7
- Antworten
- 65
- Punkte
- 0
Erstellte Forenantworten
Tyler, please don’t, eight 120 ohm resistors in parallel load the line to 15 ohm and nothing will talk.
Owen: at 9600 baud a bit lasts about 104 µs. On 30 m of cable a reflection goes up and back in well under a microsecond, so it has died out long before the receiver samples. Termination is about long cables and high baud rates, and you are nowhere near that. That’s David’s answer too.
What you’re missing is biasing. Between frames nobody drives the line, and an unbiased line floats near 0 V differential, so noise looks like start bits. That gives exactly the random, different-meter-each-time errors you see. Many cheap USB dongles have no bias resistors. Put them at the master end: about 680 ohm from A (+) to 5 V and 680 ohm from B (-) to GND. If you later add 120 ohm termination at both ends, bias is no longer optional at all.
Also, in this order:
- Use twisted pair, and run a third wire as signal ground/common. Speaker cable has neither the twist nor the impedance.
- Daisy-chain, no star. Short stubs at each meter.
- In pymodbus, a response timeout of 1 s and one retry, and a short pause between meters.
On the Hermetry side, if a poll fails, send nothing for that meter in that round instead of a 0 or the old value. Then the chart has a small gap rather than a fake reading.
And whoever uses the board needs the permission to run widget commands, or the Switch just says no. Caught a colleague out at work.
Von English mit KI übersetzt ·
Das macht Sinn. Dann also Passkeys.
Makes sense. Passkeys it is then.
Von English mit KI übersetzt ·
Unser Eigentümer hat letzten Monat „Zweistufige Verifizierung für jedes Mitglied verlangen“ aktiviert. Umgehen die E-Mail-Links das, oder brauchen die Leute nach dem Klick trotzdem den zweiten Faktor?
Our owner switched on „Require two-step verification for every member“ last month. Does the e-mail link get people around that, or do they still need the second factor after clicking it?
Von English mit KI übersetzt ·
Zuerst die Hardware. Verwende einen Optokoppler: Brückengleichrichter (oder einen PC817 mit einer Rückwärtsdiode über der LED), 1 kΩ Vorwiderstand, 10 µF am Ausgang, damit die Wechselspannungsrestwelligkeit nicht als 50 Impulse pro Sekunde auftaucht. Die Transistorseite an D5 mit INPUT_PULLUP, sodass der Pin während des Klingelns LOW ist. Im Code entprellen, bei der fallenden Flanke ring: 1 senden und ring: 0 senden, wenn es 2 s lang ruhig ist.Dann würde ich die Alarmregel auslassen. Ein Alarm hat einen Lebenszyklus (offen, quittiert, gelöscht), und für jeden Kurier würden sich Alarme stapeln. Eine Regel auf der Rules-Karte passt besser:
When: A value changes, device "intercom-d1", value "ring", becomes 1
Then: Tell people [x] Members
Message: "Someone is at the street door"
Mitglieder bekommen es in der Glocke, per Push, sofern sie das eingerichtet haben (in der App oder in einem Browser mit aktiviertem Push), und in jeder Chat-App, die sie unter Mein Profil > Chat-Apps verknüpft haben. Sobald dein Admin die Plattform verbindet, verknüpft also jede Person ihr eigenes Konto, und das ist dein Handy-Ping, mit oder ohne App. Empfänger einer Rules-Karte bekommen nie E-Mails oder SMS; für SMS bräuchtest du einen Flow mit einem Notify-Block und Telefonnummern.Eine Sache solltest du wissen: Dieselbe Benachrichtigung an dieselbe Person wird für eine 10-minütige Abklingzeit zurückgehalten. Für eine Türklingel meist in Ordnung, aber wenn zwei Kuriere innerhalb von 10 Minuten kommen, erscheint der zweite nur als „(+1)“ bei der nächsten. Details: Notifications from rules and flows.
Hardware first. Use an optocoupler: bridge rectifier (or a PC817 with a reverse diode across the LED), 1 kΩ series resistor, 10 µF across the output so the AC ripple doesn’t show up as 50 pulses a second. Transistor side to D5 with INPUT_PULLUP, so the pin goes LOW while it rings. Debounce in code, send ring: 1 on the falling edge, and ring: 0 when it’s quiet again for 2 s.
Then I’d skip the alarm rule. An alarm has a lifecycle (open, acknowledge, clear) and you’d have alarms piling up for every courier. A Rules card rule fits better:
When: A value changes, device "intercom-d1", value "ring", becomes 1
Then: Tell people [x] Members
Message: "Someone is at the street door"
Members get it in the bell, by push where they’ve set it up (the app, or a browser with push on), and in every chat app they linked under My Profile > Chat apps. So once your admin connects the platform each person links their own account and that’s your phone ping, app or not. Rules card recipients never get e-mail or SMS, for SMS you’d need a flow with a Notify block and phone numbers.
One thing to know: the same notice to the same person is held back for a 10-minute cooldown. Fine for a doorbell mostly, but if two couriers come within 10 minutes the second one only shows up as „(+1)“ on the next one. Details: Notifications from rules and flows.
Von English mit KI übersetzt ·
Zeilenklick in einer Tabelle, Board-Parameter mit der angeklickten Zeile setzen, und das Diagramm daneben folgt der Zeile. Fünf Minuten. Gut.
Row click on a table, Set board parameters with the clicked row, and the chart beside it follows the row. Five minutes. Good.
Von English mit KI übersetzt ·
Kann eine Gruppe eine Berechtigung auch entziehen? Wir haben Benutzer, die Geräte und Alarme sehen, aber niemals etwas quittieren sollen.
Can a group take a permission away? We have Users who should see devices and alarms but never acknowledge anything.
Add a revision block too, the second version always comes.
Von English mit KI übersetzt ·
Behalten Sie für diese Prüfung in jeder Organisation einen Dummy-User, Sie werden ihn nach Rollenänderungen wieder brauchen.
Keep a dummy User in each org for that check, you’ll want it again after role changes.
Von English mit KI übersetzt ·
Zur Firmware: Hermetry signiert niemals Firmware, Sie signieren die Images in Ihrem eigenen Build und registrieren nur den öffentlichen Schlüssel. Tun Sie das und aktivieren Sie Secure Boot sowie Flash-Verschlüsselung auf dem S3, das deckt die Box-Seite ab.
On firmware: Hermetry never signs firmware, you sign images in your own build and register only the public key. Do that, and turn on secure boot plus flash encryption on the S3, that covers the box side.
Von English mit KI übersetzt ·
Gefunden. Ich habe die Pumpen-IDs unter Erweitert an unsere Schlüssel angepasst, und 9 von 11 Symbolen haben sich selbstständig verbunden. Bei den beiden übrigen handelt es sich um Ventile, die geschlossen als 1 melden; diese habe ich mit einem Ausdruck invertiert.
Found it. Changed the pump ids under Advanced so they match our keys and 9 of 11 symbols connected on their own. The other two are valves that report closed as 1, I inverted those with an expression.
Von English mit KI übersetzt ·
Ich habe heute Morgen eine kleine Druckerhöhungsstation gezeichnet. Das Platzieren von Symbolen und Rohren ging schnell. Was mich irritiert hat: Im Designer gibt es nirgendwo ein Feld, in dem man festlegen kann, welcher Gerätewert eine Pumpe anzeigt. Bin ich blind?
Drew a small booster station this morning. Placing symbols and pipes went fast. What threw me: there is no field anywhere in the designer to say which device value a pump shows. Am I blind?
Von English mit KI übersetzt ·
Brian hat recht, und außerdem fehlt dir das Organisationspräfix. Ich habe letztes Jahr fast dasselbe für einen Kühlraum eingerichtet.1. API Keys (Developer menu) > New API Key. Unter Module permissions nur Lesezugriff auf Telemetrie vergeben, sonst nichts. Eine IP-Allowlist auf die Adresse des Büros setzen und das Ablaufdatum notieren, Standard sind 90 Tage, maximal ein Jahr. Eine Erinnerung in den Kalender eintragen, unserer ist an einem Samstag abgelaufen.2. Alle Verwaltungspfade liegen unter dem Tenant:
GET https://<host>/tenant/<tenantId>/api/telemetry/latest?kind=iot_device&entityId=<deviceId>&keys=level_pct
Authorization: Bearer sk_live_...
Die Antwort sieht etwa so aus: {„latest“: {„level_pct“: {„ts“: …, „value“: 91.2}}}. Vergleiche den ts mit dem vorherigen Wert, damit du bei demselben Messwert nicht zweimal piepst.3. Auf 429 reagieren und die Sekunden aus Retry-After abwarten. Etwa alle 30 s abfragen, der Tank läuft nicht in 5 s voll.Der andere Weg, wenn du es sofort willst: Mach den Pi selbst zu einem Gerät, lass eine Regel am Tank ihm einen Befehl senden, wenn level_pct über 90 steigt, und der Pi wartet auf GET /api/v1/rpc mit seinem eigenen Gerätetoken. Mehr bewegliche Teile, kein Polling. Für einen Summer würde ich den API Key nehmen. Die Konventionen stehen unter REST API basics.
Brian’s right, and you’re also missing the organisation prefix. I set up nearly the same thing for a chiller room last year.
1. API Keys (Developer menu) > New API Key. Under Module permissions give it read-only telemetry, nothing else. Set an IP allowlist to the office’s address, and note the expiry, default is 90 days, a year at most. Put a reminder in the calendar, ours expired on a Saturday.
2. Every management path sits under the tenant:
GET https://<host>/tenant/<tenantId>/api/telemetry/latest?kind=iot_device&entityId=<deviceId>&keys=level_pct
Authorization: Bearer sk_live_...
Answer looks like {„latest“: {„level_pct“: {„ts“: …, „value“: 91.2}}}. Compare the ts with the previous one so you don’t buzz twice on the same reading.
3. Handle 429 and wait the Retry-After seconds. Poll every 30 s or so, the tank doesn’t fill in 5.
The other route, if you want it instant: make the Pi a device itself, have a rule on the tank send it a command when level_pct rises above 90, and let the Pi wait on GET /api/v1/rpc with its own device token. More moving parts, no polling. For a buzzer I’d take the API key. Conventions are on REST API basics.
Von English mit KI übersetzt ·
Testen Sie SPI zuerst für sich allein mit einem Loopback, ohne Chip. Ziehen Sie den MCP3008 ab, verbinden Sie MOSI (GPIO10, Pin 19) mit MISO (GPIO9, Pin 21) über einen Jumper und führen Sie aus:
wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-6.6.y/tools/spi/spidev_test.c
gcc -o spidev_test spidev_test.c
./spidev_test -D /dev/spidev0.0 -v -p "HELLO"
Wenn RX dieselben Bytes wie TX zeigt, ist die Pi-Seite in Ordnung. Wenn RX nur aus 00 oder FF besteht, läuft SPI nicht wirklich.Meine Vermutung liegt allerdings in Ihrem Code: spi.open(0, 1) verwendet die Chip-Select-Leitung CE1, also GPIO7 an Pin 26. Die meisten MCP3008-Anleitungen verbinden CS mit CE0, also GPIO8 an Pin 24. Wenn Ihr CS an Pin 24 liegt, wird der Chip nie selektiert, sein Ausgang schwebt, und Sie erhalten 0 mit gelegentlich 1023, wenn Sie ihn berühren. Entweder verlegen Sie die Leitung an Pin 26 oder ändern den Code auf spi.open(0, 0). Genau diese Verwechslung hatte ich bei der Arbeit an einem Testaufbau schon einmal.Dass Kanal 1 denselben Wert liefert, ist der Hinweis: Ein nicht selektierter Chip liefert auf jedem Kanal denselben Datenmüll.
Test SPI on its own first with a loopback, no chip. Pull the MCP3008 out, put a jumper from MOSI (GPIO10, pin 19) to MISO (GPIO9, pin 21) and run:
wget https://raw.githubusercontent.com/raspberrypi/linux/rpi-6.6.y/tools/spi/spidev_test.c
gcc -o spidev_test spidev_test.c
./spidev_test -D /dev/spidev0.0 -v -p "HELLO"
If RX shows the same bytes as TX, the Pi side is fine. If RX is all 00 or FF, SPI isn’t really running.
My bet though is in your code: spi.open(0, 1) uses chip select CE1, which is GPIO7 on pin 26. Most MCP3008 tutorials wire CS to CE0, GPIO8 on pin 24. If your CS goes to pin 24, the chip is never selected, its output floats, and you get 0 with the odd 1023 when you touch it. Either move the wire to pin 26 or change the code to spi.open(0, 0). I’ve done this exact mixup on a bench at work.
Your channel 1 reading the same is the giveaway: an unselected chip gives the same junk on every channel.
BLE positioning gets you 2-3 m on a good day. For half a metre you’re looking at UWB.

