Developer: | Glenn's Plugins Like this plugin? Show your appreciation! |
Category: | A/V and IR Equipment |
Github: | Github Repo |
Assistance: | Get help! Check the online documentation |
Plugin ID: | com.GlennNZ.indigoplugin.appleTV |
Latest release: | v1.4.7 released on Sept. 17, 2024 |
Requires: | Indigo v2023.2.0 or higher |
(Check the Releases tab below for older releases that may have different requirements) | |
Download latest release |
Instructions Updated for Version 1.2.0:
Fixes play URL command for >OS16.4 - can't get BI camera streams working, but https:// mp4 and mu38 play well. (if particularly file doesn't play will relate to compatible file settings)
Adds Airplay2 Speaker Support - allows playback of file to all Airplay2 devices. Allows creation of indigo device for Airplay2 Speaker, and then file playback to these devices, including all Sonos Speakers that I have tested. (Note does not allow control of Airplay2 devices, just playback, further control will likely follow)
It uses the pyatv library (many thanks!) and this needs to be installed via a pip3 terminal command before usage. (Packaging it wasn't an option unfortunately as to many depencencies)
https://github.com/postlund/pyatv
It use the pyatv Push Listeners for playback activities to be immediately 'pushed' to the plugin devices. No polling required. This means if have lights dimming up on pause - it should happen immediately!
Potential Uses:
Create Indigo devices for Speakers, appleTVs or Homepods. Pair you appleTV and HomePod devices. Once paired, Indigo receives immediate updates on status/play/pause being the most basic.
Enables: 1. Dim Lights on playback, turn on lights with pause with immediate response 2. Launch a particularly App on the appleTV, via Indigo as action 3. Annouce across one or all HomePods - either a mp3 file, or a Device State/Variable or text which will be read out in the current OSX system voices. 4. Playback mp3 files to Airplay2 speakers eg. Sonos and cheaper equivalents...
Download and double click Plugin Bundle
Potential issue:
You may need to install Command line tools for Xcode. It is because of the dependencies of pyatv is miniaudio which requires Clang to be installed to compile.
See FAQ at bottom of this page if ongoing issues
Can try: The below terminal command - if also fails see FAQ for manual method.
xcode-select —install
This one above. Press the "Generate AppleTV Devices" - with some options if devices not found.
Options:
Force Discovery of all Devices:
This seems to be required for more new OS devices. Default should be enabled.
This will create indigo devices for all airplay devices the plugin via library pyatv can find.
Now Homepods will be appropriately named and created, as will all Airplay2 compatible devices.
Scan a single IP address If your device is not found without using this option, you can enter its IP address and being a unicast scan based on IP This is more robust that a wider network multicast scan. If you device is not found with multicast, but correctly found with unicast you should assign it a fixed IP address (in your router level - outside of plugin) If not, when it's IP changes the plugin may loose it altogether.
Generate AppleTV Devices Using the options above. This will search your network for appleTV device and generate plugin Devices corresponding. These devices will be located in Indigo's main device folder, but can be moved anywhere you like later. You can re-press and re-press the button (if you like), and new devices should not be duplicated (unless you have deleted them)
Following the above generation of devices, all devices will be in the main Indigo Device directory. Once created they can be moved to whereever makes sense.
Next go to a Device:
Open a device, with the Edit Device Details
You should see the above.
Since OS16 and Apple4k you will need to pair your indigoplugin Device with your appleTV
Some devices do not need to be paired (such as Homepods), but they still need to be connected.
The Start Connection button below will setup them up for use
Press the Start Connection Button. And keep an eye on the Indigo Log where info will be displayued.
The plugin should find and connect to your appleTV device, or Homepod.
If a pincode is needed the Indigo log will let you know. If not needed when prompted press SAVE and close the dialog.
Otherwise on the appleTV device - A pincode should be displayed on the screen of the appleTV device.
Enter the Pincode in the box, and press submit Pincode (Press) Button.
You should receive confirmation that pairing has been successful in the log.
Press the SAVE button on the Config Dialog.
(I believe we need to do this only once... but time will tell...)
For Homepods:
Simply press the Start Connection button, observe the indigo log for confirmation of setup and then click Save, once given okay to do so.
I expose a number of playback states (Thanks Karl for the typing on these!)
You will also see the device is an Indigo Relay - so there are Turn On/Turn Off/Toggle buttons that power down/power on the relevant appleTV. (caveat here is power reporting is not perfect)
I have choosen to exposes all command options supplied by very helpful pyatv library. We Progammatically creates command menu, so if more options with library updates, down the track should be immediately available. Allows sending of arguments with remote command To enable: Seeking to set position Set Volume (if supported) and Play URL
For most commands the optional arguments should be left blank, however can select double tap, hold etc. as per the Dialog
I have also implemented Launch App - which allows you to launch a specific application of the appleTV.
Unfortunately it doesn't allow LiveTV within the app, or more detailed control - but this can be managed with a lauchApp command, and then, left, down, down, select remote commands for example
This AG will save the current artwork for the selected appleTV if it exists.
Add an Action Group to Send Text to Speech annoucement to HomePods with current OSX System voice (Change current voice in Macs OSX settings voices)
Allows Device and Variable subsitution so can read weather forcast etc. depending on setup
NEEDS ffmpeg (included in plugin), need to run quaranatine command on new install
Converts text to speech with system say command and then converts to mp3 for playback. Add a slight delay but seems to be under a second in my testing.
This enables Homepod playback of a mp3 file. There are quite specific file aspects that the HomePods like, primarly mp3.
Stream_File, or the Remote setting:
"Stream local file or remote file to device"
e.g: Optional Argumment: https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3
or Local file: (like) /Users/Indigo/Desktop/doorbell-1.mp3
You can pre-generate yuou own voice files as needed, if do not wish to use the action Group as above:
To do so
To generate voice file:
In terminal
say "Person arrived Home" -o personhome.aiff
This aiff generated file needs to be converted to mp3 files ffmpeg, which is a commandline tool can convert say generated aiff
The follow command gives appropriate mp3 output to use.
ffmpeg -i Input.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 Output.mp3
Use Output.mp3 in the "Stream local file or remote file to device"
Fails - with some red lines and an error about a dependency miniaudio (which we don't use...) It appears to want to install some x-code "command line developer tools" -- commandline tools - to help build this dependency. Install the xcode components, appears to be usr/bin/clang and hopefully will able to be installed.
Oh No - it looks like needs 14gig of Xcode for this to work. What a pain. Try: https://developer.apple.com/download/more/ Login and download Command Line Tools for Xcode and install.
The above worked for my production machine - which hit this issue. (avoided Xcode install thankfully)
Currently I expose all airplay devices - Sonos included. I do not believe these can be controlled or report status. Confimred these use AirPlay2 which has not been reverse engineered, we use Airplay1 here. The AppleTV devices are those we are aiming to support here. No longer - by default only appleTV devices are generated. Use the forceDiscovery option to enable creation of all devices found.
This gives a few options of logging information for particuarly appletv that may help troubleshooting issues
See here for more related to pyatv library
Released on: | Sept. 17, 2024 |
Requires: | Indigo v2023.2.0+ |
Download this release |
OS18 appears to recreate MAC addresses of devices - hence difficult to identify device as MAC was used as the unique identifier. This versions add ability to force Connection/Force update with the Device Edit screen if this has happened, or happens in the future. Removes need to delete and recreate device - which would remove triggers/Actions etc.
OS18 Apple TVOS Update
New MenuItems: - Add a unicast single IP address scanner as finds devices wider network does not. Including newer appleTV on OS18 I have found. - Log all found devices
New action Group - Add Action group to set IP address of device. - To be used if rare occasion have not set a static IP address and MAC address now changed (OS18) Set it once - and then force reconnection which will update MAC_
Update pyatv library Library Updates - use pyatv latest.
Specify every pyatv requirement to fix version numbering to avoid future issues with other breaking library updates Fix for pyatv using the new incompatible version of cryptography
Released on: | Jan. 25, 2024 |
Requires: | Indigo v2023.2.0+ |
Download this release |
Fixs pyatv packaging incorrect, newest, and now incompatible version of crytography
1.2.25 Update pyatv to 14.5 (latest) Fixing a few connection bugs, and timeout exceptions hopefully impacting reported issue with 1.2.20 Use pyatv FileStorage to store credentials (still saving with devices currently - but enables moving from this in future)
Released on: | Jan. 25, 2024 |
Requires: | Indigo v2023.2.0+ |
Download this release |
AppleTV, HomePod and Airplay2 Speaker Plugin for Indigo
Update pyatv to 14.5 (latest) Fixing a few connection bugs, and timeout exceptions hopefully impacting reported issue with 1.2.20 Use pyatv FileStorage to store credentials (still saving with devices currently - but enables moving from this in future)
Released on: | Jan. 17, 2024 |
Requires: | Indigo v2023.2.0+ |
Download this release |
AppleTV, HomePod and Airplay2 Speaker Plugin for Indigo
Move all dependencies to requirements.txt No need for xattr commands Create and use pypi library, homekitlink_ffmpeg library for automatic install of ffmpeg. Pypi Library Homekitlink-ffmpeg
1.2.3 Add ffmpeg Logging Menu options to check last command error
1.2.2 Increase timeout for Start Connection to 90secs
1.2.1 Bump pyatv library to 0.13.4
Released on: | Aug. 6, 2023 |
Requires: | Indigo v2022.1.2+ |
Download this release |
AppleTV, HomePod and Airplay2 Speaker Plugin for Indigo
appleTV plugin for Indigo - supporting appleTVs, HomePods and Airplay2 compatible devices... Enabling real-time updating of status, play/pause, volume etc.
Updated main Readme for version 1.2.0
Changes since 1.0.1 Release
Requires pyatv 0.,13.3 -- now released
Please run:
pip3 install pyatv --upgrade
Support Library updates: Big Ticket Changes
Fixes play URL command for >OS16.4 - can't get BI camera streams working, but https:// mp4 and mu38 play well. (if particularly file doesn't play will relate to compatible file settings)
Adds Airplay2 Speaker Support - allows playback of file to all Airplay2 devices. Allows creation of indigo device for Airplay2 Speaker, and then file playback to these devices, including all Sonos Speakers that I have tested. (Note does not allow control of Airplay2 devices, just playback, further control will likely follow)
Better power state reporting, now seems robust Improved audio buffering Support for changing output device in tvOS Support for activating screensaver Listnener interface for volume updates Text/Keyboard Input API Updated Device types, Apple4kGen3, Homepods etc Use pure audio frames, rather than ALAC frames improving performance Ability to set own artwork when streaming Bitarray dependency dropped macOS added as Operating System
Released on: | March 26, 2023 |
Requires: | Indigo v2022.1.2+ |
Download this release |
Hi all,
This is a indigodomo python3 appleTV plugin for remote control and monitoring of activities of your appleTV and HomePod devices.
It uses the pyatv library (many thanks!) and this needs to be installed via a pip3 terminal command before usage. (Packaging it wasn't an option unfortunately as to many depencencies)
It use the pyatv PushListeners for playback activities to be immediately 'pushed' to the plugin devices. No polling required. This means if have lights dimming up on pause - it should happen immediately!
Notable Uses:
Pair you appleTV and HomePod devices. Once paired, Indigo receives immediate updates on status/play/pause being the most basic.
Enables: 1. Dim Lights on playback, turn on lights with pause with immediate response 2. Lauch a particularly App on the appleTV, via Indigo as action 3. Annouce across one or all HomePods - either a mp3 file, or a Device State/Variable or text which will be read out in the current OSX system voices.
But before anything
In a terminal window enter:
pip3 install pyatv
Double click the release indigoplugin File and install.
All going well - nothing will happen...
Return to the terminal window and copy and paste the below:
This removes the apple quarantine bit for downloaded files and is needed for full function, used in this plugin for ffmpeg and conversion of audio files. Very annoyingly unlike the pip3 command it is needed everytime you upgrade!
Arghh.. Apple...
sudo xattr -rd com.apple.quarantine /Library/Application\ Support/Perceptive\ Automation/Indigo\ 2022.1/Plugins
If you get a ton of red/errors.
You will need to install Command line tools for Xcode. It is because of the dependencies of pyatv is miniaudio which requires Clang to be installed to compile.
See FAQ at bottom of this page if ongoing issues
Can try: The below terminal command - if also fails see FAQ for manual method.
xcode-select —install
This one above. Press the "Generate AppleTV Devices" - with some options if devices not found.
Options:
Force Discovery of all Devices:
This seems to be required for more new OS devices.
This will create indigo devices for all airplay devices the plugin via library pyatv can find. Any non-appleTV or Homepods (untested) will not function and ideally should be deleted. (often these will be Sonos devices or airplay amplifiers). These are not supported as use Airplay2.
This is needed for the newer appleTV devices which are registered as yet such as 4k Gen 3 appleTV
Scan a single IP address If your device is not found without using this option, you can enter its IP address and being a unicast scan based on IP This is more robust that a wider network multicast scan. If you device is not found with multicast, but correctly found with unicast you should assign it a fixed IP address (in your router level - outside of plugin) If not, when it's IP changes the plugin may loose it altogether.
Generate AppleTV Devices Using the options above. This will search your network for appleTV device and generate plugin Devices corresponding. These devices will be located in the main device folder, but can be moved anywhere you like later. You can re-press and re-press the button (if you like), and new devices should not duplicate.
Following the above generation of devices, all devices will be in the main Indigo Device directory. Once created they can be moved to whereever makes sense.
Next go to a Device:
Open a device, with the Edit Device Details
You should see the above.
Since OS16 and Apple4k you will need to pair your indigoplugin Device with your appleTV
Some devices do not need to be paired (such as Homepods), but they still need to be connected. The Start Connection button below will setup them up for use
Press the Start Connection Button. And keep an eye on the Indigo Log where info will be displayued.
The plugin should find and connect to your appleTV device, or Homepod.
If a pincode is needed the Indigo log will let you know. If not needed when prompted press SAVE and close the dialog.
Otherwise on the appleTV device - A pincode should be displayed on the screen of the appleTV device.
Enter the Pincode in the box, and press submit Pincode (Press) Button.
You should receive confirmation that pairing has been successful in the log.
Press the SAVE button on the Config Dialog.
(I believe we need to do this only once... but time will tell...)
For Homepods:
Simply press the Start Connection button, observe the indigo log for confirmation of setup and then click Save.
I expose a number of playback states (Thanks Karl for the typing on these!)
You will also see the device is an Indigo Relay - so there are Turn On/Turn Off/Toggle buttons that power down/power on the relevant appleTV. (caveat here is power reporting is not perfect)
I have choosen to exposes all command options supplied by very helpful pyatv library. We Progammatically creates menu, so if more options with library updates, down the track should be immediately available. Allows sending of arguments with remote command To enable: Seeking to set position Set Volume (if supported) and Play URL
For most commands the optional arguments should be left blank, however can select double tap, hold etc. as per the Dialog
I have also implemented Launch App - which allows you to launch a specific application of the appleTV.
Unfortunately it doesn't allow LiveTV within the app, or more detailed control - but this can be managed with a lauchApp command, and then, left, down, down, select remote commands for example
This AG will save the current artwork for the selected appleTV if it exists.
Add an Action Group to Send Text to Speech annoucement to HomePods with current OSX System voice (Change current voice in Macs OSX settings voices)
Allows Device and Variable subsitution so can read weather forcast etc. depending on setup
NEEDS ffmpeg (included in plugin), need to run quaranatine command on new install
Converts text to speech with system say command and then converts to mp3 for playback. Add a slight delay but seems to be under a second in my testing.
This enables Homepod playback of a mp3 file. There are quite specific file aspects that the HomePods like, primarly mp3.
Stream_File, or the Remote setting:
"Stream local file or remote file to device"
e.g: Optional Argumment: https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3
or Local file: (like) /Users/Indigo/Desktop/doorbell-1.mp3
You can pre-generate yuou own voice files as needed, if do not wish to use the action Group as above:
To do so
To generate voice file:
In terminal
say "Person arrived Home" -o personhome.aiff
This aiff generated file needs to be converted to mp3 files ffmpeg, which is a commandline tool can convert say generated aiff
The follow command gives appropriate mp3 output to use.
ffmpeg -i Input.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 Output.mp3
Use Output.mp3 in the "Stream local file or remote file to device"
Fails - with some red lines and an error about a dependency miniaudio (which we don't use...) It appears to want to install some x-code "command line developer tools" -- commandline tools - to help build this dependency. Install the xcode components, appears to be usr/bin/clang and hopefully will able to be installed.
Oh No - it looks like needs 14gig of Xcode for this to work. What a pain. Try: https://developer.apple.com/download/more/ Login and download Command Line Tools for Xcode and install.
The above worked for my production machine - which hit this issue. (avoided Xcode install thankfully)
Currently I expose all airplay devices - Sonos included. I do not believe these can be controlled or report status. Confimred these use AirPlay2 which has not been reverse engineered, we use Airplay1 here. The AppleTV devices are those we are aiming to support here. No longer - by default only appleTV devices are generated. Use the forceDiscovery option to enable creation of all devices found.
This gives a few options of logging information for particuarly appletv that may help troubleshooting issues
See here for more related to pyatv library
Released on: | Dec. 10, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
Add Action Group to Send Text to Speech annoucement to HomePods with current OSX System voice (Change current voice in OSX settings voices)
Allows Device and Variable subsitution so can read weather forcast etc. depending on setup
NEEDS ffmpeg (included in plugin), likely to need quaranatine command run on new install Add messaging for this. Converts text to speech with system say command and then converts to mp3 for playback. Add a slight delay but seems to be under a second in my testing.
Add support for Homepod and potentially other devices...
Notes for HomePods
These devices do not need to be paired - but once created setup the connect in the Device Edit screen
Play_URL for Homepod reports unsupported.
However Stream_File, or the Remote setting:
"Stream local file or remote file to device"
Works
Optional Argumment: https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3
or Local file: (like) /Users/Indigo/Desktop/doorbell-1.mp3 Works.
To generate voice file:
In terminal
say "Person arrived Home" -o personhome.aiff
Needs mp3 files ffmpeg commandline tool can convert say generated aiff
ffmpeg -i Input.aiff -f mp3 -acodec libmp3lame -ab 192000 -ar 44100 Output.mp3
Tempted to add a Action Group to automate all this.. (done in 0.1.9 above)
Homepod: Appears Pause/Play toggle button unsupported.
But volume control and seperate play, and Pause button function fine.
The above Stream file means can use TTS and play your own mp3 files as annoucement action Groups
Released on: | Dec. 1, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
0.0.23 Move to unicast connection for those devices that have a IP (may help with intermittent connection issues) Alternate back to multicast after 3 failures. Messaging around commands being sent with arguments when they shouldn't Move back to standard indigo file Logging given issue resolved.
0.0.24 Remove support for MRP disabled in OS16 and causes authentication failures
0.0.25 Re-Add MRP support, IF device supports it - without it PowerState Reporting fails/is not reliable. It seems that MRP state is being depreciated by apple so may go completely in future. More debug logging of service setup.
0.0.26 Add pluginConfig option for unicast scanning of a single IP address for device creation. Useful with multicast fails to find device without power cycle Update images
Released on: | Nov. 28, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
0.0.21 Fix reconnection/device disconnected issues with much! better handling of disconnect/reconnect Add pyatv verbose logging (Debug checkbox in plugin Config) Only logs to file given volume Refactor main appleTVListener loop to restart after any issue Bug fix for connectionlost/close that wasn't leading to correct restart Hopefully fix menu loading for actions remote commands Change Indigo LogFileHandler to manage %s that would otherwise appear in file log. Update some images Prompt message if attempt to send command to non-connected device.
0.0.17 Sort out reloading of remote commands not displaying until save and reopen Add error catching around commands - in case some that aren't compatible with various devices On restart/disconnet reload app_list
Released on: | Nov. 27, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
Bug fix - add Force Discovery to allow all devices to be again created. Seems the new appleTV appears as unknown causing it to not be added.
See main release notes for details
Changelog:
Expose Every current and future remote command. NB: Not all will be available all the time, or on every device.
.
Additional Remote control states - allow arguments to be sent. Enabling set volume, double tap, hold, play_URL etc.
MenuItem: Add Logging info to show all Commands possible (not available!) MenuItem: Add Logging info to show Features available for each Device
Remove unrecognised devices from being created. (Tested Sonos devices can't work use Airplay2, and unknown encryption) Should allow AppleTVs (all) and HomePods (untested) Restart Device after pairing (avoiding need to restart plugin if connection issues) Fine tuning some aspects. More repeated reporting of PowerState
Released on: | Nov. 27, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
See main release notes for details
Changelog:
Expose Every current and future remote command. NB: Not all will be available all the time, or on every device.
.
Additional Remote control states - allow arguments to be sent. Enabling set volume, double tap, hold, play_URL etc.
MenuItem: Add Logging info to show all Commands possible (not available!) MenuItem: Add Logging info to show Features available for each Device
Remove unrecognised devices from being created. (Tested Sonos devices can't work use Airplay2, and unknown encryption) Should allow AppleTVs (all) and HomePods (untested) Restart Device after pairing (avoiding need to restart plugin if connection issues) Fine tuning some aspects. More repeated reporting of PowerState
Released on: | Nov. 26, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
Bug fix version
Released on: | Nov. 26, 2022 |
Requires: | Indigo v2022.1.2+ |
Download this release |
Hi all,
This is a indigodomo appleTV plugin for remote control and monitoring of activities of your apple devices.
It uses the pyatv library (many thanks!) and this needs to be installed via a pip3 terminal command before usage. (Packaging it wasn't an option unfortunately as to many depencencies)
It use the pyatv PushListeners for playback activities to be immediately 'pushed' to the plugin devices. No polling required. This means if have lights dimming up on pause - it should happen immediately!
But before anything
In a terminal window enter:
sudo pip3 install pyatv
Double click the release indigoplugin File and install.
All going well - nothing will happen...
This one above. Press the "Generate AppleTV Devices"
This will search your network for appleTV device and generate plugin Devices corresponding. These devices will be located in the main device folder, but can be moved anywhere you like later. You can re-press and re-press the button (if you like), and new devices should not duplicate.
Next go to a Device:
Open a device, with the Edit Device Details
You should see the above.
Since OS16 and Apple4k you will need to pair your indigoplugin Device with your appleTV
Press the Start Pairing Button.
The plugin should find and connect to your appleTV.
A pincode should be displayed on the screen.
Enter the Pincode in the box, and press submit Pincode (Press) Button.
You should receive confirmation that pairing has been successful.
Press the SAVE button on the Config Dialog.
(I believe we need to do this only once... but time will tell...)
I expose a number of playback states (Thanks Karl for the typing on these!)
You will also see the device is an Indigo Relay - so there are Turn On/Turn Off/Toggle buttons that power down/power on the relevant appleTV.
The plugin exposes all remote control options via commands.
I have also implemented Launch App - which allows you to launch a specific application of the appleTV.
Unfortunately it doesn't allow LiveTV within the app, or more detailed control - but this can be managed with a lauchApp command, and then, left, down, down, select remote commands for example
Fails - with some red lines and an error about a dependency miniaudio (which we don't use...) It appears to want to install some x-code "command line developer tools" -- commandline tools - to help build this dependency. Install the xcode components, appears to be usr/bin/clang and hopefully will able to be installed.
Oh No - it looks like needs 14gig of Xcode for this to work. What a pain. Try: https://developer.apple.com/download/more/ Login and download Command Line Tools for Xcode and install.
The above worked for my production machine - which hit this issue. (avoided Xcode install thankfully)
Currently I expose all airplay devices - Sonos included. I do not believe these can be controlled or report status - but have not specifically tested them. The AppleTV devices are those we are aiming to support here.