---
title: "OscDevice"
description: "API documentation for OscDevice"
url: https://developer.disguise.one/python-api/docs/oscdevice/
---

# OscDevice

Sends OSC messages to one or more targets, and receives them from a single source.

See also: [Devices Guide](/plugins/guides/devices)

Base class (inherits properties and methods): _[Device](/python-api/docs/device#device)_

## Properties

#### **ipFromFilter** : _str_

Filter by sender IP. Leave blank for any IP.

_Category: Receive  
UserName: IP Filter_

#### **receivePort** : _int_

The IP address that d3 should receive OSC commands from

_Category: Receive  
UserName: Receive port_

#### **sendTargets** : _List\[[OscSendTarget](/python-api/docs/oscsendtarget#oscsendtarget)\]_

Addresses to send messages to

_UserName: Send Targets_

#### **supportsSendingMessageBundles** : _bool_

Does this device support receiving batches of multiple OSC messages in one bundle

_Category: Send  
UserName: Supports message bundles_

#### **verboseSend** : _int_

Output all sent messages to the console

_Options: {0: ‘No’, 1: ‘Yes’}  
Category: Send  
UserName: Verbose Sending_

## Methods

#### **addSendTarget**(self, label: _str_, address: _[IPAddress](/python-api/docs/ipaddress#ipaddress) | str_, port: _int_, enabled: _bool_)

Append a send target to the list. Every enabled, valid target receives every message sent through this device.

#### **clearSendTargets**(self)

Remove all send targets. The device will report “No targets configured” until at least one is added.

#### **removeSendTarget**(self, index: _int_)

Remove the send target at the given zero-based index. No-op if the index is out of range.

#### **send**(self, message: _OscMessage | str_)

Send an OSC message to all enabled targets. Queued for sending and called via main thread.
