--- title: "system.perspective.vibrateDevice" description: "Cause a device running the Perspective Mobile App to vibrate." --- # system.perspective.vibrateDevice > Cause a device running the Perspective Mobile App to vibrate. This function is used in **Python Scripting**. ## Description When called from the [Perspective App](ignition-modules\perspective\perspective-sessions\ignition-perspective-app.md), will cause the device to vibrate for the specified number of milliseconds. :::note iOS vibration duration is fixed. This function will cause an iOS device to vibrate for its default duration, 0.4 seconds (400 milliseconds). ::: ## Syntax `system.perspective.vibrateDevice(integer, [sessionId])` ### Parameters Type | Parameter | Description ------- | ------- | ------ String | `duration`| The duration in milliseconds to vibrate the device.**Note:** iOS vibration duration is fixed. Thus, this parameter will not impact the vibration duration on devices running iOS. String | `sessionId` | Identifier of the Session to target. If omitted, the current Session will be used automatically. ### Returns Nothing ### Scope Gateway, Perspective Session :::note This function will only work in the Gateway scope if `sessionId` is supplied to the call. ::: ## Code Examples ```python title="Code Snippet - View" # Vibrates the device for 1/2 second (500 milliseconds). system.perspective.vibrateDevice(500) ```