erdems98
@erdem_s98 · Joined August 2025
Veri analisti · su ve atık su · sahada 17 yıl
- Topics
- 2
- Replies
- 8
- Points
- 0
Forum Replies Created
Since 2.2.0 the device page has a Log tab. Same data as the resourceType query above?
Translated from Türkçe by AI ·
With the complementary filter the delay has almost disappeared, and the team had already found an MPU6050 anyway. We also did the calibration and the left-right difference is gone. Doing last on the graph also got rid of the 180 nonsense. It was good that I read this post before trying Hakan Bey’s suggestion 🙂
Tamamlayıcı filtre ile gecikme neredeyse kayboldu, ekip bir MPU6050 bulmuştu zaten. Kalibrasyonu da yaptık, sağ-sol farkı gitti. Grafikte last yapınca 180 saçmalığı da bitti. Hakan Bey’in önerisini denemeden önce bu yazıyı okumuş olmam iyi oldu 🙂
Translated from Türkçe by AI ·
Yes, it’s the average of the last 20 readings. At 10 Hz it takes 2 seconds.
Evet, son 20 okumanın ortalaması. 10 Hz’de 2 saniye ediyor.
Translated from Türkçe by AI ·
The child gets the command, and the spot you’re stuck on is the ESP32 side. A command sent to a device behind the gateway comes down to the gateway over v1/gw/rpc, and shared attribute changes come over v1/gw/attributes. Your code most likely only listens on v1/rpc/req/+, which is for the gateway’s own commands. That’s why the command stays in Sent. I got stuck in the same place with the water stations too.Here’s what I did:
- Added the light.set command to the dimmers’ profile (not the gateway’s), Basic tier, parameter level (Number, 0-100).
- On the slider card: Run a command: Device = atolye-3 child, Command = light.set, for level The control’s value. I convert the 0-100 slider to 0-255 on the ESP32 side.
- Bound the Current value slot to the level telemetry of the same child, so the card shows the dimmer’s real value.
- For the light I turned off Ask before running, so it doesn’t ask for confirmation on every slide.
On the ESP32 side, after every connection, subscribe to v1/gw/rpc. Print the incoming message to the serial port first and look at its structure, then work out which child it’s for from there and do the BLE write:
mqtt.subscribe("v1/gw/rpc", 1);
void onMsg(char* topic, byte* payload, unsigned int len) {
if (strcmp(topic, "v1/gw/rpc") == 0) {
Serial.write(payload, len); // önce yapıya bak
Serial.println();
// child adını ve level'ı çöz:
// bleSetLevel(name, map(level, 0, 100, 0, 255));
}
}
The control card rules are here: Kontrol kartları
Child’a komut gidiyor, takıldığın yer ESP32 tarafı. Gateway arkasındaki bir cihaza gönderilen komut gateway’e v1/gw/rpc üzerinden iniyor, shared attribute değişiklikleri de v1/gw/attributes üzerinden. Senin kod büyük ihtimalle sadece v1/rpc/req/+ dinliyor, o da gateway’in kendi komutları için. Komut o yüzden Sent’te kalıyor. Ben de su istasyonlarında aynı yerde takılmıştım.
Yaptığım şey şöyle:
- light.set komutunu dimmer’ların profiline ekle (gateway’inkine değil), Basic tier, parametre level (Number, 0-100).
- Slider kartında Run a command: Device = atolye-3 child’ı, Command = light.set, level için The control’s value. 0-100 slider’ı ESP32 tarafında 0-255’e çeviriyorum.
- Current value slot’unu aynı child’ın level telemetrisine bağla, kart dimmer’ın gerçek değerini göstersin.
- Işık için Ask before running’i kapattım, her kaydırmada onay sormasın.
ESP32 tarafında her bağlantıdan sonra v1/gw/rpc‘ye abone ol. Gelen mesajı önce seri porta bastırıp yapısına bak, hangi child için geldiğini oradan çözüp BLE yazmasını yaparsın:
mqtt.subscribe("v1/gw/rpc", 1);
void onMsg(char* topic, byte* payload, unsigned int len) {
if (strcmp(topic, "v1/gw/rpc") == 0) {
Serial.write(payload, len); // önce yapıya bak
Serial.println();
// child adını ve level'ı çöz:
// bleSetLevel(name, map(level, 0, 100, 0, 255));
}
}
Kontrol kartlarının kuralları burada: Kontrol kartları
Translated from Türkçe by AI ·
+1. The default validity period of the key is 90 days, put it in your calendar, otherwise the page will silently come up empty after three months.
+1. Anahtarın varsayılan süresi 90 gün, takvime yaz, yoksa üç ay sonra sayfa sessizce boş gelir.
Translated from Türkçe by AI ·
Forget the port: if you put the device token on the page, anyone who views the page source can publish data in your device’s name with that token. Greenhouse temperature shows 80 degrees, your mom freaks out 🙂 Take the token out of there.
Port bir yana, cihaz token’ını sayfaya koyarsan sayfanın kaynağına bakan herkes o token ile senin cihazın adına veri basabilir. Sera sıcaklığı 80 derece görünür, annen panik olur 🙂 Token’ı oradan çıkar.
Translated from Türkçe by AI ·
The calculation clarified things a lot, thanks. I built the one by the window with a 0.5 W panel + 1 F supercap + BQ25570, it’s been two weeks without a battery, supercap_v doesn’t drop below 3.9 at night. On the others I switched to NTP + hourly batch sending, and the slope of battery_v fell from 25 mV per day to 6 mV per day. I buried the idea of the beehive and the washing machine 🙂
Hesap çok netleştirdi, teşekkürler. Pencere kenarındakini 0,5 W panel + 1 F süperkap + BQ25570 ile kurdum, iki haftadır pil yok, supercap_v geceleri 3,9’un altına inmiyor. Diğerlerinde NTP + saatlik dizi gönderime geçtim, battery_v eğimi günde 25 mV’den 6 mV’ye düştü. Petek ve çamaşır makinesi fikrini gömdüm 🙂
Translated from Türkçe by AI ·
The clock is not synchronised, but I don’t use NTP at all. I read somewhere that making up ts values is forbidden.
Saat senkron değil ama, NTP hiç yapmıyorum. ts uydurmak yasak diye okumuştum bir yerde.

