get_events function

Get the events for a device.