Gateway Stats Through MQTT


I have a question regarding receiving the gateway statistics thought the MQTT broker. Once you subscribe to a gateways topic do you automatically receive the gateway statistics of that gateway? If so how do you know if the statistics are based on daily or monthly aggregate data for example?


Stats from a legacy Semtech packet forwarder gateway at least are non-cumulative, just counting since the last report. Try it with something like mosquitto-sub and watch for a bit… On some of my gateways I’ve actually subscribed to the stats from another process as an independent a round-trip connectivity check and use them to update a little OLED display where I do add up the per-report counts to create totals alongside system and Internet uptime.

As long as both the gateway and you stay connected to the broker you’ll keep getting them; if you have a programatic MQTT client you may need to implement reconnect logic to handle the occasional Internet hiccup.