As I only have a gen 3 device, I have not yet verified pyatv with a gen 4 device. If you have one, please try the library out and report any issues. The atvremote is probably easiest to use, look under docs/ for some help.
I have a ATV4 and when I run the command atvremote, I get an error:
pi@raspberrypi:~ $ atvremote
usage: atvremote [-h] [-v] [--developer] [--debug] [--name NAME]
[--address ADDRESS] [-t TIMEOUT] [-a | --hsgid HSGID]
command
atvremote: error: the following arguments are required: command
Running atvremote -a next does not do anything, but does not give error.
pi@raspberrypi:~ $ atvremote -a next
It's working perfectly for me on two Apple TV 4th generation devices!
@robbiet480 I ran the atvremote command directly after the sudo pip install. I am running it on a Pi on the same network as the ATV.
@arsaboo Don't know what to tell you, I installed it (via the repo) and it just worked the first time I tried it. Discovered devices and allowed me to see their states and everything
Issues i've discovered thus far with my aTV 4:
http://192.168.1.214:3689/ctrl-int/1/pause?session-id=22&hsgid=00000000-0ba7-9abb-857f-3f12f3b94448&prompt-id=0) and had the same issue, so it's not a pyATV specific problem...@arsaboo, if you run atvremote scan, does your device show up? Just running with -a does not work as it requires a command as well (like play, next or playing). It should give an error if no device is found, so I would believe that it works. Try starting a movie or some music and enter atvremote -a playing and you should hopefully see something. Using play, pause, next, etc. should also work.
@robbiet480, great that it seems to work :) The pause issue is not something that I have seen on my device. Maybe @arsaboo can try this is well? Play something and use the pause command?
@postlund I'm trying everything I can to figure out the pause issue. The official remote app works, nothing else does. It seems most if not all other commands are working properly.
Gonna open a new issue for pause
I believe we have managed to sort this out in #7, so I'm gonna close it :(
I mean :)
atvremote scan failed for me also.
However, after many hours of researching, I was able to find the hG for my Apple TV devices by running this in my Mac's terminal:
dns-sd -Z _appletv-v2._tcp.
Devices: 2x Apple TV (4th Gen)
atvremote scan worked for me :+1:
atvremote scan returns
Found Apple TVs:
but it doesn't list any Apple TVs or info about them. No error, no list. frustrating. Not sure what to do now.
btw I have one Apple TV 4th Gen
Most helpful comment
atvremote scanfailed for me also.However, after many hours of researching, I was able to find the
hGfor my Apple TV devices by running this in my Mac's terminal:dns-sd -Z _appletv-v2._tcp.Devices: 2x Apple TV (4th Gen)