Last device battery level (reading)
Posted: December 18th, 2018, 5:15 pm
Dear all,
I'm setting up a function able to inform enumerators when devices batteries run lower than 15%. I know that theses informations are stored in device_state_event table and battery level column...but i'm unable to select the newest (latest) record (reading) from this table...
Does it the select (min) or the select (max)?
Also, please can you add timestamp in this table? Or can you advise us how to link (join) this table with the ones containing timestamp?
Thanks in advance for your support!
I'm setting up a function able to inform enumerators when devices batteries run lower than 15%. I know that theses informations are stored in device_state_event table and battery level column...but i'm unable to select the newest (latest) record (reading) from this table...
Does it the select (min) or the select (max)?
Also, please can you add timestamp in this table? Or can you advise us how to link (join) this table with the ones containing timestamp?
Thanks in advance for your support!