Traducido del English por IA ·
Los medidores nunca reciben credenciales. La Pi inicia sesión como un solo dispositivo, y en ese dispositivo activas Este dispositivo es una pasarela. Su perfil debe usar el esquema de topics v1/ por defecto. Luego publica para los hijos con QoS 1, telemetría indexada por el nombre del hijo:
topic: v1/gw/telemetry
{
"Meter 1": {"values": {"kwh": 1203.4, "voltage": 229.8}},
"Meter 2": {"values": {"kwh": 88.1}}
}
Un hijo se crea la primera vez que la pasarela lo menciona. Envía v1/gw/connect con un type que sea exactamente el nombre de uno de tus perfiles si quieres que se asigne a ese perfil; de lo contrario, recibe el Profile of new children del perfil de la pasarela. Los comandos para un medidor llegan a la Pi por v1/gw/rpc.
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.

