wilsonmaker
@wilson-m · Se unió el julio 2025
Maker · home automation · Nottingham · new to IoT
- Temas
- 14
- Respuestas
- 71
- Puntos
- 0
Respuestas de foro creadas
Traducido del English por IA ·
+1, lo querría también para la calefacción de mi invernadero con una previsión meteorológica.
+1, would like this for my greenhouse heater with a weather forecast too.
Traducido del English por IA ·
Yo también soy principiante, pero el invierno pasado tuve exactamente esto con el PC de mi estación meteorológica, y la solución fue dejar de preocuparme por el número. Busca el puerto según lo que tiene conectado. pyserial puede listar los puertos con sus identificadores USB y su número de serie:
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)
Ejecútalo una vez para imprimir los tuyos y copia el número de serie ahí. 0x2341 es el identificador de proveedor de las placas Arduino originales. Si la tuya es un clon con chip CH340 (vid 0x1A86), ten cuidado: esos normalmente no tienen número de serie, así que con dos clones no podrás distinguirlos y tendrías que identificarlos por p.location (el conector USB).Además, envuelve el bucle de lectura para que vuelva a buscar el puerto después de un error en lugar de morir, así la gente puede volver a conectar cuando quiera.
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.
Traducido del English por IA ·
Sí, cometí el mismo error en papel el invierno pasado en casa. Necesitas un contacto seco, así que o bien un módulo de relé libre de tensión (la placa tipo Sonoff RE5V1C, o cualquier ESP8266 con un módulo de relé de 5 V conectado a COM/NO) en los terminales del termostato, en paralelo con el termostato antiguo para que siga funcionando si tu placa falla.La parte de la placa fue más fácil de lo que pensaba una vez que encontré el catálogo. Abre el perfil del dispositivo, la pestaña Commands, y pulsa Add command:
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Solo los comandos de nivel Basic de esa lista aparecen en la configuración del Switch. Luego, en Switch: Run a command, elige el dispositivo y heat.set, con el valor de «The control’s value». Vincula Current state a una clave de telemetría que reporte la placa: yo envío heat_on como 0/1 con cada lectura para que el interruptor muestre lo que el relé hace realmente, y no lo que pulsaste. Para una luz o calefacción puedes desactivar «Ask before running». Responde con el mismo id o la tarjeta se queda en «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}");
Página que usé: Control cards.
Yep did the same mistake on paper last winter at home. You want a dry contact, so either a relay module that’s volt-free (the Sonoff RE5V1C style board, or any ESP8266 plus a 5 V relay module wired COM/NO) across the thermostat terminals, in parallel with the old thermostat so it still works if your board dies.
The board side was easier than I thought once I found the catalogue. Open the device’s profile, Commands tab, Add command:
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Only Basic tier commands from that list show up in the Switch settings. Then in the Switch: Run a command, pick the device and heat.set, value from «The control’s value». Bind Current state to a telemetry key the board reports, I send heat_on as 0/1 with every reading so the switch shows what the relay is really doing, not what you clicked. For a light or heating you can turn «Ask before running» off. Reply on the same id or the card sits on «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 I used: Control cards.
Traducido del English por IA ·
Lo investigué para la pequeña panadería de un amigo. Tampoco encontré una página de documentación de Forge, así que no puedo decirte qué hace en cuanto a calidad ni cómo encaja en un plan.Lo que funciona con la parte IoT habitual: haz que el controlador del sensor (o un PLC pequeño) envíe el grosor de cada pieza, o el mín/máx/promedio cada 10 s, como telemetría, por ejemplo {"thick_mm": 7.12, "rejects": 3}. Después, una regla de alarma en el perfil para fuera de tolerancia. No hay un operador «entre», pero puedes agrupar condiciones con any:
{ "any": [
{ "key": "thick_mm", "op": "<", "value": 6.0 },
{ "key": "thick_mm", "op": ">", "value": 8.0 }
] }
Para los conteos por turno, envía un contador creciente rejects_total y grafícalo con el agregado increase por hora. La compuerta de rechazo debe ser controlada localmente por el controlador del sensor o el PLC, no desde la nube; una cinta a 0,4 m/s no puede esperar un viaje de ida y vuelta.La referencia de condiciones es Alarm conditions reference.
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.
Traducido del English por IA ·
DNSServer + WiFiManager y ahora el portal aparece en ambos teléfonos. El aprovisionamiento funcionó a la primera con nombres creados previamente; primero leí los 30 ID de chip por serie y los guardé en un CSV. Olvidé guardar el token en NVS en mi primera compilación, así que al reiniciar intentó aprovisionar de nuevo y obtuvo device_exists. Solucionado, y las etiquetas ya están impresas.
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.
Traducido del English por IA ·
Las placas rev 2 llegaron con dos MMBT3904 y el 1 uF en EN. Ahora las cargas son automáticas y abrir el monitor ya no reinicia la placa. Arreglé la rev 1 con transistores sobre cables, feo pero funciona. Gracias a Eric, y a Aoife por detectarlo enseguida.
rev 2 boards arrived with two MMBT3904 and the 1 uF on EN. Uploads are automatic now and opening the monitor no longer resets it. I bodged rev 1 with transistors on wires, ugly but works. Thanks Eric, and Aoife for spotting it straight away.
Traducido del English por IA ·
Era eso. La red de invitados entrega bien el router como DNS, pero mi sketch usaba una IP de NTP fija que un cortafuegos bloqueaba, así que el reloj nunca se ajustó y TLS falló. Lo cambié a pool.ntp.org y el sensor volvió a funcionar. Los cinco están ahora en la red de invitados, con el aislamiento desactivado, y el portátil del trabajo no puede verlos.No toqué el reenvío de puertos, Kevin, gracias de todos modos.
That was it. Guest network hands out the router as DNS fine, but my sketch was using a hardcoded NTP IP that a firewall blocked, so the clock never set and TLS failed. Switched it to pool.ntp.org and the sensor came back. All five are on the guest network now, isolation off, and the work laptop can’t see them.
Didn’t touch the port forwarding, Kevin, thanks anyway.
Traducido del English por IA ·
¿Podría ser la pila de botón? Las mías daban lecturas raras cuando la batería estaba fría.
Could it be the coin cell? Mine read weird when the battery was cold.
Traducido del English por IA ·
Una pena lo de MJPEG, pero tiene sentido, gracias Aoife.
Shame about MJPEG but makes sense, thanks Aoife.
Traducido del English por IA ·
Compré una RTC HAT barata justo para este motivo, una DS3231, por un par de libras. Así el reloj está bien incluso sin conexión.
I bought a cheap RTC HAT for this exact reason, DS3231, a couple of quid. Then the clock is right even offline.
Traducido del English por IA ·
¿Puedes verlo en la vista en vivo de la cámara de Hermetry una vez flasheado? Me había estado preguntando por estos.
Can you watch it in Hermetry’s camera live view once it’s flashed? Been wondering about these.
Traducido del English por IA ·
+1 a la solicitud, me encantaría un simple conteo de personas para la cámara de mi cobertizo del jardín.
+1 for the request, would love a simple person count for my garden shed camera.
Traducido del English por IA ·
¿Podrían simplemente hacer los contactos más grandes? Por ejemplo, tiras de cobre anchas en la base.
Could you just make the contacts bigger? Like wide copper strips on the dock.
Traducido del English por IA ·
Por lo que veo, solo el interruptor de aislamiento, además de un límite de ancho de banda. No hay reglas adecuadas.
Only the isolation switch as far as I can see, plus a bandwidth limit. No proper rules.
Traducido del English por IA ·
quizás el WiFi consume demasiada corriente y el 3.3 V cae? Yo tuve brownouts en el mío
maybe the WiFi pulls too much current and the 3.3 V sags? I had brownouts on mine

