Ofisimizdeki termostatın yanındaki ESP8266 röleli pano için ısıtma aç/kapa anahtarı
Yapay zekâ tarafından English dilinden çevrildi ·
Küçük bir lojistik girişiminin kurucusuyum, mühendis değilim, o yüzden şimdiden özür dilerim. Depo ofisimizde gaz sobası için eski bir duvar termostatı var. İnsanlar gelmeden önce ısıtmayı Hermetry panelimizden açabilmek ve ofis sıcaklığını görebilmek istiyorum.Şu ana kadar yaptıklarım: PubSubClient kullanarak kendi Arduino kodumla yazılımını yüklediğim bir Sonoff Basic R2 (ESP8266). Her dakika v1/telemetry konusuna bir DS18B20 sıcaklık değeri gönderiyor ve bu kısım çalışıyor, grafiğini çizebiliyorum. Panoya bir Switch kartı ekledim, ancak ayarlarda Bir komut çalıştır bölümünde cihaz için komut listesi boş ve ham metot kutusunu denediğimde “Bu komut cihaz profilinin kataloğunda yok, bu yüzden bir panodan gönderilemez.” mesajını aldım.Kodda v1/rpc/req/+ konusuna abone oluyorum ve method değeri heat.set olduğunda GPIO12’yi değiştiriyorum. Ayrıca Sonoff’un termostat kablolamasına nasıl bağlanacağından tam emin değilim, çıkışını termostatın iki terminaline bağlamayı düşünüyordum.
Founder of a small logistics startup, not an engineer, so apologies in advance. Our warehouse office has an old wall thermostat for a gas heater. I want to be able to switch the heat on from our Hermetry dashboard before people arrive, and see the office temperature.
What I have so far: a Sonoff Basic R2 (ESP8266) that I flashed with my own Arduino sketch using PubSubClient. It sends a DS18B20 temperature every minute to v1/telemetry and that part works, I can chart it. I added a Switch card on the board, but in the settings under Run a command the command list for the device is empty, and when I tried the raw method box I got “This command is not in the device profile’s catalogue, so it cannot be sent from a board.”
In the sketch I subscribe to v1/rpc/req/+ and toggle GPIO12 when method is heat.set. Also I’m not 100% sure how the Sonoff goes into the thermostat wiring, I was going to put its output across the two thermostat terminals.
Yapay zekâ tarafından English dilinden çevrildi ·
Devamla, otelimizdeki toplantı odaları için buna benzer bir şey yapmak istiyorum.
Following, I want to do something similar for meeting rooms in our hotel.
Yapay zekâ tarafından English dilinden çevrildi ·
Kablolama kısmından önce durun. Bir Sonoff Basic, şebeke faz hattını çıkışına aktarır. Çoğu gaz kazanında termostat terminalleri, düşük gerilimli bir ısıtma talebi (call-for-heat) döngüsüdür. Basic’in çıkışını bunların üzerine bağlarsanız kazanın kontrol kartına 230 V uygulanmış olur. Bu iki kabloda hangi gerilim var?
Stop before the wiring part. A Sonoff Basic switches mains live through to its output. Thermostat terminals on most gas heaters are a low voltage call-for-heat loop. Putting the Basic’s output across them puts 230 V on the boiler’s control board. What voltage is on those two wires?
Yapay zekâ tarafından English dilinden çevrildi ·
Ölçtüm, 24 V AC. Yani… sormakta haklıymışım.
Measured it, 24 V AC. So… good thing I asked.
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.
Yapay zekâ tarafından English dilinden çevrildi ·
Gerilimsiz bir röle kartı edindim, eski termostata paralel bağladım ve profile heat.set ekledim. Anahtar çalışıyor ve gerçek durumu gösteriyor. Kodda eksik olan parça yanıttı; yanıt olmadığı için her tıklamada, ısıtıcı çalışmasına rağmen 30 saniye sonra “yanıt yok” uyarısı çıkıyordu.
Got a volt-free relay board, wired in parallel with the old thermostat, and added heat.set to the profile. Switch works and shows the real state. The bit I was missing in code was the reply, without it every click said no answer after 30 seconds even though the heater came on.
Yapay zekâ tarafından English dilinden çevrildi ·
Eski termostatı paralel olarak yaklaşık 12 °C’ye ayarlı tutun; böylece internet veya kartınız devre dışı kalsa bile bina donmaz.
Keep the old thermostat set to something like 12 °C as frost protection in parallel, then if the internet or your board is out the building still won’t freeze.
- Bu konuyu yanıtlamak için giriş yapmış olmalısınız.
Sohbete katılın
Soru sormak ve yanıtlamak, yararlı gönderileri beğenmek ve sorununuzu çözen yanıtı işaretlemek için oturum açın. Her katkı puan ve seviye kazandırır.

