Yapay zekâ tarafından English dilinden çevrildi ·
Evet, geçen kış evde kâğıt üzerinde aynı hatayı ben de yaptım. Kuru kontak gerekiyor; yani termostat uçlarına paralel olarak, gerilimsiz bir röle modülü (Sonoff RE5V1C tipi kart ya da COM/NO bağlı herhangi bir ESP8266 ile 5 V röle modülü) bağlamalısınız. Böylece kart arızalansa bile eski termostat çalışmaya devam eder.Kataloğu bulduktan sonra kart tarafı düşündüğümden daha kolaydı. Cihazın profilini açın, Commands sekmesine gidip Add command seçin:
Method: heat.set
Label: Heating
Tier: Basic
Parameters: on (Yes / no, required)
Anahtar ayarlarında yalnızca bu listedeki Basic seviyeli komutlar görünür. Sonra Switch: Run a command bölümünde cihazı ve heat.set’i seçin, değeri “The control’s value” olarak ayarlayın. Current state alanını, kartın bildirdiği bir telemetri anahtarına bağlayın; ben her okumayla birlikte heat_on değerini 0/1 olarak gönderiyorum, böylece anahtar tıklamanızı değil rölenin gerçekte ne yaptığını gösteriyor. Işık ya da ısıtma için “Ask before running” seçeneğini kapatabilirsiniz. Kart, aynı id üzerinden yanıt vermezse kart “Sent; waiting for the device” durumunda takılı kalır:
// 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}");
Kullandığım sayfa: 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.

