Referring to devices with serial number instead of system ID in AirVantage


Hello all,

This is really more of an AirVantage specific question than a MangOH specific one but I figured some people here may have some ideas (and I was unable to find an AirVantage specific forum).

In essence, we receive message from AirVantage using the Google Cloud pubsub connector. The payload delivered by AirVantage only contains a “system ID” and no serial number. Our database stores device data by serial number instead of by AirVantage system ID, so we need a way to relate the two.

AirVantage has a REST API (and a Node client built around it) to support looking up serial numbers from system ID, but I’m concerned about how this is going to scale up. This would require either an extremely high amount of API requests, or some form of caching after initially retrieving the result. Additionally, we could face outages if the AirVantage REST API is down for whatever reason.

Is there anyway to configure AirVantage to put this in the payload, or am I stuck looking this up?

Any help is greatly appreciated.


What if when you ingest the message, you store the system id and attempt to lookup the serial number in another table that associates system id to serial number. If the lookup fails, you leave the serial number field blank and store the system id in a list of unresolved system ids. Then periodically you can go through the list of unresolved system ids and do lookups in AirVantage.

I’m a little bit concerned about the fact that system id and serial number might not be perfectly equivalent. For example if a system is created with a specific module and then the system is deleted and another one created with the same module. I am guessing that the system ids will differ, but the serial number will be the same. I don’t think it’s a huge issue, but you can’t assume that every system id will map to a unique serial number.


Hey David,

That’s a great point, and definitely an issue we’ve already run into (for example, deleting and re-registering a given serial number in AirVantage gives it a new system ID).

Unfortunately the way our back end is designed doesn’t really lend itself to periodic work (i.e server-less and event driven). That being said, maintaining a database entry to store a map of system ID to serial number is not the end of the world. I’m just really looking to cut down on I/O and external network traffic to keep this running fast and cheap.

I have yet to see anything in the AirVantage docs about API rate limiting, average up time, and response time. Would you be able to provide a rough idea or point me towards some docs for that?



Hey David,

I implemented this and it works pretty well. Bit of a runtime hit as average execution time of a single publish went from 100ms to 300ms but I think this will go back down now that it has results cached.

Thanks for the help!