Module pyatv.const

Constants used in the public API.

Classes

class DeviceModel (*args, **kwds)

Hardware device model.

Gen2-Gen4K are Apple TV model names and will be renamed to AppleTVGenX in the future.

Ancestors

  • enum.Enum

Class variables

var AirPortExpress = 7

Device model is AirPort Express (first generation).

var AirPortExpressGen2 = 8

Device model is AirPort Express (second generation).

var AppleTV4KGen2 = 9

Device model is sixth generation Apple TV (Apple TV 4K gen 2).

var AppleTV4KGen3 = 11

Device model is seventh generation Apple TV (Apple TV 4K gen 3).

var AppleTVGen1 = 13

Device model is first generation Apple TV.

var Gen2 = 1

Device model is second generation Apple TV (Apple TV 2).

var Gen3 = 2

Device model is third generation Apple TV (Apple TV 3).

var Gen4 = 3

Device model is fourth generation Apple TV (Apple TV 4).

var Gen4K = 4

Device model is fifth generation Apple TV (Apple TV 4K).

var HomePod = 5

Device model is HomePod (first generation).

var HomePodGen2 = 12

Device model is HomePod (second generation).

var HomePodMini = 6

Device model is HomePod Mini (first generation).

var Music = 10

Music app (or iTunes) running on a desktop computer.

var Unknown = 0

Device model is unknown.

class DeviceState (*args, **kwds)

All supported device states.

Ancestors

  • enum.Enum

Class variables

var Idle = 0

Device is idling, i.e. nothing is playing or about to play.

var Loading = 1

Media is being loaded but not yet playing.

var Paused = 2

Media is in paused state.

var Playing = 3

Media is playing.

var Seeking = 5

Media is seeking, e.g fast forward.

var Stopped = 4

Media is stopped.

class FeatureName (*args, **kwds)

All supported features.

Ancestors

  • enum.Enum

Class variables

var AccountList = 55

List of user accounts.

var Action = 64

Touch event to given coordinates.

var AddOutputDevices = 60

Add output devices.

var Album = 24

Album from playing artist.

var App = 35

App playing media.

var AppList = 38

List of launchable apps.

var Artist = 23

Artist of playing song.

var Artwork = 30

Playing media artwork.

var ChannelDown = 49

Select previous channel.

var ChannelUp = 48

Select next channel.

var Click = 65

Touch click command.

var ContentIdentifier = 47

Identifier for Content

var Down = 1

Down button on remote.

var EpisodeNumber = 42

Episode number of TV series.

var Genre = 25

Genre of playing song.

var Home = 14

Home/TV button.

var HomeHold = 15

Long-press home button (deprecated: use RemoteControl.home).

var LaunchApp = 39

Launch an app.

var Left = 2

Left button on remote.

var Menu = 11

Go back to previous menu.

var Next = 8

Change to next item.

var OutputDevices = 59

Current output devices.

var Pause = 6

Pause playing media.

var Play = 4

Start playing media.

var PlayPause = 5

Toggle between play/pause.

var PlayUrl = 31

Stream a URL on device.

var Position = 27

Current play time position.

var PowerState = 32

Current device power state.

var Previous = 9

Change to previous item.

var PushUpdates = 43

Push updates are supported.

var RemoveOutputDevices = 61

Remove output devices.

var Repeat = 29

Repeat state.

var Right = 3

Right button on remote.

var Screensaver = 58

Activate screen saver.

var SeasonNumber = 41

Season number of TV series.

var Select = 10

Select current option.

var SeriesName = 40

Title of TV series.

var SetOutputDevices = 62

Set output devices.

var SetPosition = 19

Seek to position.

var SetRepeat = 21

Change repeat state.

var SetShuffle = 20

Change shuffle state.

var SetVolume = 46

Set volume level.

var Shuffle = 28

Shuffle state.

var SkipBackward = 37

Skip backwards a time interval.

var SkipForward = 36

Skip forward a time interval.

var Stop = 7

Stop playing media.

var StreamFile = 44

Stream local file to device.

var Suspend = 17

Suspend device (deprecated; use Power.turn_off).

var Swipe = 63

Touch swipe from given coordinates and duration.

var SwitchAccount = 56

Switch user account.

var TextAppend = 53

Input text into virtual keyboard.

