Retrieve device status - requestslibrary

I am using requestslibrary on genieacs server and get bunch of parameters. But i can’t find a field which tells us the status of the device. is there a way to check pinging status and device status using this library? I can see them from UI but need to retrieve them using a script

What data exactly are you trying to gather? Last inform time?

i was looking for one parameter that can give exact status of device at the time of query like “registered” or “online” or “offline”.
I was looking at previous discussions and it seems only option available for now is to check last inform time and periodic interval time and use the math to figure it out.
Let me know if there is a simple and straight forward way.

Math is the only way. GenieACS does not store the current connection state, nor should it. It knows when the CPE last connected.

When you do your math, give a 5 minute buffer between the different states. Example, I set my inform interval to 60 minutes. So when I’m displaying in the CPE state in our subscriber management platform, anything under 65 minutes is considered to be online. Anything from 65 minutes to 24 hours is indeterminate. And anything > 24 hours is offline.

Thank you. will go with that method.