-
-
Notifications
You must be signed in to change notification settings - Fork 4
Shortcuts
The shortcut actions supported for a TV accessory are:
- Get the state of HomeName
- Control HomeName
Shortcut actions are part of the iOS operating system and are thus under the control of Apple. Only Apple can add more actions.
To see the available actions, search for Home in the Shortcuts app or the Home app. Select the desired action from the displayed list to use it.
Displays initially as Get Accessory State. Tap on Accessory State
to select the desired accessory, then select on the displayed characteristic to select the desired characteristic. Supported accessory characteristics for the set-top box are:
The set-top box current power state, On or Off. One of 0 (INACTIVE) or 1 (ACTIVE). Note that shortcuts displays Off
for INACTIVE (instead of 0), and On
for ACTIVE (instead of 1). See https://developers.homebridge.io/#/characteristic/Active
The set-top box current selected channel, 0 is the first in the list, 1 the next, and so on. Input 999 is used when the input is unknown. See https://developers.homebridge.io/#/characteristic/ActiveIdentifier
The set-top box current closed captions state, one of 0 (DISABLED) or 1 (ENABLED). See https://developers.homebridge.io/#/characteristic/ClosedCaptions
The set-top box name. See https://developers.homebridge.io/#/characteristic/ConfiguredName
IN DEVELOPMENT NOVEMBER 2022 The set-top box current selected channel name. This is a custom characteristic. The name is always populated even if the channel is not in the device channel list. In Shortcuts, it appears with the name Custom.
The set-top box current media state, one of 0 (PLAY), 1 (PAUSE), 2 (STOP), 4 (LOADING) or 5 (INTERRUPTED). LOADING is set when current program is playing at negative speeds (rewind) or positive speeds (fast-forward). See. https://developers.homebridge.io/#/characteristic/CurrentMediaState
IN DEVELOPMENT NOVEMBER 2022 Due to Apple HomeKit restrictions, all custom characteristics appear with the name Custom in the Shortcuts app. The Shortcuts app allows you to read custom characteristics. To identify a custom characteristic in the Shortcuts app, select each in turn and observe the value to determine which custom characteristic it is.
This plugin contains the following custom characteristics:
- Current Channel Name, which contains the current channel name.
The set-top box current usage state, one of 0 (NOT_IN_USE) or 1 (IN_USE). A set-top box is in use when it is turned on, or when it is turned off and is still recording to the local hard drive (if fitted). Intended as an indicator to show when the set-top box can be disconnected from power without interrupting hard drive recording. Added in v1.3.0. See https://developers.homebridge.io/#/characteristic/InUse
The set-top box current input device type, to indicate if playing live TV a recording. One of 0 (1 (TV) for linear TV and the review buffer, 2 (TUNER) for radio stations, and 4 (PLAYBACK) for replay TV or local or network recordings. Other values are not used. Added in v1.3.0. See https://developers.homebridge.io/#/characteristic/InputDeviceType
The set-top box current source type, one of 0 (OTHER) for replay TV and radio, 3 (TUNER) for linear TV, and 10 (APPLICATION) for apps such as Netflix, YouTube. Other values are not used. See https://developers.homebridge.io/#/characteristic/InputSourceType
The set-top box name as at last restart of Homebridge. See https://developers.homebridge.io/#/characteristic/Name
The set-top box picture mode, always 1 (STANDARD). See https://developers.homebridge.io/#/characteristic/PictureMode
NOTE: A customPicturemode was previously used together with this characteristic. As of v1.3.0, customPictureMode is replaced by In Use, and as of v2.0.0 customPictureMode has been removed (deprecated).
Menu command sent by the accessory. For control only. If Shortcuts tries to get the state of this characteristic then the error Operation is not supported
is displayed. See https://developers.homebridge.io/#/characteristic/PowerModeSelection
The set-top box scheduled recording mode, one of 0 (NO_PROGRAM_SCHEDULED), 1 (PROGRAM_SCHEDULED), or 2 (PROGRAM_SCHEDULED_MANUAL_MODE_). 0 when no recording is scheduled, otherwise 1 when some recording is scheduled (at any time in the future). Useful to indicate if a recording is planned. Added in v1.3.0. See https://developers.homebridge.io/#/characteristic/ProgramMode
Remote control keys sent by the Apple TV Remote. For control only. If Shortcuts tries to get the state of this characteristic then the error Operation is not supported
is displayed. See https://developers.homebridge.io/#/characteristic/RemoteKey
The set-top box sleep discovery mode, indicates whether the box can be found when sleeping (powered off). One of 0 (NOT_DISCOVERABLE) or 1 (ALWAYS_DISCOVERABLE). Set by default to 1. See https://developers.homebridge.io/#/characteristic/SleepDiscoveryMode
The set-top box current working status. ACTIVE when the set-top box is working without errors, meaning it is connected to the network and is reachable, or NOT_ACTIVE if the box is not reachable. Useful to indicate if the box is physically powered on and working normally. Is visible in the accessory Settings. One of 0 (NOT_ACTIVE) or 1 (ACTIVE). Note that shortcuts display this characteristic in IF actions as two values: Is Active
and Is Not Active
. Added in v1.3.0. See https://developers.homebridge.io/#/characteristic/StatusActive
The set-top box general fault status. NO_FAULT when box is connected to the mqtt service, or GENERAL_FAULT if the backend servers are not reachable or the mqtt service has become disconnected for any reason, meaning that the box cannot be controlled. One of 0 (NO_FAULT) or 1 (GENERAL_FAULT). Note that shortcuts displays No
for NO_FAULT (instead of 0), and Yes
for GENERAL_FAULT (instead of 1). Added in v1.3.0. See https://developers.homebridge.io/#/characteristic/StatusFault
The set-top box target media state, one of 0 (PLAY), 1 (PAUSE) or 2 (STOP). See https://developers.homebridge.io/#/characteristic/TargetMediaState
Displays initially as Set Scenes and Accessories. Tap on Scenes and Accessories
to select the desired accessory.
You can only control the items accessible through the Home app accessory tile. Unfortunately, this is an Apple limitation. Hopefully Apple will improve Shortcut’s control in the future. Press and hold to adjust the accessory. Supported accessory control capabilities for the set-top box are:
The power button. Power state, On or Off. See https://developers.homebridge.io/#/characteristic/Active
The channel list (also known as the input list). In the channel list, the Active Identifier 0 is the first channel in the list, 1 the next, and so on. See https://developers.homebridge.io/#/characteristic/ActiveIdentifier
The set-top box can also be controlled by the Apple TV Remote. In the Shortcuts app, search for Apple TV Remote action category, then select Show Remote Control.
Running the action Show remote control for (Apple TV) will open the Apple TV Remote. Apple TV
is shown to indicate you should select an Apple TV, but you do not have to. Leave the Apple TV input empty, or pass an empty Magic Variable to open the remote control with the last used device selected.
NOTE: Opening the Apple TV Remote with no Apple TV selected was working in iOS 14, but behavior has changed in iOS 15 and iOS 16. When running Show remote control for (Apple TV) with no Apple TV selected, an error is now displayed: "Could Not Run Show Remote Control - An unknown error occurred"
Home | FAQ | KeyEvents | Key Macros | Siri | Shortcuts | Automations | TV Volume Control