Apple TV 2 is on the network but not available through Home Sharing or AirPlay
My ATV2 has been working well for many years but recently won't connect through Home Sharing. It is on the same network as my Mac and I can rent through the iTunes Store, connect my YouTube account etc but it doesn't appear on any devices as an AirPlay option. I'm logged in using the same Apple ID on all machines and devices. I've restarted the ATV2, iTunes, my Mac, my router and checked that everything is running the latest software. They all were except for iTunes, which I updated (12.1), but it had no effect on the problem. I had not recently made any changes to any device or software, that I'm aware of.
It did briefly work (no change made) a day later but wouldn't connect the next time I tried. I've spent the last few days trying to find a solution and found nothing.
Any advice on how to progress?
MacBook Pro (Retina, 15-inch, Late 2013), OS X Yosemite (10.10.2)