create device_history if @event is 'heartbeat'