Traducido del English por IA ·
Según la documentación, la aplicación móvil sirve para notificaciones y aprobaciones. Para el control, la consola web en el navegador del móvil funciona bien; así es como manejo la bomba de mi huerto.Qué configurar:
- En el perfil de dispositivo de la Pi, pestaña Commands, añade un comando, por ejemplo el método
heater.set, con un parámetro Sí/Noon, nivel Basic. Las placas solo envían comandos de nivel Basic. - Crea un panel, añade un control Switch, acción Run a command, elige la Pi y
heater.set, y vincula el estado actual a una clave que reporte la Pi (por ejemploheater_oncomo 0/1). - En la Pi:
def on_connect(c, u, f, rc):
c.subscribe("v1/rpc/req/+", qos=1)
def on_message(c, u, msg):
req_id = msg.topic.rsplit("/", 1)[1]
body = json.loads(msg.payload)
if body.get("method") == "heater.set":
on = bool(body["params"]["on"])
GPIO.output(17, on)
c.publish("v1/telemetry", json.dumps({"heater_on": int(on)}), qos=1)
c.publish(f"v1/rpc/res/{req_id}", json.dumps({"ok": True}), qos=1)
No se abre ningún puerto. Guarda la placa en la pantalla de inicio del móvil como marcador y funcionará prácticamente como una aplicación. Para las alertas (habitación demasiado fría, etc.), la aplicación envía notificaciones push al teléfono, o puedes usar el correo electrónico o una aplicación de chat vinculada.
From what the docs say, the mobile app is for notifications and approvals. For the switch, the web console in the phone browser works fine, that’s how I run my allotment pump.
What to set up:
- On the Pi’s device profile, Commands tab, add a command, e.g. method
heater.set, one Yes/no parameteron, tier Basic. Boards only send Basic tier commands. - Make a dashboard, add a Switch control, action Run a command, pick the Pi and
heater.set, and bind the current state to a key the Pi reports (sayheater_onas 0/1). - On the Pi:
def on_connect(c, u, f, rc):
c.subscribe("v1/rpc/req/+", qos=1)
def on_message(c, u, msg):
req_id = msg.topic.rsplit("/", 1)[1]
body = json.loads(msg.payload)
if body.get("method") == "heater.set":
on = bool(body["params"]["on"])
GPIO.output(17, on)
c.publish("v1/telemetry", json.dumps({"heater_on": int(on)}), qos=1)
c.publish(f"v1/rpc/res/{req_id}", json.dumps({"ok": True}), qos=1)
No ports opened. Bookmark the board on your phone’s home screen and it’s basically an app. For alerts (room too cold etc.) the app gives you push on the phone, or use e-mail or a linked chat app.