var TextClear = 52

Clear virtual keyboard text.

var TextFocusState = 57

Current virtual keyboard focus state.

var TextGet = 51

Get current virtual keyboard text.

var TextSet = 54

Replace text in virtual keyboard.

var Title = 22

Title of playing media.

var TopMenu = 16

Go to main menu.

var TotalTime = 26

Total length of playing media (seconds).

var TurnOff = 34

Turn off device.

var TurnOn = 33

Turn device on.

var Up = 0

Up button on remote.

var Volume = 45

Current volume level.

var VolumeDown = 13

Decrease volume.

var VolumeUp = 12

Increase volume.

var WakeUp = 18

Wake up device (deprecated; use Power.turn_on).

var iTunesStoreIdentifier = 50

iTunes Store Identifier for Content

class FeatureState (*args, **kwds)

State of a particular feature.

Ancestors

  • enum.Enum

Class variables

var Available = 3

Feature is supported and available.

var Unavailable = 2

Feature is supported by device but not available now.

Pause is for instance unavailable if nothing is playing.

var Unknown = 0

Feature is supported by device but it is not known if it is available or not.

var Unsupported = 1

Device does not support this feature.

class InputAction (*args, **kwds)

Type of input when pressing a button.

Ancestors

  • enum.Enum

Class variables

var DoubleTap = 1

Press and release twice quickly.

var Hold = 2

Press and hold for one second before releasing.

var SingleTap = 0

Press and release quickly.

class KeyboardFocusState (*args, **kwds)

All supported keyboard focus states.

Ancestors

  • enum.Enum

Class variables

var Focused = 2

Keyboard is focused.

var Unfocused = 1

Keyboard is not focused.

var Unknown = 0

Keyboard focus state is not determinable.

class MediaType (*args, **kwds)

All supported media types.

Ancestors

  • enum.Enum

Class variables

var Music = 2

Media type is music.

var TV = 3

Media type is a TV show.

var Unknown = 0

Media type is not known.

This can be either the case that nothing is playing or the app does not report a valid media type.

var Video = 1

Media type is video.

class OperatingSystem (*args, **kwds)

Operating system on device.

Ancestors

  • enum.Enum

Class variables

var AirPortOS = 3

Operating system is AirPortOS.

This OS is used by AirPort Express devices. It is not an official name but made up in pyatv as no official name has been found.

var Legacy = 1

Operating system is Apple TV Software (pre-tvOS).

var MacOS = 4

Operating system is macOS.

var TvOS = 2

Operating system is tvOS.

var Unknown = 0

Operating system is not known.

class PairingRequirement (*args, **kwds)

Pairing requirement for a service.

Ancestors

  • enum.Enum

Class variables

var Disabled = 2

Pairing is disabled by protocol.

var Mandatory = 5

Pairing must be performed.

var NotNeeded = 3

Pairing is not needed.

var Optional = 4

Pairing is supported but not required.

var Unsupported = 1

Not supported by protocol or not implemented.

class PowerState (*args, **kwds)

All supported power states.

Ancestors

  • enum.Enum

Class variables

var Off = 1

Device is turned off (standby).

var On = 2

Device is turned on.

var Unknown = 0

Power state is not determinable.

class Protocol (*args, **kwds)

All supported protocols.

Ancestors

  • enum.Enum

Class variables

var AirPlay = 3

Protocol constant representing AirPlay.

var Companion = 4

Protocol constant representing Companion link.

var DMAP = 1

Protocol constant representing DMAP.

var MRP = 2

Protocol constant representing MRP.

var RAOP = 5

Protocol constant representing RAOP.

class RepeatState (*args, **kwds)

All supported repeat states.

Ancestors

  • enum.Enum

Class variables

var All = 2

Repeat all tracks or items.

var Off = 0

Repeat is off.

var Track = 1

Repeat current track or item.

class ShuffleState (*args, **kwds)

All supported shuffle states.

Ancestors

  • enum.Enum

Class variables

var Albums = 1

Shuffle on album level.

var Off = 0

Shuffle is off.

var Songs = 2

Shuffle on song level.

class TouchAction (*args, **kwds)

Touch action constants.

Ancestors

  • enum.Enum

Class variables

var Click = 5
var Hold = 3
var Press = 1
var Release = 4