This project is a Python script that uses the zeroconf
library to discover Apple TV devices on your local network. It retrieves and displays information such as the device name, IP address, model, OS version, and release date. The script also provides an option to save the discovered device information to a CSV file.
- Discover Apple TV devices on the local network using mDNS.
- Retrieve and display device information including name, IP address, model, OS version, and release date.
- Option to save the discovered device information to a CSV file.
- Python 3.x
zeroconf
librarycsv
library (part of the Python standard library)
-
Clone the repository:
git clone https://github.com/stilldisturbing/discover_apple_tv.git cd discover_apple_tv
-
Install the required dependencies:
pip install zeroconf
-
Run the script:
python discover_apple_tv.py
-
The script will start listening for Apple TV devices on the local network. When a device is discovered, its information will be displayed on the screen.
-
Press
Enter
to stop listening for devices. -
You will be prompted to save the discovered device information to a CSV file. Enter
yes
ory
to save the data, or pressEnter
to skip.
Listening for Apple TV devices...
Press Enter to stop listening...
Family Room (192.168.1.10) - Apple TV 4K 1st Gen, iOS: 14.7
Living Room (192.168.1.11) - Apple TV 4th Gen HD, iOS: 13.4
Do you want to write the data to 'Apple TV Devices.csv'? (y/yes / N/NO/Enter): yes
Data has been written to 'Apple TV Devices.csv'.
This project is licensed under the MIT License. See the LICENSE file for details.
Contributions, enhancements are welcome!
- zeroconf library for mDNS service discovery.