Yapay zekâ tarafından English dilinden çevrildi ·
Cihaz başına topic gerekmiyor. Hepsi aynı v1/telemetry topic’ine yayın yapar. Hermetry, cihazın giriş yaptığı kimlik bilgisinden kimin konuştuğunu bilir, dolayısıyla token fiilen adres görevi görür. 17 numaralı ünite, 18’in kimlik bilgisine sahip olmadığı için 18 adına yazamaz; bir cihaz yalnızca kendi downlink topic’lerine (v1/attributes/set, v1/rpc/req/+ vb.) abone olabilir, bu yüzden başka bir cihazın mesajlarını da hiç görmez. Tutulacak bir ACL dosyası yok.Kevin’in Custom topic’lerin var olduğu konusundaki haklılığı tartışılamaz, ancak bunlar değiştirilemeyen firmware için: profil bu durumda v1/ dışındaki her topic’i o cihazın telemetrisi olarak alır. Buradaki limitler topic derinliği 8, uzunluk 128 ve cihaz başına 50 farklı topic’tir; “Prefix keys with the topic” seçeneğiyle grid/s12/temp, grid.s12.temp gibi bir anahtara dönüşür. Yeni firmware yazdığınız için bunların hepsini atlayın.Saha kimliği için topic’in parçası yapmak yerine cihazın bir özniteliği olarak tanımlamanızı öneririm. Her dakika değişmediği için telemetriye ait değil.Tüm topic tablosunu içeren referans: MQTT topics and payload reference. Kendi cihazlarımı taşırken öğrendiğim pratik bir şey: her ünitenin kendi kimlik bilgisi olsun. Aynı token’ı paylaşan iki cihaz birbirinin bağlantısını sürekli koparır.
No per-device topics needed. All 300 publish to the same v1/telemetry. Hermetry knows who’s talking from the credential the device logged in with, so the token is effectively the address. Unit 17 can’t write as unit 18 because it doesn’t have 18’s credential, and a device can only subscribe to its own downlink topics (v1/attributes/set, v1/rpc/req/+ and so on), so it never sees another device’s messages either. No ACL file to keep.
Kevin’s not wrong that Custom topics exist, but they’re for firmware you can’t change: the profile then takes any topic outside v1/ as telemetry of that device. Limits there are topic depth 8, length 128 and 50 distinct topics per device, and with “Prefix keys with the topic” grid/s12/temp becomes a key like grid.s12.temp. Since you’re writing new firmware, skip all of that.
For the site id I’d make it an attribute of the device instead of part of the topic. It doesn’t change every minute so it doesn’t belong in telemetry.
Reference with the full topic table: MQTT topics and payload reference. One practical thing from when I moved my own stuff: give every unit its own credential. Two devices sharing one token keep kicking each other off.

