pyatv can extract various information about a device, e.g. which
operating system (and version) it runs or its hardware model (3, 4K, etc.).
This information is exposed via the interface interface.DeviceInfo.
Using the Device Information API
After connecting to a device, youget device info via interface.AppleTV.device_info:
atv = await pyatv.connect(config, ...) devinfo = atv.device_info
You can then access the actual information via properties:
print(devinfo.operating_system) print(devinfo.version) print(devinfo.mac)
devinfo will produce a summary of the device information
(MAC-address is not included here):
>>> print(devinfo) 4K tvOS 13.3.1 build 17K795