2.2.2: devices behind a gateway send data and take commands through it
2.2.2 is out today. For anyone running gateways: there is now a gateway API. Devices behind a gateway send their data and receive commands through it.
From the same release: the device profile editor sets the profile that new child devices get.
Docs: Gateways and devices behind a gateway for the overview, Devices behind a gateway for every topic and payload, and Commands to devices behind a gateway.
Firmware rollouts and device certificates are in 2.2.2 as well; Buğra and Kuray cover those.
Perfect timing. I have a Pi 4 reading six energy meters over RS-485 with pymodbus. Which topic do the readings go to, and do the meters need their own tokens?
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.
Mine connects fine and then gets disconnected after two or three gw messages. Plain device telemetry from the same box works.
Sounds like the device is not marked as a gateway. Three refused v1/gw/* topics in a minute close the session. Edit the device and turn on This device is a gateway.
That was it. Thanks Serhat.
How many children can one gateway carry? We have a line with roughly 300 Modbus slaves on two gateways.
The gateway profile’s Max children of a gateway is 500 by default, capped by your plan and by a platform ceiling of 1,000. Each child counts toward your device limit, so check that first with 300 children.
- You must be logged in to reply to this topic.
Join the conversation
Sign in to ask and answer, like helpful posts and mark the reply that solved your problem. Every contribution earns points and levels.

