I have an Apple TV 3rd generation and when I've leave my iMac for a while, or when I wake it up from overnight sleep, the same thing is happening. Even if I walk over to my TV and turn it on and wake up the Apple TV, I am still getting this message the first time I attempt to play my iTunes music from my iMac to the Apple TV.
All I have to do is select iTunes active and unselect the Apple TV and then select it again in the AirPlay devices drop down on the top left and it joins with no issues. This error seems to be associated with the Apple TV going to sleep or not being "awake" to receive the AirPlay wireless signal. I would hope Apple would address this error, as I obviously want to play AirPlay to the Apple TV and don't want an error message. A more effective way to deal with this is to prompt the user to wake up the Apple TV, or state that it is not available. But not an error message. It is not an error. The device is simply asleep.
I'd attempted to clear the Apple TV cache by holding down the menu key and the down arrow on my Apple TV remote simultaneously for ten seconds, with no results
I attempted to unplug the Apple TV and plug it back in, with no results.
I utilize Apple Feedback online every day... but this is a thankless process as nothing I have ever reported has been fixed by Apple.
Mavericks OS 10.9.5
iTunes 12.2.3.17
Apple TV model A1427 (3rd Generation).