Yapay zekâ tarafından English dilinden çevrildi ·
cfg.* paylaşımlı öznitelikleri kullanın, tam olarak bunun için tasarlandılar ve istenen ile raporlanan değer karşılaştırmasını ek bir çaba olmadan elde edersiniz.Anahtarları profilin Configuration keys sekmesinde tanımlayın (tür, etiket, sınırlar), ardından bunları paylaşımlı öznitelik olarak ayarlayın: cfg.telemetry.interval_s, cfg.pressure.deadband_bar, cfg.ntp.server. Cihaz değişiklikleri v1/attributes/set üzerinden alır, uygular ve uygulanan değeri aynı anahtarla istemci özniteliği olarak geri bildirir. Hermetry ikisini karşılaştırır ve Attributes sekmesinde her anahtar için In sync, Pending, Rejected veya Drifted durumunu gösterir.Cihaz tarafında, her bağlantıdan sonra:
SUBSCRIBE v1/attributes/set
PUBLISH v1/attributes/req/1 {"sharedKeys": "cfg.*"}
# v1/attributes/res/1 üzerindeki yanıt -> hepsini uygula -> geri bildir:
PUBLISH v1/attributes {"cfg.telemetry.interval_s": 300, "cfg.pressure.deadband_bar": 0.05}
Kırsal sahalarınızı kapsayan şey bağlantıdan sonraki istektir: üç gündür çevrimdışı olan bir ünite geri geldiğinde tüm cfg.* anahtarlarını ister ve eksiklerini tamamlar. Bir ünite bir şeyi uygulayamazsa, bunu cfg_rejected içinde bildirin, örneğin {"cfg_rejected": {"cfg.ntp.server": "apply_failed"}}; satırda nedeniyle birlikte Rejected görünür. Uygulamayı idempotent yapın, bir mesaj iki kez gelebilir.300 ünite için, cihaz listesi üzerinde bir döngü içinde değerleri API ile yazın (POST …/attributes/shared, çağrı başına en fazla 100 anahtar). Temel değer ve toplu iş ekranları, ayar manifestosu yayınlayan cihazlar (lisanslı cihazlar) içindir; kendi yazılımınızla çalışan cihazlarda yol cfg.* üzerinden geçer. Durum tablosu için Attributes sayfasına bakın.
Use cfg.* shared attributes, that’s exactly what they’re for, and you get the desired-vs-reported view for free.
Declare the keys on the profile’s Configuration keys tab (type, label, limits), then set them as shared attributes: cfg.telemetry.interval_s, cfg.pressure.deadband_bar, cfg.ntp.server. The device gets changes on v1/attributes/set, applies them, and reports the applied value back as a client attribute with the same key. Hermetry compares the two and shows In sync, Pending, Rejected or Drifted per key on the Attributes tab.
Device side, after every connect:
SUBSCRIBE v1/attributes/set
PUBLISH v1/attributes/req/1 {"sharedKeys": "cfg.*"}
# answer on v1/attributes/res/1 -> apply everything -> report back:
PUBLISH v1/attributes {"cfg.telemetry.interval_s": 300, "cfg.pressure.deadband_bar": 0.05}
The request after connect is what covers your rural sites: a unit that was offline for three days asks for all cfg.* keys when it comes back and catches up. If a unit can’t apply something, report it in cfg_rejected, e.g. {"cfg_rejected": {"cfg.ntp.server": "apply_failed"}}, and the row shows Rejected with the reason. Apply idempotently, a message can arrive twice.
For 300 units, write the values with the API (POST …/attributes/shared, up to 100 keys per call) in a loop over the device list. The baseline and bulk-job screens are for devices that publish a settings manifest (licensed devices), so with your own firmware cfg.* is the route. Attributes page has the status table.

