Von English mit KI übersetzt ·
Laut Dokumentation ist die mobile App für Benachrichtigungen und Freigaben gedacht. Zum Schalten funktioniert die Web-Konsole im Handy-Browser gut, so steuere ich auch meine Parzellenpumpe.Einrichtung:
- Im Geräteprofil des Pi, Reiter Commands, einen Befehl hinzufügen, z. B. Methode
heater.set, ein Ja/Nein-Parameteron, Tier Basic. Boards senden nur Befehle der Stufe Basic. - Ein Dashboard erstellen, ein Switch-Steuerelement hinzufügen, Aktion Run a command, den Pi und
heater.setauswählen und den aktuellen Zustand an einen Schlüssel binden, den der Pi meldet (z. B.heater_onals 0/1). - Auf dem 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)
Es werden keine Ports geöffnet. Lege das Board als Lesezeichen auf dem Startbildschirm deines Handys ab, dann verhält es sich praktisch wie eine App. Für Warnungen (Raum zu kalt usw.) bietet die App Push-Benachrichtigungen auf dem Handy, alternativ kannst du E-Mail oder eine verknüpfte Chat-App nutzen.
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.

