Yapay zekâ tarafından English dilinden çevrildi ·
Dokümanlara göre mobil uygulama bildirimler ve onaylar içindir. Anahtarlama için telefon tarayıcısındaki web konsolu sorunsuz çalışıyor; bahçe pompamı da böyle çalıştırıyorum.Kurulum adımları:
- Pi’nin cihaz profilinde, Commands sekmesinde bir komut ekleyin, örneğin yöntem
heater.set, tek bir Evet/Hayır parametresion, katman Basic. Kartlar yalnızca Basic katmanlı komutları gönderir. - Bir pano oluşturun, bir Switch kontrolü ekleyin, eylem olarak Run a command seçin, Pi’yi ve
heater.set‘i seçin, mevcut durumu Pi’nin bildirdiği bir anahtara bağlayın (örneğin 0/1 değerliheater_on). - Pi üzerinde:
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)
Hiçbir port açılmıyor. Kartın sayfasını telefonunuzun ana ekranına yer imi olarak ekleyin, neredeyse bir uygulama gibi çalışır. Uyarılar için (oda çok soğuk vb.) uygulama telefonunuza anlık bildirim gönderir; alternatif olarak e-posta veya bağlı bir sohbet uygulaması kullanabilirsiniz.
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.

