thompsonplc
@lthompson · Se unió el mayo 2025
Automation engineer · pharma · 14 years in the field
- Temas
- 7
- Respuestas
- 65
- Puntos
- 0
Respuestas de foro creadas
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.
Traducido del English por IA ·
Tiene sentido. Entonces, passkeys.
Makes sense. Passkeys it is then.
Traducido del English por IA ·
Nuestro propietario activó «Requerir verificación en dos pasos para cada miembro» el mes pasado. ¿El enlace por correo electrónico evita eso, o la gente sigue necesitando el segundo factor después de hacer clic?
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?
Traducido del English por IA ·
Primero el hardware. Usa un optoacoplador: puente rectificador (o un PC817 con un diodo inverso en paralelo con el LED), resistencia en serie de 1 kΩ, 10 µF en la salida para que el rizado de CA no aparezca como 50 pulsos por segundo. El lado del transistor a D5 con INPUT_PULLUP, de modo que el pin esté en LOW mientras suena. Antirrebote en el código, envía ring: 1 en el flanco de bajada y ring: 0 cuando lleve 2 s en silencio.Luego yo omitiría la regla de alarma. Una alarma tiene un ciclo de vida (abierta, reconocida, cerrada) y se acumularían alarmas por cada repartidor. Una regla de la tarjeta Rules encaja mejor:
When: A value changes, device "intercom-d1", value "ring", becomes 1
Then: Tell people [x] Members
Message: "Someone is at the street door"
Los miembros lo reciben en la campana, por push donde lo hayan configurado (la app, o un navegador con push activado), y en cada aplicación de chat que hayan vinculado en Mi perfil > Apps de chat. Así que, una vez que tu administrador conecte la plataforma, cada persona vincula su propia cuenta y ese es tu aviso en el teléfono, con o sin app. Los destinatarios de una regla de la tarjeta Rules nunca reciben correo electrónico ni SMS; para SMS necesitarías un flujo con un bloque Notify y números de teléfono.Una cosa que debes saber: el mismo aviso para la misma persona se retiene durante un enfriamiento de 10 minutos. Para un timbre de puerta está bien en general, pero si dos repartidores llegan con menos de 10 minutos de diferencia, el segundo solo aparece como «(+1)» en el siguiente aviso. Detalles: 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.
Traducido del English por IA ·
Clic en una fila de una tabla, Establecer parámetros del board con la fila pulsada, y el gráfico al lado sigue la fila. Cinco minutos. Bien.
Row click on a table, Set board parameters with the clicked row, and the chart beside it follows the row. Five minutes. Good.
Traducido del English por IA ·
¿Puede un grupo quitar un permiso? Tenemos Usuarios que deben ver dispositivos y alarmas, pero nunca reconocer nada.
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.
Traducido del English por IA ·
Mantenga un usuario ficticio en cada organización para esa comprobación, lo volverá a necesitar después de los cambios de roles.
Keep a dummy User in each org for that check, you’ll want it again after role changes.
Traducido del English por IA ·
Sobre el firmware: Hermetry nunca firma el firmware; usted firma las imágenes en su propia compilación y registra solo la clave pública. Haga eso y active el secure boot y el cifrado de flash en el S3, eso cubre el lado de la caja.
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.
Traducido del English por IA ·
Lo encontré. Cambié los ID de las bombas en Avanzado para que coincidan con nuestras claves y 9 de los 11 símbolos se conectaron por sí solos. Los otros dos son válvulas que informan cerrado como 1; los invertí con una expresión.
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.
Traducido del English por IA ·
Esta mañana dibujé una pequeña estación de bombeo. Colocar símbolos y tuberías fue muy rápido. Lo que me desconcertó: en ningún lugar del diseñador hay un campo para indicar qué valor de dispositivo muestra una bomba. ¿Será que no lo veo?
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?
Traducido del English por IA ·
Brian tiene razón, y además te falta el prefijo de la organización. Monté casi lo mismo para una cámara de refrigeración el año pasado.1. API Keys (Developer menu) > New API Key. En Module permissions dale solo telemetría de lectura, nada más. Configura una lista blanca de IP con la dirección de la oficina y anota la caducidad: por defecto son 90 días, un año como máximo. Pon un recordatorio en el calendario, el nuestro caducó un sábado.2. Todas las rutas de gestión cuelgan del tenant:
GET https://<host>/tenant/<tenantId>/api/telemetry/latest?kind=iot_device&entityId=<deviceId>&keys=level_pct
Authorization: Bearer sk_live_...
La respuesta tiene este aspecto: {«latest»: {«level_pct»: {«ts»: …, «value»: 91.2}}}. Compara el ts con el anterior para no hacer sonar el zumbador dos veces con la misma lectura.3. Gestiona el 429 y espera los segundos de Retry-After. Consulta cada 30 s más o menos, el tanque no se llena en 5.La otra vía, si quieres que sea instantánea: convierte la Pi en un dispositivo, haz que una regla en el tanque le envíe un comando cuando level_pct supere 90, y deja que la Pi espere en GET /api/v1/rpc con su propio token de dispositivo. Más piezas móviles, sin polling. Para un zumbador me quedaría con la API key. Las convenciones están en 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.
Traducido del English por IA ·
Pruebe primero el SPI por sí solo con un loopback, sin chip. Saque el MCP3008, ponga un cable puente desde MOSI (GPIO10, pin 19) a MISO (GPIO9, pin 21) y ejecute:
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"
Si RX muestra los mismos bytes que TX, la parte de la Pi está bien. Si RX es todo 00 o FF, el SPI no está funcionando realmente.Aun así, mi sospecha está en su código: spi.open(0, 1) usa el chip select CE1, que es GPIO7 en el pin 26. La mayoría de los tutoriales del MCP3008 conectan CS a CE0, es decir, GPIO8 en el pin 24. Si su CS va al pin 24, el chip nunca se selecciona, su salida queda flotando y obtiene 0 con algún 1023 cuando lo toca. O bien mueva el cable al pin 26, o cambie el código a spi.open(0, 0). Yo mismo cometí exactamente esta confusión en un banco de pruebas en el trabajo.Que el canal 1 dé el mismo valor es la pista: un chip no seleccionado devuelve la misma basura en todos los canales.
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.

