We are developing plugin and do you know how to get status of device like online and offline through Item object of MIP SDK 2021R2

Status Viewer sample might be helpful for you –

https://doc.developer.milestonesys.com/html/index.html?base=samples/componentsamples/statusviewer/readme.html&tree=tree_2.html

The sample is a standalone sample but the methods could be used in a Smart Client plugin.