Note: you may get an error when executing atvremote. ModuleNotFoundError: No module named 'bitarray._bitarray'
Downgrading bitarray will solve the problem.
Note: replace /var/lib/homebridge/ with /volume1/homebridge when using a Synology NAS
Place the script file inside the folder /var/lib/homebridge/
Set the script as executable with the command chmod +x /var/lib/homebridge/appletv_control.sh
Change ATV_id with the ID of your Apple TV
Change airplay_credentials with the credentials given when pairing with the Apple TV
Change companion_credentials with the credentials given when pairing with the Apple TV
Known issues
There is a known issue for pyatv if you have configured a Homepod to be the default audio output. In this case, you will always get the power to be ON (postlund/pyatv#1667).
请发表评论