Yapay zekâ tarafından English dilinden çevrildi ·
Sayaçlar hiçbir zaman kimlik bilgisi almaz. Pi, tek bir cihaz olarak oturum açar ve bu cihazda Bu cihaz bir gateway’dir seçeneğini etkinleştirirsiniz. Profilinin varsayılan v1/ topic şemasını kullanması gerekir. Ardından QoS 1 ile alt cihazlar için yayın yapar, telemetriyi alt cihazın adıyla anahtarlanmış olarak gönderir:
topic: v1/gw/telemetry
{
"Meter 1": {"values": {"kwh": 1203.4, "voltage": 229.8}},
"Meter 2": {"values": {"kwh": 88.1}}
}
Bir alt cihaz, gateway onu ilk kez andığında oluşturulur. Belirli bir profile atanmasını istiyorsanız, type alanı profillerinizden birinin adıyla tam olarak aynı olan bir v1/gw/connect mesajı gönderin; aksi halde gateway profilinin Yeni alt cihazların profili ayarında belirtilen profili alır. Bir sayaca yönelik komutlar v1/gw/rpc üzerinden Pi’ye ulaşır.
The meters never get credentials. The Pi logs in as one device, and on that device you turn on This device is a gateway. Its profile must use the default v1/ topic scheme. Then it publishes for the children with QoS 1, telemetry keyed by the child’s name:
topic: v1/gw/telemetry
{
"Meter 1": {"values": {"kwh": 1203.4, "voltage": 229.8}},
"Meter 2": {"values": {"kwh": 88.1}}
}
A child is created the first time the gateway mentions it. Send v1/gw/connect with a type that is exactly the name of one of your profiles if you want it to land on that profile; otherwise it gets the gateway profile’s Profile of new children. Commands for a meter reach the Pi on v1/gw/rpc.

