Yapay zekâ tarafından English dilinden çevrildi ·
Butonları koruyun. Kaydırıcı yalnızca cihazın Hermetry’ye bildirdiğini gösterebilir; bu yüzden ESP32, her harekettan sonra, butondan ya da komuttan gelmiş olsun, konumu bildirmek zorundadır.Geri zıplamanın Current value bağlantınızdan kaynaklandığından eminim. Kaydırıcının Current value yuvasının neye bağlı olduğunu kontrol edin. Yalnızca siz gönderdiğinizde değişen (ya da hiç değişmeyen) bir değeri okuyorsa, oraya geri döner. Bunu ESP32’nin kendisinin gönderdiği bir telemetri anahtarına bağlayın, örneğin damper1_pos.ESP32 üzerinde, her harekettan sonra:
void moveTo(int ch, int angle) {
angle = constrain(angle, 0, 90);
servo[ch].write(angle);
pos[ch] = angle;
char buf[48];
snprintf(buf, sizeof buf, "{"damper%d_pos":%d}", ch + 1, angle);
mqtt.publish("v1/telemetry", buf);
}
// button handler: moveTo(ch, pos[ch] + 15);
// command handler for damper.set: moveTo(ch, params["angle"]); then answer ok
Bizim için işe yarayan kaydırıcı ayarları: Minimum 0, Maximum 90, Step 15; böylece buton adımlarıyla eşleşir. Kaydırıcı, sürüklerken değil bıraktığınızda bir kez gönderir; servo böylece gereksiz yere bombardımana tutulmaz. Damper için Ask before running off seçeneğini açabilirsiniz; aksi halde resepsiyon her harekette bir onay penceresi alır. Komutu Basic seviyesinde bırakın, kart bundan yükseğini göndermez.Varsayılan olarak açık olan “Disable the control when the reading is old” seçeneği de var. ESP32 yalnızca değişiklikte bildiriyorsa ve saatlerce kimse dokunmadıysa kaydırıcı gri görünebilir. Konumu diğer okumalarla birlikte birkaç dakikada bir tekrarlamasını sağlayın.Kurulum adımları Control cards sayfasında.
Keep the buttons. The slider can only show what the device tells Hermetry, so the ESP32 has to report the position after every move, from a button or from a command.
I’d bet the jump-back is your Current value binding. Check what the slider’s Current value slot points at. If it reads something that only changes when you send (or nothing), it snaps back to that. Bind it to a telemetry key the ESP32 sends itself, for example damper1_pos.
On the ESP32, after any move:
void moveTo(int ch, int angle) {
angle = constrain(angle, 0, 90);
servo[ch].write(angle);
pos[ch] = angle;
char buf[48];
snprintf(buf, sizeof buf, "{"damper%d_pos":%d}", ch + 1, angle);
mqtt.publish("v1/telemetry", buf);
}
// button handler: moveTo(ch, pos[ch] + 15);
// command handler for damper.set: moveTo(ch, params["angle"]); then answer ok
Slider settings that worked for us: Minimum 0, Maximum 90, Step 15 so it matches the button steps. The slider sends once when you let go, not while dragging, so the servo isn’t spammed. For a damper you can turn Ask before running off, otherwise reception gets a confirm dialog on every move. Leave the command Basic tier, a board won’t send anything higher.
There’s also “Disable the control when the reading is old” on by default. If the ESP32 only reports on change and nobody touched it for hours, the slider may grey out. Have it repeat the position every few minutes with the other readings.
Setup steps are on Control cards.

